lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 29 May 2008 14:17:37 -0500 (CDT)
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	jkosina@...e.cz, Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:	Stephen Rothwell <sfr@...b.auug.org.au>,
	lkml <linux-kernel@...r.kernel.org>, linux-next@...r.kernel.org,
	akpm <akpm@...ux-foundation.org>
Subject: Re: [PATCH linux-next] serio: add ifdef for i8042 build fix

--- Original Message ---
> Hi Randy,
> 
> On Thu, May 29, 2008 at 09:56:33AM -0700, Randy Dunlap wrote:
> > From: Randy Dunlap <randy.dunlap@...cle.com>
> > 
> > Restrict variable usage by bounding it with ifdef/endif CONFIG_PNP.
> > 
> > linux-next-20080529/drivers/input/serio/i8042-x86ia64io.h:590: error: 'i8042_nopnp' undeclared (first use in this function)
> > 
> 
> Thank you for the report. I'd rahther changed it as in the
> patch below.
> What do you think?

It builds.  Other than that, it doesn't matter much to me.

> If everyone agrees then I will fold it in Jiri's original patch
> to keep the trees bisectable.

Yes, very desirable.

> 
> -- 
> Dmitry
> 
> diff --git a/drivers/input/serio/i8042-x86ia64io.h
> b/drivers/input/serio/i8042-x86ia64io.h
> index 709c9d9..2289e3a 100644
> --- a/drivers/input/serio/i8042-x86ia64io.h
> +++ b/drivers/input/serio/i8042-x86ia64io.h
> @@ -63,7 +63,7 @@ static inline void i8042_write_command(int
> val)
>  	outb(val, I8042_COMMAND_REG);
>  }
>  
> -#if defined(__i386__) || defined(__x86_64__)
> +#ifdef CONFIG_X86
>  
>  #include <linux/dmi.h>
>  
> @@ -287,6 +287,7 @@ static struct dmi_system_id __initdata
> i8042_dmi_nomux_table[] = {
>  	{ }
>  };
>  
> +#ifdef CONFIG_PNP
>  static struct dmi_system_id __initdata i8042_dmi_nopnp_table[]
> = {
>  	{
>  		.ident = "Intel MBO Desktop D845PESV",
> @@ -297,13 +298,8 @@ static struct dmi_system_id __initdata
> i8042_dmi_nopnp_table[] = {
>  	},
>  	{ }
>  };
> -
>  #endif
>  
> -#ifdef CONFIG_X86
> -
> -#include <linux/dmi.h>
> -
>  /*
>   * Some Wistron based laptops need us to explicitly enable
> the 'Dritek
>   * keyboard extension' to make their extra keys start generating
> scancodes.
> @@ -351,7 +347,6 @@ static struct dmi_system_id __initdata
> i8042_dmi_dritek_table[] = {
>  
>  #endif /* CONFIG_X86 */
>  
> -
>  #ifdef CONFIG_PNP
>  #include <linux/pnp.h>
>  
> @@ -461,6 +456,11 @@ static int __init i8042_pnp_init(void)
>  	int pnp_data_busted = 0;
>  	int err;
>  
> +#ifdef CONFIG_X86
> +	if (dmi_check_system(i8042_dmi_nopnp_table))
> +		i8042_nopnp = 1;
> +#endif
> +
>  	if (i8042_nopnp) {
>  		printk(KERN_INFO "i8042: PNP detection disabled\n");
>  		return 0;
> @@ -578,10 +578,6 @@ static int __init i8042_platform_init(void)
>  	i8042_kbd_irq = I8042_MAP_IRQ(1);
>  	i8042_aux_irq = I8042_MAP_IRQ(12);
>  
> -#if defined(__i386__) || defined(__x86_64__)
> -	if (dmi_check_system(i8042_dmi_nopnp_table))
> -		i8042_nopnp = 1;
> -#endif
>  	retval = i8042_pnp_init();
>  	if (retval)
>  		return retval;
> @@ -590,15 +586,13 @@ static int __init i8042_platform_init(void)
>          i8042_reset = 1;
>  #endif
>  
> -#if defined(__i386__) || defined(__x86_64__)
> +#ifdef CONFIG_X86
>  	if (dmi_check_system(i8042_dmi_noloop_table))
>  		i8042_noloop = 1;
>  
>  	if (dmi_check_system(i8042_dmi_nomux_table))
>  		i8042_nomux = 1;
> -#endif
>  
> -#ifdef CONFIG_X86
>  	if (dmi_check_system(i8042_dmi_dritek_table))
>  		i8042_dritek = 1;
>  #endif /* CONFIG_X86 */

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

Powered by blists - more mailing lists