Re: [PATCH 7/12] acpi: fix another compile warning

2007-06-22 Thread Randy Dunlap
On Fri, 22 Jun 2007 20:55:30 -0700 Andrew Morton wrote:

> > On Wed, 20 Jun 2007 11:25:48 -0700 Ravikiran G Thirumalai <[EMAIL 
> > PROTECTED]> wrote:
> > Paper over 'select' inadequacies.  
> > 
> > Signed-off-by: Ravikiran Thirumalai <[EMAIL PROTECTED]>
> > 
> > Index: linux-2.6.22-rc5/arch/x86_64/Kconfig
> > ===
> > --- linux-2.6.22-rc5.orig/arch/x86_64/Kconfig   2007-06-18 
> > 16:02:19.571323415 -0700
> > +++ linux-2.6.22-rc5/arch/x86_64/Kconfig2007-06-20 11:34:29.845354250 
> > -0700
> > @@ -366,6 +366,7 @@ config X86_64_ACPI_NUMA
> > depends on NUMA
> > select ACPI 
> > select PCI
> > +   select PM
> > select ACPI_NUMA
> > default y
> > help
> 
> argh.  (and not just argh-at-your-email-client).
> 
> I went through some hair-tearing a few months ago working out why it is so
> damn hard to make CONFIG_PM go away and then I fixed it.  And now you're
> proposing a change which would reinstate the obnoxious old behaviour.
> 
> Is the "bug" which you're "fixing" here caused by the randconfig
> inadequacies?  Because randconfig is just busted and simply should auto-run
> oldconfig.

Running oldconfig won't fix randconfigs that have busted "select"
chains (i.e., select does not follow chains like "depends on" does).

However, lots of this bustage isn't due to randconfig at all.
It's due to Jan E.'s menuconfig changes (yes, which I supported).
It seems that Jan didn't realize that a transition of a tristate symbol
to a boolean converts y or m to y (and n to n) and all (?) of the new
menuconfig symbols that control whether a menu is displayed or not
are boolean.  One simple "fix" (or workaround) is to make them
tristate.  Now that seems a little odd for a symbol that just controls
whether a menu is displayed or not, so Satyam Sharma has made some
other suggestions, and of course Andreas Herrmann has produced lots
of patches to fix various issues that he has run into.

I can't tell you the final answer (I proposed the tristate fix).
I don't particularly like some of the patches that change
depends on XYZ
to
depends on XYZ && ksymbol
in many lines of kconfig entries.


Not that it answers your question, but we should have hit this
in -mm, not in mainline, but it appears that our testing was a bit
insufficient.

And of course, if someone would fix kconfig to follow "select" chains,
we should bestow an award on them.  :)
(however, I don't know if Roman would merge that patch)

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 7/12] acpi: fix another compile warning

2007-06-22 Thread Andrew Morton
> On Wed, 20 Jun 2007 11:25:48 -0700 Ravikiran G Thirumalai <[EMAIL PROTECTED]> 
> wrote:
> Paper over 'select' inadequacies.  
> 
> Signed-off-by: Ravikiran Thirumalai <[EMAIL PROTECTED]>
> 
> Index: linux-2.6.22-rc5/arch/x86_64/Kconfig
> ===
> --- linux-2.6.22-rc5.orig/arch/x86_64/Kconfig 2007-06-18 16:02:19.571323415 
> -0700
> +++ linux-2.6.22-rc5/arch/x86_64/Kconfig  2007-06-20 11:34:29.845354250 
> -0700
> @@ -366,6 +366,7 @@ config X86_64_ACPI_NUMA
> depends on NUMA
> select ACPI 
>   select PCI
> + select PM
> select ACPI_NUMA
> default y
> help

argh.  (and not just argh-at-your-email-client).

I went through some hair-tearing a few months ago working out why it is so
damn hard to make CONFIG_PM go away and then I fixed it.  And now you're
proposing a change which would reinstate the obnoxious old behaviour.

Is the "bug" which you're "fixing" here caused by the randconfig
inadequacies?  Because randconfig is just busted and simply should auto-run
oldconfig.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 7/12] acpi: fix another compile warning

2007-06-22 Thread Andreas Herrmann
On Thu, Jun 21, 2007 at 08:36:15PM +0200, Andreas Herrmann wrote:
> On Wed, Jun 20, 2007 at 11:25:48AM -0700, Ravikiran G Thirumalai wrote:
> > On Wed, Jun 20, 2007 at 09:36:30AM -0400, Len Brown wrote:
> > > 
  

> > > The underlying problem is that Kconfig doesn't support using select
> > > on targets which themselves have dependencies.
> > > 
> > > Signed-off-by: Len Brown <[EMAIL PROTECTED]>
> > > 
> > > 
> > > diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig
> > > index 5ce9443..e9d7767 100644
> > > --- a/arch/x86_64/Kconfig
> > > +++ b/arch/x86_64/Kconfig
> > > @@ -364,9 +364,9 @@ config NODES_SHIFT
> > >  config X86_64_ACPI_NUMA
> > > bool "ACPI NUMA detection"
> > > depends on NUMA
> > > -   select ACPI 
> > > +   depends on ACPI 
> > >   select PCI
> > > -   select ACPI_NUMA
> > > +   depends on ACPI_NUMA
> > > default y
> > > help
> > >Enable ACPI SRAT based node topology detection.
> > > -
> > 
  
> > 
> > 
> > Paper over 'select' inadequacies.  
> > 
> > Signed-off-by: Ravikiran Thirumalai <[EMAIL PROTECTED]>
> > 
> > Index: linux-2.6.22-rc5/arch/x86_64/Kconfig
> > ===
> > --- linux-2.6.22-rc5.orig/arch/x86_64/Kconfig   2007-06-18 
> > 16:02:19.571323415 -0700
> > +++ linux-2.6.22-rc5/arch/x86_64/Kconfig2007-06-20 11:34:29.845354250 
> > -0700
> > @@ -366,6 +366,7 @@ config X86_64_ACPI_NUMA
> > depends on NUMA
> > select ACPI 
> > select PCI
> > +   select PM
> > select ACPI_NUMA
> > default y
> > help
> 
> Yep, this one-liner solves all acpi related compile errors/warnings
> that I've reported.
> 
> Additional it resolves anoter problem that results from
> dependencies between CONFIG_PNP and CONFIG_ACPI.
> 


Andi,

are you going to apply Ravikiran's patch?


Regards,

Andreas

-- 
Operating | AMD Saxony Limited Liability Company & Co. KG,
  System  | Wilschdorfer Landstr. 101, 01109 Dresden, Germany
 Research | Register Court Dresden: HRA 4896, General Partner authorized
  Center  | to represent: AMD Saxony LLC (Wilmington, Delaware, US)
  (OSRC)  | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 7/12] acpi: fix another compile warning

2007-06-21 Thread Andreas Herrmann
On Wed, Jun 20, 2007 at 11:25:48AM -0700, Ravikiran G Thirumalai wrote:
> On Wed, Jun 20, 2007 at 09:36:30AM -0400, Len Brown wrote:
> > On Wednesday 20 June 2007 04:49, Andreas Herrmann wrote:
> > > On Tue, Jun 19, 2007 at 11:38:02PM -0400, Len Brown wrote:
> > > > On Tuesday 19 June 2007 18:50, Andreas Herrmann wrote:
> > 
> > I fear, however, that this patch defeats the purpose of 
> > b0bd35e622ffbda2c01dc67a0381c6a18817a29a -- which was to make selecting
> > NUMA more user-friendly.  So it might make more sense to simply revert that
> > patch entirely.
> > 
> > The underlying problem is that Kconfig doesn't support using select
> > on targets which themselves have dependencies.
> > 
> > Signed-off-by: Len Brown <[EMAIL PROTECTED]>
> > 
> > 
> > diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig
> > index 5ce9443..e9d7767 100644
> > --- a/arch/x86_64/Kconfig
> > +++ b/arch/x86_64/Kconfig
> > @@ -364,9 +364,9 @@ config NODES_SHIFT
> >  config X86_64_ACPI_NUMA
> > bool "ACPI NUMA detection"
> > depends on NUMA
> > -   select ACPI 
> > +   depends on ACPI 
> > select PCI
> > -   select ACPI_NUMA
> > +   depends on ACPI_NUMA
> > default y
> > help
> >  Enable ACPI SRAT based node topology detection.
> > -
> 
> arch/x86_64/Kconfig:706:error: found recursive dependency: PCI -> ACPI ->
> X86_64_ACPI_NUMA -> PCI
>  -> USB_ARCH_HAS_OHCI -> USB_ARCH_HAS_HCD -> MOUSE_APPLETOUCH -> USB ->
> USB_SISUSBVGAmake[1]: *** [menuconfig] Error 1
> 
> I guess we have to change PCI to 'depends on' as well.
> Else, select PM?
> 
> I am OK with either approach.
> 
> Thanks,
> Kiran
> 
> Paper over 'select' inadequacies.  
> 
> Signed-off-by: Ravikiran Thirumalai <[EMAIL PROTECTED]>
> 
> Index: linux-2.6.22-rc5/arch/x86_64/Kconfig
> ===
> --- linux-2.6.22-rc5.orig/arch/x86_64/Kconfig 2007-06-18 16:02:19.571323415 
> -0700
> +++ linux-2.6.22-rc5/arch/x86_64/Kconfig  2007-06-20 11:34:29.845354250 
> -0700
> @@ -366,6 +366,7 @@ config X86_64_ACPI_NUMA
> depends on NUMA
> select ACPI 
>   select PCI
> + select PM
> select ACPI_NUMA
> default y
> help

