Skip to content

Commit

Permalink
ksz884x: mark pcidev_suspend() as __maybe_unused
Browse files Browse the repository at this point in the history
In certain configurations without power management support, gcc report
the following warning:

drivers/net/ethernet/micrel/ksz884x.c:7182:12: warning:
 'pcidev_suspend' defined but not used [-Wunused-function]
 7182 | static int pcidev_suspend(struct device *dev_d)
      |            ^~~~~~~~~~~~~~

Mark pcidev_suspend() as __maybe_unused to make it clear.

Fixes: 6412061 ("ksz884x: use generic power management")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Wei Yongjun authored and David S. Miller committed Jul 2, 2020
1 parent 44947c0 commit ffa76e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/micrel/ksz884x.c
Original file line number Diff line number Diff line change
Expand Up @@ -7179,7 +7179,7 @@ static int __maybe_unused pcidev_resume(struct device *dev_d)
return 0;
}

static int pcidev_suspend(struct device *dev_d)
static int __maybe_unused pcidev_suspend(struct device *dev_d)
{
int i;
struct platform_info *info = dev_get_drvdata(dev_d);
Expand Down

0 comments on commit ffa76e3

Please sign in to comment.