linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Detect unused header files?
@ 2009-07-28 18:18 Sam Ravnborg
  2009-07-28 20:36 ` Christopher Li
  0 siblings, 1 reply; 21+ messages in thread
From: Sam Ravnborg @ 2009-07-28 18:18 UTC (permalink / raw)
  To: sparse

In the kernel we would like to avoid all
unused include files.
Especially in the headers we export to userspace.

Are there any easy way we can use sparse to detect
that a specific header file is not used?

I know this will depend on the configuration, but
for the use I have in mind this does matter only a little.

The header files I have in mind will be fully self-contained
as they all include the header files they need to be used.

Sample:

cat foo.h:
#include <linux/types.h>
#include <linux/swab.h>

struct foo {
        __u32 bar;
        __u32 baz;
};

EOF


Here <linux/swab.h> is obviously not used.
And I would like sparse to flag this...

	Sam


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

end of thread, other threads:[~2009-08-06 17:39 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-28 18:18 Detect unused header files? Sam Ravnborg
2009-07-28 20:36 ` Christopher Li
2009-07-28 20:36   ` Robert P. J. Day
2009-07-28 20:49     ` Christopher Li
2009-07-28 21:04       ` Sam Ravnborg
2009-07-28 21:38         ` Christopher Li
2009-07-30 10:55           ` Christopher Li
2009-07-30 11:12             ` Derek M Jones
2009-07-30 20:36             ` Sam Ravnborg
2009-08-04 21:49               ` Christopher Li
2009-08-05  6:12                 ` Sam Ravnborg
2009-08-06 11:14                 ` Marko Kreen
2009-08-06 11:17                   ` Robert P. J. Day
2009-08-06 12:16                     ` Kamil Dudka
2009-08-06 12:15                       ` Robert P. J. Day
2009-08-06 13:01                       ` Kamil Dudka
2009-08-06 13:26                         ` Michael Stefaniuc
2009-08-06 14:09                           ` Robert P. J. Day
2009-08-06 17:39                   ` Christopher Li
2009-07-28 20:58   ` Sam Ravnborg
2009-07-28 21:21     ` Christopher Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).