Yep, this one-liner solves all acpi related compile errors/warnings
that I've reported.

Additional it resolves anoter problem that results from
dependencies between CONFIG_PNP and CONFIG_ACPI.

One problem arises:
If PM is deselected, the PNP menu is empty on x86_64.
So I suggest to add the attached patch to hide the PNP-menu
if no PM (and thus ACPI) is selected.


Regards,

Andreas

--

Make CONFIG_PNP a menuconfig to hide the submenu if neither
ISA nor ACPI is selected.

Signed-off-by: Andreas Herrmann <[EMAIL PROTECTED]>

diff --git a/drivers/pnp/Kconfig b/drivers/pnp/Kconfig
index 1959cef..2291e7d 100644
--- a/drivers/pnp/Kconfig
+++ b/drivers/pnp/Kconfig
@@ -2,11 +2,9 @@
 # Plug and Play configuration
 #
 
-menu "Plug and Play support"
-   depends on HAS_IOMEM
-
-config PNP
+menuconfig PNP
bool "Plug and Play support"
+   depends on HAS_IOMEM
depends on ISA || ACPI
---help---
  Plug and Play (PnP) is a standard for peripherals which allows those
@@ -22,15 +20,15 @@ config PNP
 
  If unsure, say Y.
 
+if PNP
+
 config PNP_DEBUG
bool "PnP Debug Messages"
-   depends on PNP
help
  Say Y if you want the Plug and Play Layer to print debug messages.
  This is useful if you are developing a PnP driver or troubleshooting.
 
 comment "Protocols"
-   depends on PNP
 
 source "drivers/pnp/isapnp/Kconfig"
 
@@ -38,5 +36,4 @@ source "drivers/pnp/pnpbios/Kconfig"
 
 source "drivers/pnp/pnpacpi/Kconfig"
 
-endmenu
-
+endif



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 7/12] acpi: fix another compile warning

2007-06-20 Thread Ravikiran G Thirumalai
On Wed, Jun 20, 2007 at 09:36:30AM -0400, Len Brown wrote:
> On Wednesday 20 June 2007 04:49, Andreas Herrmann wrote:
> > On Tue, Jun 19, 2007 at 11:38:02PM -0400, Len Brown wrote:
> > > On Tuesday 19 June 2007 18:50, Andreas Herrmann wrote:
> 
> I fear, however, that this patch defeats the purpose of 
> b0bd35e622ffbda2c01dc67a0381c6a18817a29a -- which was to make selecting
> NUMA more user-friendly.  So it might make more sense to simply revert that
> patch entirely.
> 
> The underlying problem is that Kconfig doesn't support using select
> on targets which themselves have dependencies.
> 
> Signed-off-by: Len Brown <[EMAIL PROTECTED]>
> 
> 
> diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig
> index 5ce9443..e9d7767 100644
> --- a/arch/x86_64/Kconfig
> +++ b/arch/x86_64/Kconfig
> @@ -364,9 +364,9 @@ config NODES_SHIFT
>  config X86_64_ACPI_NUMA
> bool "ACPI NUMA detection"
> depends on NUMA
> -   select ACPI 
> +   depends on ACPI 
>   select PCI
> -   select ACPI_NUMA
> +   depends on ACPI_NUMA
> default y
> help
>Enable ACPI SRAT based node topology detection.
> -

arch/x86_64/Kconfig:706:error: found recursive dependency: PCI -> ACPI ->
X86_64_ACPI_NUMA -> PCI
 -> USB_ARCH_HAS_OHCI -> USB_ARCH_HAS_HCD -> MOUSE_APPLETOUCH -> USB ->
USB_SISUSBVGAmake[1]: *** [menuconfig] Error 1

I guess we have to change PCI to 'depends on' as well.
Else, select PM?

I am OK with either approach.

Thanks,
Kiran

Paper over 'select' inadequacies.  

Signed-off-by: Ravikiran Thirumalai <[EMAIL PROTECTED]>

Index: linux-2.6.22-rc5/arch/x86_64/Kconfig
===
--- linux-2.6.22-rc5.orig/arch/x86_64/Kconfig   2007-06-18 16:02:19.571323415 
-0700
+++ linux-2.6.22-rc5/arch/x86_64/Kconfig2007-06-20 11:34:29.845354250 
-0700
@@ -366,6 +366,7 @@ config X86_64_ACPI_NUMA
depends on NUMA
select ACPI 
select PCI
+   select PM
select ACPI_NUMA
default y
help
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 7/12] acpi: fix another compile warning

2007-06-20 Thread Randy Dunlap

Andreas Herrmann wrote:

On Tue, Jun 19, 2007 at 08:51:58PM -0700, Randy Dunlap wrote:

On Tue, 19 Jun 2007 20:49:34 -0700 Randy Dunlap wrote:


On Tue, 19 Jun 2007 23:38:02 -0400 Len Brown wrote:


On Tuesday 19 June 2007 18:50, Andreas Herrmann wrote:

Avoid compile warning if !ACPI_BLACKLIST_YEAR

  CC  drivers/acpi/blacklist.o
  drivers/acpi/blacklist.c:76:5: warning: "CONFIG_ACPI_BLACKLIST_YEAR" is not 
defined

How were you able to produce a .config with CONFIG_ACPI_BLACKLIST_YEAR not 
defined?
Can you send it to me?

'make randconfig' does that kind of thing.  It doesn't enforce/follow
"select" clauses.

I should have also said:  randconfig is good for detecting some
missing conditions/configs or missing header files, but if you find one
that is just plain Invalid (like some of these), just say so
and do whatever you want with the patch (IMHO of course).



I think of randconfig as

  "make config with random answers to all questions"

(Or did I miss something?)
This means that randconfig does not give totally random
configurations. The same restrictions apply for config,
randconfig and menuconfig. If not we might consider fixing
scripts/kconfig/conf.c and friends.


The last time that I looked at the config code, randconfig generates
a random value for config symbols, taking "depends on" into account,
but it does not take "select" into account.  Or put another way,
it does not follow "select" chains.

and IIRC, running "make oldconfig" after that still won't enforce
the "select"s.  This is a long-running problem and one of the problems
with using "select" at all.


So in general a "randconfig" configurations can be generated by a user
as well. He just has to give the same answers during "make config"
as randconfig did.

I started this randconfig thing yesterday and up to now I have looked
at 16 (out of >66) configs which lead to kernel build errors with
the current git tree.
Of course I have seen duplicates of the problems reported.
But there were just 3 (all equal) bogus configurations. There randconfig
did not provide a proper file name for CONFIG_ACPI_CUSTOM_DSDT_FILE.
This is the only case for which I would use the term "user error" or
"bogus randconfig".

IMHO if certain configurations are invalid we should use kconfig-language
to prevent them.


Ah and wrt to the above compile warning. Normally I would have ignored
it - but I looked at acpi code and its Kconfig anyway.
And It's easy to avoid such a warning to keep the terminal clear
for more interesting compile messages ;-)



Regards,

Andreas


--
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 7/12] acpi: fix another compile warning

2007-06-20 Thread Andi Kleen

> The underlying problem is that Kconfig doesn't support using select
> on targets which themselves have dependencies.
> 
> Signed-off-by: Len Brown <[EMAIL PROTECTED]>

The depends on ACPI is fine by me, but I would prefer if the 
ACPI_NUMA dependency worked the other way round (APCI_NUMA default y
and depends on the relevant architecture specific symbols). That would
be more user friendly I think because all the NUMA options would
be in one place.

-Andi

> diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig
> index 5ce9443..e9d7767 100644
> --- a/arch/x86_64/Kconfig
> +++ b/arch/x86_64/Kconfig
> @@ -364,9 +364,9 @@ config NODES_SHIFT
>  config X86_64_ACPI_NUMA
> bool "ACPI NUMA detection"
> depends on NUMA
> -   select ACPI 
> +   depends on ACPI 
>   select PCI
> -   select ACPI_NUMA
> +   depends on ACPI_NUMA
> default y
> help
>Enable ACPI SRAT based node topology detection.
> 


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 7/12] acpi: fix another compile warning

2007-06-20 Thread Len Brown
On Wednesday 20 June 2007 04:49, Andreas Herrmann wrote:
> On Tue, Jun 19, 2007 at 11:38:02PM -0400, Len Brown wrote:
> > On Tuesday 19 June 2007 18:50, Andreas Herrmann wrote:
> > > Avoid compile warning if !ACPI_BLACKLIST_YEAR
> > > 
> > >   CC  drivers/acpi/blacklist.o
> > >   drivers/acpi/blacklist.c:76:5: warning: "CONFIG_ACPI_BLACKLIST_YEAR" is 
> > > not defined
> > 
> > How were you able to produce a .config with CONFIG_ACPI_BLACKLIST_YEAR not 
> > defined?
> 
> Initially I used randconfig. But you can easily create it using
> "make menuconfig", too.
> 
> Just do "make mrproper && make menuconfig" and now
> deselect CONFIG_PM. On x86_64 ACPI keeps enabled by default.

As CONFIG_ACPI depends on CONFIG_PM, then if you are able to end up
with a config having ACPI && !PM, then the Kconfig system is broken.

The brokeness is x86_64 specific, and results from the "select ACPI" below.

Please test if this single patch fixes all your multiple ACPI related build 
errors.

I fear, however, that this patch defeats the purpose of 
b0bd35e622ffbda2c01dc67a0381c6a18817a29a -- which was to make selecting
NUMA more user-friendly.  So it might make more sense to simply revert that
patch entirely.

The underlying problem is that Kconfig doesn't support using select
on targets which themselves have dependencies.

Signed-off-by: Len Brown <[EMAIL PROTECTED]>


diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig
index 5ce9443..e9d7767 100644
--- a/arch/x86_64/Kconfig
+++ b/arch/x86_64/Kconfig
@@ -364,9 +364,9 @@ config NODES_SHIFT
 config X86_64_ACPI_NUMA
bool "ACPI NUMA detection"
depends on NUMA
-   select ACPI 
+   depends on ACPI 
select PCI
-   select ACPI_NUMA
+   depends on ACPI_NUMA
default y
help
 Enable ACPI SRAT based node topology detection.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 7/12] acpi: fix another compile warning

2007-06-20 Thread Andreas Herrmann
On Tue, Jun 19, 2007 at 08:51:58PM -0700, Randy Dunlap wrote:
> On Tue, 19 Jun 2007 20:49:34 -0700 Randy Dunlap wrote:
> 
> > On Tue, 19 Jun 2007 23:38:02 -0400 Len Brown wrote:
> > 
> > > On Tuesday 19 June 2007 18:50, Andreas Herrmann wrote:
> > > > Avoid compile warning if !ACPI_BLACKLIST_YEAR
> > > > 
> > > >   CC  drivers/acpi/blacklist.o
> > > >   drivers/acpi/blacklist.c:76:5: warning: "CONFIG_ACPI_BLACKLIST_YEAR" 
> > > > is not defined
> > > 
> > > How were you able to produce a .config with CONFIG_ACPI_BLACKLIST_YEAR 
> > > not defined?
> > > Can you send it to me?
> > 
> > 'make randconfig' does that kind of thing.  It doesn't enforce/follow
> > "select" clauses.
> 
> I should have also said:  randconfig is good for detecting some
> missing conditions/configs or missing header files, but if you find one
> that is just plain Invalid (like some of these), just say so
> and do whatever you want with the patch (IMHO of course).


I think of randconfig as

  "make config with random answers to all questions"

(Or did I miss something?)
This means that randconfig does not give totally random
configurations. The same restrictions apply for config,
randconfig and menuconfig. If not we might consider fixing
scripts/kconfig/conf.c and friends.

So in general a "randconfig" configurations can be generated by a user
as well. He just has to give the same answers during "make config"
as randconfig did.

I started this randconfig thing yesterday and up to now I have looked
at 16 (out of >66) configs which lead to kernel build errors with
the current git tree.
Of course I have seen duplicates of the problems reported.
But there were just 3 (all equal) bogus configurations. There randconfig
did not provide a proper file name for CONFIG_ACPI_CUSTOM_DSDT_FILE.
This is the only case for which I would use the term "user error" or
"bogus randconfig".

