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, 20 Feb 2008 10:42:44 -0500 (EST)
From:	Nicolas Pitre <nico@....org>
To:	Magnus Damm <magnus.damm@...il.com>
Cc:	netdev@...r.kernel.org, lethal@...ux-sh.org,
	akpm@...ux-foundation.org
Subject: Re: [PATCH 01/04] smc91x: pass along private data

On Wed, 20 Feb 2008, Magnus Damm wrote:

> Pass a private data pointer to macros and functions. This makes it easy
> to later on make run time decisions. This patch does not change any logic.
> These changes should be optimized away during compilation.
> 
> Signed-off-by: Magnus Damm <damm@...l.co.jp>
> ---
> --- 0001/drivers/net/smc91x.c
> +++ work/drivers/net/smc91x.c	2008-02-20 16:52:48.000000000 +0900
> @@ -220,23 +220,23 @@ static void PRINT_PKT(u_char *buf, int l
>  
>  
>  /* this enables an interrupt in the interrupt mask register */
> -#define SMC_ENABLE_INT(x) do {						\
> +#define SMC_ENABLE_INT(priv, x) do {					\
>  	unsigned char mask;						\
> -	spin_lock_irq(&lp->lock);					\
> -	mask = SMC_GET_INT_MASK();					\
> +	spin_lock_irq(&priv->lock);					\
> +	mask = SMC_GET_INT_MASK(priv);					\

Since "lp" is already used all over the place, could you simply use "lp" 
for the macro argument name as well instead of "priv"?  This will make 
the code more uniform and reduce the patch size.


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