modpost: reduce visibility of symbols and constify r/o arrays
authorMathias Krause <minipli@googlemail.com>
Wed, 27 Aug 2014 10:58:53 +0000 (20:28 +0930)
committerBen Hutchings <ben@decadent.org.uk>
Mon, 19 Mar 2018 18:58:24 +0000 (18:58 +0000)
commitd4a3239fa159342be1b8a6b1e2346fa40314e4e0
tree0d7cf4e8fd901cfbcf5287797ed692ffc83deca2
parentff114714a1ffc8d4824aae0ee8dcd1851d3203d0
modpost: reduce visibility of symbols and constify r/o arrays

commit 7a3ee7538598e0d60e6aa87dcf34a4e8a0adebc2 upstream.

Internally used symbols of modpost don't need to be externally visible;
make them static. Also constify the string arrays so they resist in the
r/o section instead of being runtime writable.

Those changes lead to a small size reduction as can be seen below:

   text    data     bss     dec     hex filename
  51381    2640   12416   66437   10385 scripts/mod/modpost.old
  51765    2224   12416   66405   10365 scripts/mod/modpost.new

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
scripts/mod/modpost.c