Re: [PATCH 28/30] dmaengine: tegra-apb: fix unused-function warnings

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

 



On 15/09/16 18:34, Vinod Koul wrote:
> when CONFIG_PM is not defined, the compiler warns
> 
>   CC      drivers/dma/tegra210-adma.o
> drivers/dma/tegra210-adma.c:635:12: warning: 'tegra_adma_runtime_suspend' defined but not used [-Wunused-function]
>  static int tegra_adma_runtime_suspend(struct device *dev)
>             ^
> drivers/dma/tegra210-adma.c:644:12: warning: 'tegra_adma_runtime_resume' defined but not used [-Wunused-function]
>  static int tegra_adma_runtime_resume(struct device *dev)
>             ^
> 
> Although driver uses SET_RUNTIME_PM_OPS but doesn't add protection for these
> symbols causing warning when CONFIG_PM is not defined, so add CONFIG_PM
> around these symbols.
> 
> Cc: Jon Hunter <jonathanh@xxxxxxxxxx>
> Signed-off-by: Vinod Koul <vinod.koul@xxxxxxxxx>
> ---
>  drivers/dma/tegra210-adma.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/dma/tegra210-adma.c b/drivers/dma/tegra210-adma.c
> index c4b121c4559d..e8ee6f95ddb2 100644
> --- a/drivers/dma/tegra210-adma.c
> +++ b/drivers/dma/tegra210-adma.c
> @@ -632,6 +632,7 @@ static struct dma_chan *tegra_dma_of_xlate(struct of_phandle_args *dma_spec,
>  	return chan;
>  }
>  
> +#ifdef CONFIG_PM
>  static int tegra_adma_runtime_suspend(struct device *dev)
>  {
>  	struct tegra_adma *tdma = dev_get_drvdata(dev);
> @@ -654,6 +655,7 @@ static int tegra_adma_runtime_resume(struct device *dev)
>  
>  	return 0;
>  }
> +#endif
>  
>  static const struct tegra_adma_chip_data tegra210_chip_data = {
>  	.nr_channels = 22,

Can you fix the $subject to be "tegra-adma"? Otherwise ...

Acked-by: Jon Hunter <jonathanh@xxxxxxxxxx>

Cheers
Jon

-- 
nvpublic
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux