OSDN Git Service

ksz884x: mark pcidev_suspend() as __maybe_unused
authorWei Yongjun <weiyongjun1@huawei.com>
Thu, 2 Jul 2020 09:18:10 +0000 (17:18 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 2 Jul 2020 21:23:32 +0000 (14:23 -0700)
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: 64120615d140 ("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>
drivers/net/ethernet/micrel/ksz884x.c

index 2490134..2ce7304 100644 (file)
@@ -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);