From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Pitre Subject: Re: [PATCH 01/04] smc91x: pass along private data Date: Wed, 20 Feb 2008 10:42:44 -0500 (EST) Message-ID: References: <20080220095740.22645.36783.sendpatchset@clockwork.opensource.se> <20080220095751.22645.15949.sendpatchset@clockwork.opensource.se> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Content-Transfer-Encoding: 7BIT Cc: netdev@vger.kernel.org, lethal@linux-sh.org, akpm@linux-foundation.org To: Magnus Damm Return-path: Received: from relais.videotron.ca ([24.201.245.36]:38901 "EHLO relais.videotron.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751728AbYBTPmp (ORCPT ); Wed, 20 Feb 2008 10:42:45 -0500 Received: from xanadu.home ([66.131.194.97]) by VL-MO-MR004.ip.videotron.ca (Sun Java(tm) System Messaging Server 6.3-4.01 (built Aug 3 2007; 32bit)) with ESMTP id <0JWJ00BNTNN8S580@VL-MO-MR004.ip.videotron.ca> for netdev@vger.kernel.org; Wed, 20 Feb 2008 10:42:44 -0500 (EST) In-reply-to: <20080220095751.22645.15949.sendpatchset@clockwork.opensource.se> Sender: netdev-owner@vger.kernel.org List-ID: 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 > --- > --- 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