提交 55c8eb6c 编写于 作者: D David S. Miller

SMC91x: Fix compilation on some platforms.

This reverts 51ac3bef ('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: NDavid S. Miller <davem@davemloft.net>
上级 0856f939
...@@ -2060,6 +2060,7 @@ static int smc_request_attrib(struct platform_device *pdev, ...@@ -2060,6 +2060,7 @@ static int smc_request_attrib(struct platform_device *pdev,
struct net_device *ndev) struct net_device *ndev)
{ {
struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib"); struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib");
struct smc_local *lp __maybe_unused = netdev_priv(ndev);
if (!res) if (!res)
return 0; return 0;
...@@ -2074,6 +2075,7 @@ static void smc_release_attrib(struct platform_device *pdev, ...@@ -2074,6 +2075,7 @@ static void smc_release_attrib(struct platform_device *pdev,
struct net_device *ndev) struct net_device *ndev)
{ {
struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib"); struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib");
struct smc_local *lp __maybe_unused = netdev_priv(ndev);
if (res) if (res)
release_mem_region(res->start, ATTRIB_SIZE); release_mem_region(res->start, ATTRIB_SIZE);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册