Skip to content

Commit

Permalink
SMC91x: Fix compilation on some platforms.
Browse files Browse the repository at this point in the history
This reverts 51ac3be ('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>
  • Loading branch information
David S. Miller committed Nov 3, 2008
1 parent 0856f93 commit 55c8eb6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/smc91x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit 55c8eb6

Please sign in to comment.