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:	Wed, 24 Sep 2008 22:14:45 -0400
From:	Jeff Garzik <jeff@...zik.org>
To:	Steve Glendinning <steve.glendinning@...c.com>
CC:	netdev@...r.kernel.org, Ian Saturley <ian.saturley@...c.com>,
	David Brownell <dbrownell@...rs.sourceforge.net>
Subject: Re: [PATCH 1/1] usbnet: allow type check of devdbg arguments in non-debug
 build

Steve Glendinning wrote:
> improve usbnet's devdbg to always type-check diagnostic arguments,
> like dev_dbg (device.h).  This makes no change to the resulting size of
> usbnet modules.
> 
> Signed-off-by: Steve Glendinning <steve.glendinning@...c.com>
> ---
>  include/linux/usb/usbnet.h |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
> index ba09fe8..7d38222 100644
> --- a/include/linux/usb/usbnet.h
> +++ b/include/linux/usb/usbnet.h
> @@ -197,7 +197,9 @@ extern int usbnet_nway_reset(struct net_device *net);
>  #define devdbg(usbnet, fmt, arg...) \
>  	printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , ## arg)
>  #else
> -#define devdbg(usbnet, fmt, arg...) do {} while(0)
> +#define devdbg(usbnet, fmt, arg...) \
> +	({ if (0) printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , \
> +		## arg); 0; })
>  #endif

applied


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