Re: [PATCH] drm/rockchip: fix a -Werror fail on !CONFIG_PM_SLEEP

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

 



Hi Adam,

On Sonntag, 12. September 2021 23:29:35 CEST Adam Borowski wrote:
> Signed-off-by: Adam Borowski <kilobyte@xxxxxxxxxx>
> ---
>  With Linus suddenly loving -Werror, let's get clean.
> 
>  drivers/gpu/drm/rockchip/cdn-dp-core.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c
> b/drivers/gpu/drm/rockchip/cdn-dp-core.c index 8ab3247dbc4a..bee0f2d2a9be
> 100644
> --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
> +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
> @@ -1123,6 +1123,7 @@ static int cdn_dp_suspend(struct device *dev)
>  	return ret;
>  }
> 
> +#ifdef CONFIG_PM_SLEEP

I think we prefer the function attribute __maybe_unused here, because it also 
makes sure to get rid of the warning for any functions it references.

>  static int cdn_dp_resume(struct device *dev)
>  {
>  	struct cdn_dp_device *dp = dev_get_drvdata(dev);
> @@ -1135,6 +1136,7 @@ static int cdn_dp_resume(struct device *dev)
> 
>  	return 0;
>  }
> +#endif
> 
>  static int cdn_dp_probe(struct platform_device *pdev)
>  {

Regards,
Nicolas Frattaroli





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux