public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bogus #if (acpi/blacklist)
@ 2005-09-09 16:07 viro
  2005-09-09 16:19 ` Eric Piel
  0 siblings, 1 reply; 9+ messages in thread
From: viro @ 2005-09-09 16:07 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
----
diff -urN RC13-git8-base/drivers/acpi/blacklist.c current/drivers/acpi/blacklist.c
--- RC13-git8-base/drivers/acpi/blacklist.c	2005-09-08 23:42:49.000000000 -0400
+++ current/drivers/acpi/blacklist.c	2005-09-09 11:28:44.000000000 -0400
@@ -73,7 +73,7 @@
 	{""}
 };
 
-#if	CONFIG_ACPI_BLACKLIST_YEAR
+#ifdef	CONFIG_ACPI_BLACKLIST_YEAR
 
 static int __init blacklist_by_year(void)
 {

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

* Re: [PATCH] bogus #if (acpi/blacklist)
  2005-09-09 16:07 [PATCH] bogus #if (acpi/blacklist) viro
@ 2005-09-09 16:19 ` Eric Piel
  2005-09-09 16:43   ` viro
  0 siblings, 1 reply; 9+ messages in thread
From: Eric Piel @ 2005-09-09 16:19 UTC (permalink / raw)
  To: viro; +Cc: Linus Torvalds, linux-kernel

09/09/2005 06:07 PM, viro@zeniv.linux.org.uk wrote/a écrit:
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> ----
> diff -urN RC13-git8-base/drivers/acpi/blacklist.c current/drivers/acpi/blacklist.c
> --- RC13-git8-base/drivers/acpi/blacklist.c	2005-09-08 23:42:49.000000000 -0400
> +++ current/drivers/acpi/blacklist.c	2005-09-09 11:28:44.000000000 -0400
> @@ -73,7 +73,7 @@
>  	{""}
>  };
>  
> -#if	CONFIG_ACPI_BLACKLIST_YEAR
> +#ifdef	CONFIG_ACPI_BLACKLIST_YEAR
>  
>  static int __init blacklist_by_year(void)
>  {

Are you sure about this? IIRC, CONFIG_ACPI_BLACKLIST_YEAR is defined to 
0 when it should not be blacklisted. In drivers/acpi/Kconfig :
     Enter 0 to disable this mechanism and allow ACPI to
     run by default no matter what the year.  (default)


Eric

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

* Re: [PATCH] bogus #if (acpi/blacklist)
  2005-09-09 16:19 ` Eric Piel
@ 2005-09-09 16:43   ` viro
  2005-09-09 16:55     ` Roman Zippel
  0 siblings, 1 reply; 9+ messages in thread
From: viro @ 2005-09-09 16:43 UTC (permalink / raw)
  To: Eric Piel; +Cc: Linus Torvalds, linux-kernel, zippel

On Fri, Sep 09, 2005 at 06:19:02PM +0200, Eric Piel wrote:
> 09/09/2005 06:07 PM, viro@zeniv.linux.org.uk wrote/a ??crit:
> >Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> >----
> >diff -urN RC13-git8-base/drivers/acpi/blacklist.c 
> >current/drivers/acpi/blacklist.c
> >--- RC13-git8-base/drivers/acpi/blacklist.c	2005-09-08 
> >23:42:49.000000000 -0400
> >+++ current/drivers/acpi/blacklist.c	2005-09-09 11:28:44.000000000 -0400
> >@@ -73,7 +73,7 @@
> > 	{""}
> > };
> > 
> >-#if	CONFIG_ACPI_BLACKLIST_YEAR
> >+#ifdef	CONFIG_ACPI_BLACKLIST_YEAR
> > 
> > static int __init blacklist_by_year(void)
> > {
> 
> Are you sure about this? IIRC, CONFIG_ACPI_BLACKLIST_YEAR is defined to 
> 0 when it should not be blacklisted. In drivers/acpi/Kconfig :
>     Enter 0 to disable this mechanism and allow ACPI to
>     run by default no matter what the year.  (default)

Hmm....  Oh, lovely - so we have that non-zero if set, 0 if it's i386 or
amd64 and not set and not defined if it's ia64 and not set.

Sigh...  It should be left as #if, of course, but I suspect that cleaner way to
deal with that would be (in Kconfig)

config ACPI_BLACKLIST_YEAR
        int "Disable ACPI for systems before Jan 1st this year" if X86
        default 0

Roman?

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

* Re: [PATCH] bogus #if (acpi/blacklist)
  2005-09-09 16:43   ` viro
@ 2005-09-09 16:55     ` Roman Zippel
  2005-09-09 17:31       ` viro
  2005-09-15 22:05       ` Len Brown
  0 siblings, 2 replies; 9+ messages in thread
From: Roman Zippel @ 2005-09-09 16:55 UTC (permalink / raw)
  To: viro; +Cc: Eric Piel, Linus Torvalds, linux-kernel

Hi,

On Fri, 9 Sep 2005 viro@ZenIV.linux.org.uk wrote:

> Sigh...  It should be left as #if, of course, but I suspect that cleaner way to
> deal with that would be (in Kconfig)
> 
> config ACPI_BLACKLIST_YEAR
>         int "Disable ACPI for systems before Jan 1st this year" if X86
>         default 0

That would be indeed the better fix.

bye, Roman

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

* Re: [PATCH] bogus #if (acpi/blacklist)
  2005-09-09 16:55     ` Roman Zippel
@ 2005-09-09 17:31       ` viro
  2005-09-15 22:05       ` Len Brown
  1 sibling, 0 replies; 9+ messages in thread
From: viro @ 2005-09-09 17:31 UTC (permalink / raw)
  To: Roman Zippel; +Cc: Eric Piel, Linus Torvalds, linux-kernel

On Fri, Sep 09, 2005 at 06:55:52PM +0200, Roman Zippel wrote:
> Hi,
> 
> On Fri, 9 Sep 2005 viro@ZenIV.linux.org.uk wrote:
> 
> > Sigh...  It should be left as #if, of course, but I suspect that cleaner way to
> > deal with that would be (in Kconfig)
> > 
> > config ACPI_BLACKLIST_YEAR
> >         int "Disable ACPI for systems before Jan 1st this year" if X86
> >         default 0
> 
> That would be indeed the better fix.
> 
> bye, Roman

There we go, then (replacement for original variant, _not_ an incremental):

diff -urN RC13-git8-base/drivers/acpi/Kconfig current/drivers/acpi/Kconfig
--- RC13-git8-base/drivers/acpi/Kconfig	2005-09-08 23:42:49.000000000 -0400
+++ current/drivers/acpi/Kconfig	2005-09-09 12:41:37.000000000 -0400
@@ -250,8 +250,7 @@
 	  Enter the full path name to the file wich includes the AmlCode declaration.
 
 config ACPI_BLACKLIST_YEAR
-	int "Disable ACPI for systems before Jan 1st this year"
-	depends on X86
+	int "Disable ACPI for systems before Jan 1st this year" if X86
 	default 0
 	help
 	  enter a 4-digit year, eg. 2001 to disable ACPI by default

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

* Re: [PATCH] bogus #if (acpi/blacklist)
  2005-09-09 16:55     ` Roman Zippel
  2005-09-09 17:31       ` viro
@ 2005-09-15 22:05       ` Len Brown
  2005-09-22  5:14         ` Randy.Dunlap
  1 sibling, 1 reply; 9+ messages in thread
From: Len Brown @ 2005-09-15 22:05 UTC (permalink / raw)
  To: Roman Zippel; +Cc: viro, Eric Piel, Linus Torvalds, linux-kernel

On Fri, 2005-09-09 at 12:55 -0400, Roman Zippel wrote:
> Hi,
> 
> On Fri, 9 Sep 2005 viro@ZenIV.linux.org.uk wrote:
> 
> > Sigh...  It should be left as #if, of course, but I suspect that
> cleaner way to
> > deal with that would be (in Kconfig)
> >
> > config ACPI_BLACKLIST_YEAR
> >         int "Disable ACPI for systems before Jan 1st this year" if
> X86
> >         default 0
> 
> That would be indeed the better fix.

The real bug is that drivers/acpi/blacklist.c (the only place
CONFIG_ACPI_BLACLIST_YEAR is referenced) is compiled for non X86.

-Len



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

* Re: [PATCH] bogus #if (acpi/blacklist)
  2005-09-15 22:05       ` Len Brown
@ 2005-09-22  5:14         ` Randy.Dunlap
  2005-09-22  5:15           ` Al Viro
  0 siblings, 1 reply; 9+ messages in thread
From: Randy.Dunlap @ 2005-09-22  5:14 UTC (permalink / raw)
  To: Len Brown; +Cc: zippel, viro, Eric.Piel, torvalds, linux-kernel

On Thu, 15 Sep 2005 18:05:15 -0400 Len Brown wrote:

> On Fri, 2005-09-09 at 12:55 -0400, Roman Zippel wrote:
> > Hi,
> > 
> > On Fri, 9 Sep 2005 viro@ZenIV.linux.org.uk wrote:
> > 
> > > Sigh...  It should be left as #if, of course, but I suspect that
> > cleaner way to
> > > deal with that would be (in Kconfig)
> > >
> > > config ACPI_BLACKLIST_YEAR
> > >         int "Disable ACPI for systems before Jan 1st this year" if
> > X86
> > >         default 0
> > 
> > That would be indeed the better fix.
> 
> The real bug is that drivers/acpi/blacklist.c (the only place
> CONFIG_ACPI_BLACLIST_YEAR is referenced) is compiled for non X86.

You want this then?
---

From: Randy Dunlap <rdunlap@xenotime.net>

Only build drivers/acpi/blacklist.o on X86 (includes X86_64).

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---

 drivers/acpi/Makefile |    2 ++
 1 files changed, 2 insertions(+)

diff -Naurp linux-2614-rc2/drivers/acpi/Makefile~blacklist_x86 linux-2614-rc2/drivers/acpi/Makefile
--- linux-2614-rc2/drivers/acpi/Makefile~blacklist_x86	2005-09-21 22:11:23.000000000 -0700
+++ linux-2614-rc2/drivers/acpi/Makefile	2005-09-21 22:11:41.000000000 -0700
@@ -16,7 +16,9 @@ EXTRA_CFLAGS	+= $(ACPI_CFLAGS)
 # ACPI Boot-Time Table Parsing
 #
 obj-y				+= tables.o
+ifdef CONFIG_X86
 obj-y				+= blacklist.o
+endif
 
 #
 # ACPI Core Subsystem (Interpreter)

---

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

* Re: [PATCH] bogus #if (acpi/blacklist)
  2005-09-22  5:14         ` Randy.Dunlap
@ 2005-09-22  5:15           ` Al Viro
  0 siblings, 0 replies; 9+ messages in thread
From: Al Viro @ 2005-09-22  5:15 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: Len Brown, zippel, viro, Eric.Piel, torvalds, linux-kernel

On Wed, Sep 21, 2005 at 10:14:26PM -0700, Randy.Dunlap wrote:
>  obj-y				+= tables.o
> +ifdef CONFIG_X86
>  obj-y				+= blacklist.o
> +endif

More common form would be

obj-$(CONFIG_X86)	+= blacklist.o

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

* RE: [PATCH] bogus #if (acpi/blacklist)
@ 2005-09-22  5:50 Brown, Len
  0 siblings, 0 replies; 9+ messages in thread
From: Brown, Len @ 2005-09-22  5:50 UTC (permalink / raw)
  To: Al Viro, Randy.Dunlap; +Cc: zippel, viro, Eric.Piel, torvalds, linux-kernel

applied.

thanks,
-Len 

>-----Original Message-----
>From: Al Viro [mailto:viro@ftp.linux.org.uk] 
>Sent: Thursday, September 22, 2005 1:16 AM
>To: Randy.Dunlap
>Cc: Brown, Len; zippel@linux-m68k.org; 
>viro@ZenIV.linux.org.uk; Eric.Piel@lifl.fr; torvalds@osdl.org; 
>linux-kernel@vger.kernel.org
>Subject: Re: [PATCH] bogus #if (acpi/blacklist)
>
>On Wed, Sep 21, 2005 at 10:14:26PM -0700, Randy.Dunlap wrote:
>>  obj-y				+= tables.o
>> +ifdef CONFIG_X86
>>  obj-y				+= blacklist.o
>> +endif
>
>More common form would be
>
>obj-$(CONFIG_X86)	+= blacklist.o
>

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

end of thread, other threads:[~2005-09-22  5:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-09 16:07 [PATCH] bogus #if (acpi/blacklist) viro
2005-09-09 16:19 ` Eric Piel
2005-09-09 16:43   ` viro
2005-09-09 16:55     ` Roman Zippel
2005-09-09 17:31       ` viro
2005-09-15 22:05       ` Len Brown
2005-09-22  5:14         ` Randy.Dunlap
2005-09-22  5:15           ` Al Viro
  -- strict thread matches above, loose matches on Subject: below --
2005-09-22  5:50 Brown, Len

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