]> Git Repo - linux.git/commit
mm/slab_common.c: make calculate_alignment() static
authorByongho Lee <[email protected]>
Thu, 1 Feb 2018 00:15:36 +0000 (16:15 -0800)
committerLinus Torvalds <[email protected]>
Thu, 1 Feb 2018 01:18:35 +0000 (17:18 -0800)
commit692ae74aaf226a557d88d5412a1764c09e63a193
tree1cc9dd8a77db15cbc5981a4e6d6f332bc6f10d7a
parentd984187e3a1ad7d12447a7ab2c43ce3717a2b5b3
mm/slab_common.c: make calculate_alignment() static

calculate_alignment() function is only used inside slab_common.c.  So
make it static and let the compiler do more optimizations.

After this patch there's a small improvement in text and data size.

  $ gcc --version
    gcc (GCC) 7.2.1 20171128

Before:
  text    data     bss     dec      hex filename
  9890457  3828702  1212364 14931523 e3d643 vmlinux

After:
  text    data     bss     dec      hex filename
  9890437  3828670  1212364 14931471 e3d60f vmlinux

Also I fixed a style problem reported by checkpatch.

  WARNING: Missing a blank line after declarations
  #53: FILE: mm/slab_common.c:286:
  + unsigned long ralign = cache_line_size();
  + while (size <= ralign / 2)

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Byongho Lee <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Pekka Enberg <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/slab.h
mm/slab_common.c
This page took 0.045998 seconds and 4 git commands to generate.