IMHO if certain configurations are invalid we should use kconfig-language
to prevent them.


Ah and wrt to the above compile warning. Normally I would have ignored
it - but I looked at acpi code and its Kconfig anyway.
And It's easy to avoid such a warning to keep the terminal clear
for more interesting compile messages ;-)



Regards,

Andreas



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 7/12] acpi: fix another compile warning

2007-06-20 Thread Andreas Herrmann
On Tue, Jun 19, 2007 at 11:38:02PM -0400, Len Brown wrote:
> On Tuesday 19 June 2007 18:50, Andreas Herrmann wrote:
> > Avoid compile warning if !ACPI_BLACKLIST_YEAR
> > 
> >   CC  drivers/acpi/blacklist.o
> >   drivers/acpi/blacklist.c:76:5: warning: "CONFIG_ACPI_BLACKLIST_YEAR" is 
> > not defined
> 
> How were you able to produce a .config with CONFIG_ACPI_BLACKLIST_YEAR not 
> defined?

Initially I used randconfig. But you can easily create it using
"make menuconfig", too.

Just do "make mrproper && make menuconfig" and now
deselect CONFIG_PM. On x86_64 ACPI keeps enabled by default.

Now additionally activate an assorted choice of laptop misc devices,
like MSI_LAPTOP, THINKPAD_ACPI etc, and you get:

...
drivers/misc/sony-laptop.c:1458: undefined reference to `ec_read'
drivers/built-in.o: In function `acpi_ec_read':
drivers/misc/thinkpad_acpi.c:247: undefined reference to `ec_read'
drivers/built-in.o: In function `acpi_ec_write':
drivers/misc/thinkpad_acpi.c:260: undefined reference to `ec_write'
drivers/built-in.o: In function `led_write':
drivers/misc/thinkpad_acpi.c:2209: undefined reference to `ec_write'
...

drivers/acpi/blacklist.c:76:5: warning: "CONFIG_ACPI_BLACKLIST_YEAR" is not defi
ned
...

drivers/acpi/bus.c: In function 'acpi_bus_get_power':
drivers/acpi/bus.c:162: warning: implicit declaration of function 
'acpi_power_get_inferred_state'
...


In short, it is possible for a user to create such a configuration.
The current kconfig for acpi and those misc devices does not prevent
it.

> Can you send it to me?
> 

Attached is a configuration that I've just created with menuconfig and
not randconfig.



Regards,

Andreas
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.22-rc5
# Wed Jun 20 10:17:48 2007
#
CONFIG_X86_64=y
CONFIG_64BIT=y
CONFIG_X86=y
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_ZONE_DMA32=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_SEMAPHORE_SLEEPERS=y
CONFIG_MMU=y
CONFIG_ZONE_DMA=y
CONFIG_RWSEM_GENERIC_SPINLOCK=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_X86_CMPXCHG=y
CONFIG_EARLY_PRINTK=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_IOMAP=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_ARCH_POPULATES_NODE_MAP=y
CONFIG_DMI=y
CONFIG_AUDIT_ARCH=y
CONFIG_GENERIC_BUG=y
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"

#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32

#
# General setup
#
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
# CONFIG_IPC_NS is not set
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not set
# CONFIG_UTS_NS is not set
# CONFIG_AUDIT is not set
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=18
# CONFIG_CPUSETS is not set
CONFIG_SYSFS_DEPRECATED=y
# CONFIG_RELAY is not set
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
# CONFIG_EMBEDDED is not set
CONFIG_UID16=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_ANON_INODES=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_SLAB=y
# CONFIG_SLUB is not set
# CONFIG_SLOB is not set
CONFIG_RT_MUTEXES=y
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0

#
# Loadable module support
#
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
# CONFIG_KMOD is not set
CONFIG_STOP_MACHINE=y

#
# Block layer
#
CONFIG_BLOCK=y
# CONFIG_BLK_DEV_IO_TRACE is not set

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
# CONFIG_IOSCHED_AS is not set
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
# CONFIG_DEFAULT_AS is not set
# CONFIG_DEFAULT_DEADLINE is not set
CONFIG_DEFAULT_CFQ=y
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="cfq"

#
# Processor type and features
#
CONFIG_X86_PC=y
# CONFIG_X86_VSMP is not set
CONFIG_MK8=y
# CONFIG_MPSC is not set
# CONFIG_MCORE2 is not set
# CONFIG_GENERIC_CPU is not set
CONFIG_X86_L1_CACHE_BYTES=64
CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_X86_INTERNODE_CACHE_BYTES=64
CONFIG_X86_TSC=y
CONFIG_X86_GOOD_APIC=y
# CONFIG_MICROCODE is not set
CONFIG_X86_MSR=y
CONFIG_X86_CPUID=y
CONFIG_X86_IO_APIC=y
CONFIG_X86_LOCAL_APIC=y
CONFIG_MTRR=y
CONFIG_SMP=y
CONFIG_SCHED_SMT=y
CONFIG_SCHED_MC=y
# CONFIG_PREEMPT_NONE is not set
CONFIG_PREEMPT_VOLUNTARY=y
# CONFIG_PREEMPT is not set
CONFIG_PREEMPT_BKL=y
CONFIG_NUMA=y
CONFIG_K8_NUMA=y
CONFIG_NODES_SHIFT=6
CONFIG_X86_64_ACPI_NUMA=y
CONFIG_NUMA_EMU=y
CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y
CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_SELECT_MEMORY_MODEL=y
# CONFIG_FLA

Re: [PATCH 7/12] acpi: fix another compile warning

2007-06-19 Thread Len Brown
On Tuesday 19 June 2007 23:51, Randy Dunlap wrote:
> On Tue, 19 Jun 2007 20:49:34 -0700 Randy Dunlap wrote:
> 
> > On Tue, 19 Jun 2007 23:38:02 -0400 Len Brown wrote:
> > 
> > > On Tuesday 19 June 2007 18:50, Andreas Herrmann wrote:
> > > > Avoid compile warning if !ACPI_BLACKLIST_YEAR
> > > > 
> > > >   CC  drivers/acpi/blacklist.o
> > > >   drivers/acpi/blacklist.c:76:5: warning: "CONFIG_ACPI_BLACKLIST_YEAR" 
> > > > is not defined
> > > 
> > > How were you able to produce a .config with CONFIG_ACPI_BLACKLIST_YEAR 
> > > not defined?
> > > Can you send it to me?
> > 
> > 'make randconfig' does that kind of thing.  It doesn't enforce/follow
> > "select" clauses.
> 
> I should have also said:  randconfig is good for detecting some
> missing conditions/configs or missing header files, but if you find one
> that is just plain Invalid (like some of these), just say so
> and do whatever you want with the patch (IMHO of course).

If randconfig ends up with impossible-for-a-user-to-generate configs,
then it seems seriously broken.  Perhaps it would make sense to run
"make oldconfig" after "make randconfig" -- or better yet, have that
built in?

-Len
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 7/12] acpi: fix another compile warning

2007-06-19 Thread Randy Dunlap
On Tue, 19 Jun 2007 20:49:34 -0700 Randy Dunlap wrote:

> On Tue, 19 Jun 2007 23:38:02 -0400 Len Brown wrote:
> 
> > On Tuesday 19 June 2007 18:50, Andreas Herrmann wrote:
> > > Avoid compile warning if !ACPI_BLACKLIST_YEAR
> > > 
> > >   CC  drivers/acpi/blacklist.o
> > >   drivers/acpi/blacklist.c:76:5: warning: "CONFIG_ACPI_BLACKLIST_YEAR" is 
> > > not defined
> > 
> > How were you able to produce a .config with CONFIG_ACPI_BLACKLIST_YEAR not 
> > defined?
> > Can you send it to me?
> 
> 'make randconfig' does that kind of thing.  It doesn't enforce/follow
> "select" clauses.

I should have also said:  randconfig is good for detecting some
missing conditions/configs or missing header files, but if you find one
that is just plain Invalid (like some of these), just say so
and do whatever you want with the patch (IMHO of course).


> > thanks,
> > -Len
> > 
> > > Signed-off-by: Andreas Herrmann <[EMAIL PROTECTED]>
> > > ---
> > >  drivers/acpi/blacklist.c |2 +-
> > >  1 files changed, 1 insertions(+), 1 deletions(-)
> > > 
> > > diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c
> > > index 3ec110c..ac96c47 100644
> > > --- a/drivers/acpi/blacklist.c
> > > +++ b/drivers/acpi/blacklist.c
> > > @@ -73,7 +73,7 @@ static struct acpi_blacklist_item acpi_blacklist[] 
> > > __initdata = {
> > >   {""}
> > >  };
> > >  
> > > -#if  CONFIG_ACPI_BLACKLIST_YEAR
> > > +#if  defined(CONFIG_ACPI_BLACKLIST_YEAR) && 
> > > CONFIG_ACPI_BLACKLIST_YEAR
> > >  
> > >  static int __init blacklist_by_year(void)
> > >  {
> > -

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 7/12] acpi: fix another compile warning

2007-06-19 Thread Randy Dunlap
On Tue, 19 Jun 2007 23:38:02 -0400 Len Brown wrote:

> On Tuesday 19 June 2007 18:50, Andreas Herrmann wrote:
> > Avoid compile warning if !ACPI_BLACKLIST_YEAR
> > 
> >   CC  drivers/acpi/blacklist.o
> >   drivers/acpi/blacklist.c:76:5: warning: "CONFIG_ACPI_BLACKLIST_YEAR" is 
> > not defined
> 
> How were you able to produce a .config with CONFIG_ACPI_BLACKLIST_YEAR not 
> defined?
> Can you send it to me?

'make randconfig' does that kind of thing.  It doesn't enforce/follow
"select" clauses.


> thanks,
> -Len
> 
> > Signed-off-by: Andreas Herrmann <[EMAIL PROTECTED]>
> > ---
> >  drivers/acpi/blacklist.c |2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c
> > index 3ec110c..ac96c47 100644
> > --- a/drivers/acpi/blacklist.c
> > +++ b/drivers/acpi/blacklist.c
> > @@ -73,7 +73,7 @@ static struct acpi_blacklist_item acpi_blacklist[] 
> > __initdata = {
> > {""}
> >  };
> >  
> > -#ifCONFIG_ACPI_BLACKLIST_YEAR
> > +#ifdefined(CONFIG_ACPI_BLACKLIST_YEAR) && 
> > CONFIG_ACPI_BLACKLIST_YEAR
> >  
> >  static int __init blacklist_by_year(void)
> >  {
> -

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 7/12] acpi: fix another compile warning

2007-06-19 Thread Len Brown
On Tuesday 19 June 2007 18:50, Andreas Herrmann wrote:
> Avoid compile warning if !ACPI_BLACKLIST_YEAR
> 
>   CC  drivers/acpi/blacklist.o
>   drivers/acpi/blacklist.c:76:5: warning: "CONFIG_ACPI_BLACKLIST_YEAR" is not 
> defined

How were you able to produce a .config with CONFIG_ACPI_BLACKLIST_YEAR not 
defined?
Can you send it to me?

thanks,
-Len

> Signed-off-by: Andreas Herrmann <[EMAIL PROTECTED]>
> ---
>  drivers/acpi/blacklist.c |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c
> index 3ec110c..ac96c47 100644
> --- a/drivers/acpi/blacklist.c
> +++ b/drivers/acpi/blacklist.c
> @@ -73,7 +73,7 @@ static struct acpi_blacklist_item acpi_blacklist[] 
> __initdata = {
>   {""}
>  };
>  
> -#if  CONFIG_ACPI_BLACKLIST_YEAR
> +#if  defined(CONFIG_ACPI_BLACKLIST_YEAR) && CONFIG_ACPI_BLACKLIST_YEAR
>  
>  static int __init blacklist_by_year(void)
>  {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 7/12] acpi: fix another compile warning

2007-06-19 Thread Andreas Herrmann
Avoid compile warning if !ACPI_BLACKLIST_YEAR

  CC  drivers/acpi/blacklist.o
  drivers/acpi/blacklist.c:76:5: warning: "CONFIG_ACPI_BLACKLIST_YEAR" is not 
defined

Signed-off-by: Andreas Herrmann <[EMAIL PROTECTED]>
---
 drivers/acpi/blacklist.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c
index 3ec110c..ac96c47 100644
--- a/drivers/acpi/blacklist.c
+++ b/drivers/acpi/blacklist.c
@@ -73,7 +73,7 @@ static struct acpi_blacklist_item acpi_blacklist[] __initdata 
= {
{""}
 };
 
-#ifCONFIG_ACPI_BLACKLIST_YEAR
+#ifdefined(CONFIG_ACPI_BLACKLIST_YEAR) && CONFIG_ACPI_BLACKLIST_YEAR
 
 static int __init blacklist_by_year(void)
 {
-- 
1.5.0.7




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/