mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* proposal: remove unused macros
@ 2006-11-13 18:13 Mariusz Kozlowski
  2006-11-14  2:19 ` Gene Heskett
  0 siblings, 1 reply; 6+ messages in thread
From: Mariusz Kozlowski @ 2006-11-13 18:13 UTC (permalink / raw)
  To: linux-kernel

Hello,

	Recently someone send a patch that fixed some old '#ifdef'ed code with syntax 
error (stray brackets). The broken code was there for a long time and nobody 
saw that. I digged some more and wrote a simple program that counted '(' 
and ')' in the kernel code that emits apropriate text if for a given file 
both numbers differ. That is probably dumb idea but it worked :-) Quite fast 
I found a dozen of broken macros with syntax errors etc. All of those macros 
are unused. I digged a bit deeper and used '-Wunused-macros' flag which with 
causes 8340 new warnings to be emited for 2.6.19-rc5-mm1 with 'allmodconfig'. 
For sure there are false positives (see gcc man page) but even if i.e. 50% of 
them are fp then we still have around 4k of unused macros scattered around 
the tree.

To me this is a dead code. I can review the code causing these warnings and 
prepare patches 'per subsystem' or whatever to address this issue. That is if 
nobody opposes.
-- 
Regards,

	Mariusz Kozlowski

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

end of thread, other threads:[~2006-11-14 14:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-13 18:13 proposal: remove unused macros Mariusz Kozlowski
2006-11-14  2:19 ` Gene Heskett
2006-11-14  5:29   ` Randy Dunlap
2006-11-14 11:18   ` Horst H. von Brand
2006-11-14 14:29     ` Gene Heskett
2006-11-14 14:37       ` Mariusz Kozlowski

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

all inboxes | Powered by JetHome®