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]
Message-ID: <BD79186B4FD85F4B8E60E381CAEE190901B77674@mi8nycmail19.Mi8.com>
Date:	Mon, 3 Aug 2009 18:17:29 -0400
From:	"H Hartley Sweeten" <hartleys@...ionengravers.com>
To:	"Andrew Morton" <akpm@...ux-foundation.org>
Cc:	<linux-kernel@...r.kernel.org>, <dbrownell@...rs.sourceforge.net>
Subject: RE: [PATCH] gpio: include <linux/gpio.h> not <asm/gpio.h>

On Monday, August 03, 2009 2:51 PM, Andrew Morton wrote:
>> Drivers should be including <linux/gpio.h> not <asm/gpio.h>.
>> 
>> Signed-off-by: H Hartley Sweeten <hsweeten@...ionengravers.com>
>> 
>> ---
>> 
>> diff --git a/drivers/gpio/bt8xxgpio.c b/drivers/gpio/bt8xxgpio.c
>> index 984b587..fd1c54d 100644
>> --- a/drivers/gpio/bt8xxgpio.c
>> +++ b/drivers/gpio/bt8xxgpio.c
>> @@ -46,8 +46,7 @@
>>  #include <linux/module.h>
>>  #include <linux/pci.h>
>>  #include <linux/spinlock.h>
>> -
>> -#include <asm/gpio.h>
>> +#include <linux/gpio.h>
>
> There's some potential for breakage here.  include/linux/gpio.h has
>
> #ifdef CONFIG_GENERIC_GPIO
> #include <asm/gpio.h>
>
> #else
> 
> ...
>
> #endif
>
>
> So if there's some configuration which forgot to set
> CONFIG_GENERIC_GPIO, the driver will be switched over to use the
> include/linux/gpio.h stubs and will break.
>
> Please convince me that this cannot happen ;)

Can't happen for these drivers.  Everything in drivers/gpio requires
GPIOLIB which selects GENERIC_GPIO.  Please see drivers/gpio/Kconfig.

Thanks,
Hartley


--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