Re: [PATCH] PCI: pcie-rcar: Mark rcar_pcie_resume() with __maybe_unused

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Apr 26, 2020 at 02:31:15PM +0200, marek.vasut@xxxxxxxxx wrote:
> From: Marek Vasut <marek.vasut+renesas@xxxxxxxxx>
> 
> If CONFIG_PM_SLEEP is not set, SET_SYSTEM_SLEEP_PM_OPS() is expanded to
> empty macro and there is no reference to rcar_pcie_resume(), hence the
> following warning is generated:
> 
> drivers/pci/controller/pcie-rcar.c:1253:12: warning: ‘rcar_pcie_resume’ defined but not used [-Wunused-function]
>  1253 | static int rcar_pcie_resume(struct device *dev)
>       |            ^~~~~~~~~~~~~~~~
> 
> Fix this by marking this function as __maybe_unused , just like in
> commit 226e6b866d74 ("gpio: pch: Convert to dev_pm_ops")
> 
> Signed-off-by: Marek Vasut <marek.vasut+renesas@xxxxxxxxx>
> Reported-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
> Cc: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@xxxxxxx>
> Cc: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> Cc: Wolfram Sang <wsa@xxxxxxxxxxxxx>
> Cc: linux-renesas-soc@xxxxxxxxxxxxxxx
> ---
> NOTE: Based on git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git
>       branch pci/rcar
> NOTE: The driver tag is now 'pcie-rcar' to distinguish it from pci-rcar-gen2.c

I hope Lorenzo will squash this into the original commit.  I don't
think it adds anything useful to keep it as a separate commit.

> ---
>  drivers/pci/controller/pcie-rcar.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/controller/pcie-rcar.c b/drivers/pci/controller/pcie-rcar.c
> index b58dfe415cb3..1a0e74cad9bb 100644
> --- a/drivers/pci/controller/pcie-rcar.c
> +++ b/drivers/pci/controller/pcie-rcar.c
> @@ -1250,7 +1250,7 @@ static int rcar_pcie_probe(struct platform_device *pdev)
>  	return err;
>  }
>  
> -static int rcar_pcie_resume(struct device *dev)
> +static int __maybe_unused rcar_pcie_resume(struct device *dev)
>  {
>  	struct rcar_pcie *pcie = dev_get_drvdata(dev);
>  	int (*hw_init_fn)(struct rcar_pcie *);
> -- 
> 2.25.1
> 



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux