]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
usb: cdns3: imx: mark cdns_imx_system_resume as __maybe_unused
authorWei Yongjun <weiyongjun1@huawei.com>
Wed, 10 Mar 2021 10:46:54 +0000 (10:46 +0000)
committerPeter Chen <peter.chen@kernel.org>
Mon, 12 Apr 2021 12:19:21 +0000 (20:19 +0800)
The function cdns_imx_system_resume() may have no callers depending
on configuration, so it must be marked __maybe_unused to avoid
harmless warning:

drivers/usb/cdns3/cdns3-imx.c:378:12: warning:
 'cdns_imx_system_resume' defined but not used [-Wunused-function]
  378 | static int cdns_imx_system_resume(struct device *dev)
      |            ^~~~~~~~~~~~~~~~~~~~~~

Fixes: 67982dfa59de ("usb: cdns3: imx: add power lost support for system resume")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Peter Chen <peter.chen@kernel.org>
drivers/usb/cdns3/cdns3-imx.c

index 708b51cc5844625cdf1862155886d5023d7e303c..74e758dc089555df6e9c0ef55249b07b81b6d857 100644 (file)
@@ -375,7 +375,7 @@ static inline bool cdns_imx_is_power_lost(struct cdns_imx *data)
                return false;
 }
 
-static int cdns_imx_system_resume(struct device *dev)
+static int __maybe_unused cdns_imx_system_resume(struct device *dev)
 {
        struct cdns_imx *data = dev_get_drvdata(dev);
        int ret;