2003-09-09 09:04:16

by Russell King

[permalink] [raw]
Subject: 2.6.0-test5: configcheck results

Hi all,

I just ran make configcheck on 2.6.0-test5 and the results are:

832 files need linux/config.h but don't actually include it.
689 files which include linux/config.h but don't require the header.

This seems like a hell of a lot to fix. Would it not just be easier to
use the -imacros or -include and eliminate the "do we need to include
linux/config.h" question for ever?

--
Russell King ([email protected]) http://www.arm.linux.org.uk/personal/
Linux kernel maintainer of:
2.6 ARM Linux - http://www.arm.linux.org.uk/
2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core


2003-09-09 19:40:08

by Sam Ravnborg

[permalink] [raw]
Subject: Re: 2.6.0-test5: configcheck results

On Tue, Sep 09, 2003 at 10:04:12AM +0100, Russell King wrote:
> Hi all,
>
> I just ran make configcheck on 2.6.0-test5 and the results are:
>
> 832 files need linux/config.h but don't actually include it.
> 689 files which include linux/config.h but don't require the header.

Randy, you have looked into related perl scripts. Is the result of
checkconfig.pl reliable?

Sam

2003-09-09 20:13:06

by Randy.Dunlap

[permalink] [raw]
Subject: Re: 2.6.0-test5: configcheck results

On Tue, 9 Sep 2003 21:40:01 +0200 Sam Ravnborg <[email protected]> wrote:

| On Tue, Sep 09, 2003 at 10:04:12AM +0100, Russell King wrote:
| > Hi all,
| >
| > I just ran make configcheck on 2.6.0-test5 and the results are:
| >
| > 832 files need linux/config.h but don't actually include it.
| > 689 files which include linux/config.h but don't require the header.
|
| Randy, you have looked into related perl scripts. Is the result of
| checkconfig.pl reliable?

They aren't perfect. I consider them more like 80-90% solutions.
Usable until there's a better solution IMO, like maybe sparse.

The perl scripts don't look at other #included files to check if they
supply any of the needed #defines. I.e., they look only at the one
file being searched to check if it uses names (CONFIG_*) without
#include-ing config.h in this case, so it can produce false positives.

I looked quickly at crypto/tcrypt.c (which is listed as needing config.h).
It #includes linux/init.h, which #includes linux/config.h.
I expect that there are several...or many like this.

--
~Randy

2003-09-09 22:10:43

by Bill Davidsen

[permalink] [raw]
Subject: Re: 2.6.0-test5: configcheck results

In article <[email protected]>,
Russell King <[email protected]> wrote:

| I just ran make configcheck on 2.6.0-test5 and the results are:
|
| 832 files need linux/config.h but don't actually include it.
| 689 files which include linux/config.h but don't require the header.

I'm suspicious of the first one, unless you mean "include it with
multi-level includes of other stuff." The second one is probably close
to the truth.

Thanks for doing this work, I'm not sure any tool is trustworthy, but it
should be relatively easy to test the "do not need" files with a script.

--
bill davidsen <[email protected]>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.

2003-09-10 00:22:06

by Andries Brouwer

[permalink] [raw]
Subject: Re: 2.6.0-test5: configcheck results

On Tue, Sep 09, 2003 at 09:40:01PM +0200, Sam Ravnborg wrote:
> On Tue, Sep 09, 2003 at 10:04:12AM +0100, Russell King wrote:
> > Hi all,
> >
> > I just ran make configcheck on 2.6.0-test5 and the results are:
> >
> > 832 files need linux/config.h but don't actually include it.
> > 689 files which include linux/config.h but don't require the header.
>
> Randy, you have looked into related perl scripts. Is the result of
> checkconfig.pl reliable?

No, make configcheck is not reliable.
For example, <linux/init.h> includes <linux/config.h>.
But configcheck doesn't notice.