public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/33] Make static
@ 2008-12-09 16:53 Roel Kluin
  2008-12-09 16:55 ` [PATCH 1/33] Documentation: " Roel Kluin
                   ` (29 more replies)
  0 siblings, 30 replies; 47+ messages in thread
From: Roel Kluin @ 2008-12-09 16:53 UTC (permalink / raw)
  To: lkml

Hi,

The following patches make things static, found by sparse. They are only used in
the file where they are declared.

I first compiled the kernel using sparse. and piped output to
../logs/make_yes_log_20081203155529

Then I used the script below, but made some manual changes as well. I tested
changes with checkpatch, have built it successfully with allnoconfig,
allmodconfig and allyesconfig.

Thanks,

Roel

Q="[^[:alnum:]_]"
s="[[:space:]]+"
V="[A-Za-z_]+[A-Za-z0-9_]*"

grep "Should it be static\?" ../logs/make_yes_log_20081203155529 |
   sed -rn "s/^([^:]*):([^:]*):.*'($V)'.*$/\1 \2 \3/p" | while read f n v; do
 echo "---[ v $f:$n $v ]---"
 f2="$(git grep -l -E "(^|$Q)$v($Q|$)")"
 z=$(echo "$f2" | wc -l)
 if [ $z -eq 1 ]; then
   echo "$v can be static: v $f:$n"
   sed -r -i "${n}s/^(static$S)*(.*)$/static \2/" "$f"
 elif [ $z -lt 5 ]; then
   grep -E -n "(^|$Q)$v($Q|$)" $(echo $f2 | tr "\n" " ");
   echo "if this can be static then apply:"
   echo "sed -r -i \"${n}s/^(static$S)*(.*)$/static \2/\" \"$f\"";
 fi
done | less

^ permalink raw reply	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2009-02-19  4:29 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-09 16:53 [PATCH 0/33] Make static Roel Kluin
2008-12-09 16:55 ` [PATCH 1/33] Documentation: " Roel Kluin
2008-12-22 19:38   ` Randy Dunlap
2008-12-09 16:58 ` [PATCH 2/33] x86: " Roel Kluin
2008-12-09 19:50   ` Frederik Deweerdt
2008-12-09 19:57   ` [PATCH 2/33 V2] " Roel Kluin
2008-12-09 17:00 ` [PATCH 3/33] block: " Roel Kluin
2008-12-10 14:46   ` Jens Axboe
2008-12-09 17:02 ` [PATCH 4/33] drivers/acpi: " Roel Kluin
2008-12-09 19:45   ` [PATCH 4/33 v2] " Roel Kluin
2008-12-09 17:05 ` [PATCH 5/33] drivers/block/floppy: " Roel Kluin
2008-12-09 17:12 ` [PATCH 6/33] drivers/char: " Roel Kluin
2008-12-09 17:52 ` [PATCH 7/33] drivers/dca: " Roel Kluin
2008-12-09 17:54 ` [PATCH 8/33] drivers/edac: " Roel Kluin
2008-12-09 18:26 ` [PATCH 10/33] drm/i915: " Roel Kluin
2008-12-09 18:41 ` [PATCH 12/33] i2c: " Roel Kluin
2008-12-09 19:04   ` Jean Delvare
2008-12-09 22:53     ` roel kluin
2008-12-09 18:44 ` [PATCH 13/33] Input: " Roel Kluin
2008-12-09 18:50 ` [PATCH 14/33] isdn: " Roel Kluin
2008-12-11  9:48   ` Armin Schindler
2008-12-09 18:52 ` [PATCH 15/33] leds: " Roel Kluin
2008-12-09 18:56 ` [PATCH 16/33] DVB: " Roel Kluin
2008-12-09 18:59 ` [PATCH 17/33] drivers/misc: " Roel Kluin
2008-12-09 19:06 ` [PATCH 18/33] drivers/net: " Roel Kluin
2008-12-10  0:42   ` Jeff Kirsher
2008-12-09 20:49 ` [PATCH 18/31] drivers/pci: " Roel Kluin
2008-12-09 22:53   ` Jesse Barnes
2008-12-09 21:12 ` [PATCH 19/31] drivers/pcmcia: " Roel Kluin
2008-12-09 21:20 ` [PATCH 20/31] drivers/pnp: " Roel Kluin
2008-12-09 21:41 ` [PATCH 21/31] drivers/power: " Roel Kluin
2008-12-09 21:50 ` [PATCH 23/31] drivers/usb: " Roel Kluin
2008-12-09 21:56 ` [PATCH 24/31] drivers/video: " Roel Kluin
2008-12-09 22:06 ` [PATCH 25/31] fs: " Roel Kluin
2008-12-09 22:11 ` [PATCH 26/31] kernel: " Roel Kluin
2008-12-09 22:14 ` [PATCH 27/31] mm: " Roel Kluin
2008-12-09 22:20 ` [PATCH 28/31] net: " Roel Kluin
2008-12-10 23:18   ` David Miller
2008-12-09 22:22 ` [PATCH 29/31] markers: " Roel Kluin
2008-12-09 22:53   ` Mathieu Desnoyers
2009-02-19  4:29   ` Mathieu Desnoyers
2008-12-09 22:26 ` [PATCH 30/31] sound: " Roel Kluin
2008-12-10 14:21   ` Takashi Iwai
2008-12-09 22:28 ` [PATCH 31/31] virt: " Roel Kluin
2008-12-10 10:07   ` Avi Kivity
2008-12-10 10:23     ` Avi Kivity
2008-12-09 22:52 ` [PATCH 22/31] scsi: " Roel Kluin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox