SLUB: fix checkpatch warnings

fix checkpatch --file mm/slub.c errors and warnings.

$ q-code-quality-compare
errors lines of code errors/KLOC
mm/slub.c [before] 22 4204 5.2
mm/slub.c [after] 0 4210 0

no code changed:

text data bss dec hex filename
22195 8634 136 30965 78f5 slub.o.before
22195 8634 136 30965 78f5 slub.o.after

md5:
93cdfbec2d6450622163c590e1064358 slub.o.before.asm
93cdfbec2d6450622163c590e1064358 slub.o.after.asm

[clameter: rediffed against Pekka's cleanup patch, omitted
moves of the name of a function to the start of line]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Christoph Lameter <clameter@sgi.com>

authored by Ingo Molnar and committed by Christoph Lameter 3adbefee a76d3546

+21 -16
+21 -16
mm/slub.c
··· 719 719 endobject, red, s->inuse - s->objsize)) 720 720 return 0; 721 721 } else { 722 - if ((s->flags & SLAB_POISON) && s->objsize < s->inuse) 723 - check_bytes_and_report(s, page, p, "Alignment padding", endobject, 724 - POISON_INUSE, s->inuse - s->objsize); 722 + if ((s->flags & SLAB_POISON) && s->objsize < s->inuse) { 723 + check_bytes_and_report(s, page, p, "Alignment padding", 724 + endobject, POISON_INUSE, s->inuse - s->objsize); 725 + } 725 726 } 726 727 727 728 if (s->flags & SLAB_POISON) { ··· 929 928 return 0; 930 929 931 930 if (unlikely(s != page->slab)) { 932 - if (!PageSlab(page)) 931 + if (!PageSlab(page)) { 933 932 slab_err(s, page, "Attempt to free object(0x%p) " 934 933 "outside of slab", object); 935 - else 936 - if (!page->slab) { 934 + } else if (!page->slab) { 937 935 printk(KERN_ERR 938 936 "SLUB <none>: no slab for object 0x%p.\n", 939 937 object); ··· 1041 1041 */ 1042 1042 if (slub_debug && (!slub_debug_slabs || 1043 1043 strncmp(slub_debug_slabs, name, 1044 - strlen(slub_debug_slabs)) == 0)) 1044 + strlen(slub_debug_slabs)) == 0)) 1045 1045 flags |= slub_debug; 1046 1046 } 1047 1047 ··· 1330 1330 get_cycles() % 1024 > s->remote_node_defrag_ratio) 1331 1331 return NULL; 1332 1332 1333 - zonelist = &NODE_DATA(slab_node(current->mempolicy)) 1334 - ->node_zonelists[gfp_zone(flags)]; 1333 + zonelist = &NODE_DATA( 1334 + slab_node(current->mempolicy))->node_zonelists[gfp_zone(flags)]; 1335 1335 for (z = zonelist->zones; *z; z++) { 1336 1336 struct kmem_cache_node *n; 1337 1337 ··· 2589 2589 goto unlock_out; 2590 2590 2591 2591 realsize = kmalloc_caches[index].objsize; 2592 - text = kasprintf(flags & ~SLUB_DMA, "kmalloc_dma-%d", (unsigned int)realsize), 2592 + text = kasprintf(flags & ~SLUB_DMA, "kmalloc_dma-%d", 2593 + (unsigned int)realsize); 2593 2594 s = kmalloc(kmem_size, flags & ~SLUB_DMA); 2594 2595 2595 2596 if (!s || !text || !kmem_cache_open(s, flags, text, ··· 3041 3040 #endif 3042 3041 3043 3042 3044 - printk(KERN_INFO "SLUB: Genslabs=%d, HWalign=%d, Order=%d-%d, MinObjects=%d," 3043 + printk(KERN_INFO 3044 + "SLUB: Genslabs=%d, HWalign=%d, Order=%d-%d, MinObjects=%d," 3045 3045 " CPUs=%d, Nodes=%d\n", 3046 3046 caches, cache_line_size(), 3047 3047 slub_min_order, slub_max_order, slub_min_objects, ··· 3209 3207 } 3210 3208 3211 3209 static struct notifier_block __cpuinitdata slab_notifier = { 3212 - &slab_cpuup_callback, NULL, 0 3210 + .notifier_call = slab_cpuup_callback 3213 3211 }; 3214 3212 3215 3213 #endif ··· 3367 3365 p = kzalloc(32, GFP_KERNEL); 3368 3366 p[32 + sizeof(void *)] = 0x34; 3369 3367 printk(KERN_ERR "\n2. kmalloc-32: Clobber next pointer/next slab" 3370 - " 0x34 -> -0x%p\n", p); 3371 - printk(KERN_ERR "If allocated object is overwritten then not detectable\n\n"); 3368 + " 0x34 -> -0x%p\n", p); 3369 + printk(KERN_ERR 3370 + "If allocated object is overwritten then not detectable\n\n"); 3372 3371 3373 3372 validate_slab_cache(kmalloc_caches + 5); 3374 3373 p = kzalloc(64, GFP_KERNEL); ··· 3377 3374 *p = 0x56; 3378 3375 printk(KERN_ERR "\n3. kmalloc-64: corrupting random byte 0x56->0x%p\n", 3379 3376 p); 3380 - printk(KERN_ERR "If allocated object is overwritten then not detectable\n\n"); 3377 + printk(KERN_ERR 3378 + "If allocated object is overwritten then not detectable\n\n"); 3381 3379 validate_slab_cache(kmalloc_caches + 6); 3382 3380 3383 3381 printk(KERN_ERR "\nB. Corruption after free\n"); ··· 3391 3387 p = kzalloc(256, GFP_KERNEL); 3392 3388 kfree(p); 3393 3389 p[50] = 0x9a; 3394 - printk(KERN_ERR "\n2. kmalloc-256: Clobber 50th byte 0x9a->0x%p\n\n", p); 3390 + printk(KERN_ERR "\n2. kmalloc-256: Clobber 50th byte 0x9a->0x%p\n\n", 3391 + p); 3395 3392 validate_slab_cache(kmalloc_caches + 8); 3396 3393 3397 3394 p = kzalloc(512, GFP_KERNEL);