diff options
author | Joe Perches <joe@perches.com> | 2016-03-17 17:19:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-17 18:09:34 -0400 |
commit | 756a025f00091918d9d09ca3229defb160b409c0 (patch) | |
tree | d4a6914597ef4b10870a7983bb61cd595e7094a2 /mm/slub.c | |
parent | 598d80914e84fa79580850530f5d4a50a99bf4f5 (diff) |
mm: coalesce split strings
Kernel style prefers a single string over split strings when the string is
'user-visible'.
Miscellanea:
- Add a missing newline
- Realign arguments
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Tejun Heo <tj@kernel.org> [percpu]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/slub.c')
-rw-r--r-- | mm/slub.c | 19 |
1 files changed, 9 insertions, 10 deletions
@@ -950,14 +950,14 @@ static int on_freelist(struct kmem_cache *s, struct page *page, void *search) | |||
950 | max_objects = MAX_OBJS_PER_PAGE; | 950 | max_objects = MAX_OBJS_PER_PAGE; |
951 | 951 | ||
952 | if (page->objects != max_objects) { | 952 | if (page->objects != max_objects) { |
953 | slab_err(s, page, "Wrong number of objects. Found %d but " | 953 | slab_err(s, page, "Wrong number of objects. Found %d but should be %d", |
954 | "should be %d", page->objects, max_objects); | 954 | page->objects, max_objects); |
955 | page->objects = max_objects; | 955 | page->objects = max_objects; |
956 | slab_fix(s, "Number of objects adjusted."); | 956 | slab_fix(s, "Number of objects adjusted."); |
957 | } | 957 | } |
958 | if (page->inuse != page->objects - nr) { | 958 | if (page->inuse != page->objects - nr) { |
959 | slab_err(s, page, "Wrong object count. Counter is %d but " | 959 | slab_err(s, page, "Wrong object count. Counter is %d but counted were %d", |
960 | "counted were %d", page->inuse, page->objects - nr); | 960 | page->inuse, page->objects - nr); |
961 | page->inuse = page->objects - nr; | 961 | page->inuse = page->objects - nr; |
962 | slab_fix(s, "Object count adjusted."); | 962 | slab_fix(s, "Object count adjusted."); |
963 | } | 963 | } |
@@ -1117,8 +1117,8 @@ static inline int free_consistency_checks(struct kmem_cache *s, | |||
1117 | 1117 | ||
1118 | if (unlikely(s != page->slab_cache)) { | 1118 | if (unlikely(s != page->slab_cache)) { |
1119 | if (!PageSlab(page)) { | 1119 | if (!PageSlab(page)) { |
1120 | slab_err(s, page, "Attempt to free object(0x%p) " | 1120 | slab_err(s, page, "Attempt to free object(0x%p) outside of slab", |
1121 | "outside of slab", object); | 1121 | object); |
1122 | } else if (!page->slab_cache) { | 1122 | } else if (!page->slab_cache) { |
1123 | pr_err("SLUB <none>: no slab for object 0x%p.\n", | 1123 | pr_err("SLUB <none>: no slab for object 0x%p.\n", |
1124 | object); | 1124 | object); |
@@ -3439,10 +3439,9 @@ static int kmem_cache_open(struct kmem_cache *s, unsigned long flags) | |||
3439 | free_kmem_cache_nodes(s); | 3439 | free_kmem_cache_nodes(s); |
3440 | error: | 3440 | error: |
3441 | if (flags & SLAB_PANIC) | 3441 | if (flags & SLAB_PANIC) |
3442 | panic("Cannot create slab %s size=%lu realsize=%u " | 3442 | panic("Cannot create slab %s size=%lu realsize=%u order=%u offset=%u flags=%lx\n", |
3443 | "order=%u offset=%u flags=%lx\n", | 3443 | s->name, (unsigned long)s->size, s->size, |
3444 | s->name, (unsigned long)s->size, s->size, | 3444 | oo_order(s->oo), s->offset, flags); |
3445 | oo_order(s->oo), s->offset, flags); | ||
3446 | return -EINVAL; | 3445 | return -EINVAL; |
3447 | } | 3446 | } |
3448 | 3447 | ||