diff mbox

smc91x: commit 51ac3beffd4afaea4350526cf01fe74aaff25eff breaks compilation

Message ID 20081103.002021.124910044.davem@davemloft.net
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

David Miller Nov. 3, 2008, 8:20 a.m. UTC
From: Manuel Lauss <mano@roarinelk.homelinux.net>
Date: Mon, 3 Nov 2008 09:17:24 +0100

> That throws another error:
> 
> /mnt/work/sh7760/kernel/linux-2.6.git/drivers/net/smc91x.c: In function 'smc_request_attrib':
> /mnt/work/sh7760/kernel/linux-2.6.git/drivers/net/smc91x.c:2063: error: expected ',' or ';' before '__attribute__'
> /mnt/work/sh7760/kernel/linux-2.6.git/drivers/net/smc91x.c: In function 'smc_release_attrib':
> /mnt/work/sh7760/kernel/linux-2.6.git/drivers/net/smc91x.c:2078: error: expected ',' or ';' before '__attribute__'

Sorry, does this new version below work better?

I wish I could build this on sparc64 :-)

commit 55c8eb6c8eaa5009eed1557b296da5d4ea9c369a
Author: David S. Miller <davem@davemloft.net>
Date:   Mon Nov 3 00:04:24 2008 -0800

    SMC91x: Fix compilation on some platforms.
    
    This reverts 51ac3beffd4afaea4350526cf01fe74aaff25eff ('SMC91x: delete
    unused local variable "lp"') and adds __maybe_unused markers to these
    (potentially) unused variables.
    
    The issue is that in some configurations SMC_IO_SHIFT evaluates
    to '(lp->io_shift)', but in some others it's plain '0'.
    
    Based upon a build failure report from Manuel Lauss.
    
    Signed-off-by: David S. Miller <davem@davemloft.net>

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

Comments

Manuel Lauss Nov. 3, 2008, 8:26 a.m. UTC | #1
On Mon, Nov 03, 2008 at 12:20:21AM -0800, David Miller wrote:
> From: Manuel Lauss <mano@roarinelk.homelinux.net>
> Date: Mon, 3 Nov 2008 09:17:24 +0100
> 
> > That throws another error:
> > 
> > /mnt/work/sh7760/kernel/linux-2.6.git/drivers/net/smc91x.c: In function 'smc_request_attrib':
> > /mnt/work/sh7760/kernel/linux-2.6.git/drivers/net/smc91x.c:2063: error: expected ',' or ';' before '__attribute__'
> > /mnt/work/sh7760/kernel/linux-2.6.git/drivers/net/smc91x.c: In function 'smc_release_attrib':
> > /mnt/work/sh7760/kernel/linux-2.6.git/drivers/net/smc91x.c:2078: error: expected ',' or ';' before '__attribute__'
> 
> Sorry, does this new version below work better?

Aye, much better.
 
Thanks,
	Manuel Lauss
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Nov. 3, 2008, 8:28 a.m. UTC | #2
From: Manuel Lauss <mano@roarinelk.homelinux.net>
Date: Mon, 3 Nov 2008 09:26:35 +0100

> On Mon, Nov 03, 2008 at 12:20:21AM -0800, David Miller wrote:
> > From: Manuel Lauss <mano@roarinelk.homelinux.net>
> > Date: Mon, 3 Nov 2008 09:17:24 +0100
> > 
> > > That throws another error:
> > > 
> > > /mnt/work/sh7760/kernel/linux-2.6.git/drivers/net/smc91x.c: In function 'smc_request_attrib':
> > > /mnt/work/sh7760/kernel/linux-2.6.git/drivers/net/smc91x.c:2063: error: expected ',' or ';' before '__attribute__'
> > > /mnt/work/sh7760/kernel/linux-2.6.git/drivers/net/smc91x.c: In function 'smc_release_attrib':
> > > /mnt/work/sh7760/kernel/linux-2.6.git/drivers/net/smc91x.c:2078: error: expected ',' or ';' before '__attribute__'
> > 
> > Sorry, does this new version below work better?
> 
> Aye, much better.

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

Patch

diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
index 6f9895d..fc80f25 100644
--- a/drivers/net/smc91x.c
+++ b/drivers/net/smc91x.c
@@ -2060,6 +2060,7 @@  static int smc_request_attrib(struct platform_device *pdev,
 			      struct net_device *ndev)
 {
 	struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib");
+	struct smc_local *lp __maybe_unused = netdev_priv(ndev);
 
 	if (!res)
 		return 0;
@@ -2074,6 +2075,7 @@  static void smc_release_attrib(struct platform_device *pdev,
 			       struct net_device *ndev)
 {
 	struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib");
+	struct smc_local *lp __maybe_unused = netdev_priv(ndev);
 
 	if (res)
 		release_mem_region(res->start, ATTRIB_SIZE);