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:	Fri, 22 May 2009 09:36:37 -0700
From:	Randy Dunlap <rdunlap@...otime.net>
To:	LKML <linux-kernel@...r.kernel.org>
CC:	Stephen Rothwell <sfr@...b.auug.org.au>,
	linux-next@...r.kernel.org, Greg KH <gregkh@...e.de>,
	Sebastian Haas <haas@...-wuensche.com>
Subject: Re: [PATCH -next] cpc-usb: fix PROC_FS dependency

Randy Dunlap wrote:
> From: Randy Dunlap <randy.dunlap@...cle.com>
> 
> The proper way to check for and enforce a kconfig symbol
> dependency is via Kconfig files, not by using #error in
> a source file followed by 9 other compile errors.
> 
> Signed-off-by: Randy Dunlap <randy.dunlap@...cle.com>
> Cc: Sebastian Haas <haas@...-wuensche.com>
> ---
>  drivers/staging/cpc-usb/Kconfig       |    2 +-
>  drivers/staging/cpc-usb/cpc-usb_drv.c |   10 +---------
>  2 files changed, 2 insertions(+), 10 deletions(-)
> 
> --- linux-next-20090522.orig/drivers/staging/cpc-usb/cpc-usb_drv.c
> +++ linux-next-20090522/drivers/staging/cpc-usb/cpc-usb_drv.c
> @@ -27,12 +27,8 @@
>  #include <linux/completion.h>
>  #include <asm/uaccess.h>
>  #include <linux/usb.h>
> -
>  #include <linux/version.h>
> -
> -#ifdef CONFIG_PROC_FS
> -#   include <linux/proc_fs.h>
> -#endif
> +#include <linux/proc_fs.h>
>  
>  #include "cpc.h"
>  
> @@ -57,10 +53,6 @@ MODULE_LICENSE("GPL v2");
>  #define USB_CPCUSB_M16C_PRODUCT_ID    0x0888
>  #define USB_CPCUSB_LPC2119_PRODUCT_ID 0x0444
>  
> -#ifndef CONFIG_PROC_FS
> -#error "PROCFS needed"
> -#endif
> -
>  #define CPC_USB_PROC_DIR     CPC_PROC_DIR "cpc-usb"
>  
>  static struct proc_dir_entry *procDir;
> --- linux-next-20090522.orig/drivers/staging/cpc-usb/Kconfig
> +++ linux-next-20090522/drivers/staging/cpc-usb/Kconfig
> @@ -1,4 +1,4 @@
>  config USB_CPC
>  	tristate "CPC CAN USB driver"
> -	depends on USB
> +	depends on USB && PROC_FS
>  	default n

BTW, I'm surprised that there is no NET or CAN dependency here.

-- 
~Randy
LPC 2009, Sept. 23-25, Portland, Oregon
http://linuxplumbersconf.org/2009/
--
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