On Tue, Jul 7, 2020 at 12:36 PM Stephen Rothwell <s...@canb.auug.org.au> wrote:
>
> Hi all,
>
> After merging the net-next tree, today's linux-next build (sparc64
> defconfig) produced this warning:
>
> drivers/net/ethernet/sun/niu.c:9903:12: warning: 'niu_resume' defined but not 
> used [-Wunused-function]
>  static int niu_resume(struct device *dev_d)
>             ^~~~~~~~~~
> drivers/net/ethernet/sun/niu.c:9876:12: warning: 'niu_suspend' defined but 
> not used [-Wunused-function]
>  static int niu_suspend(struct device *dev_d)
>             ^~~~~~~~~~~
>
> Introduced by commit
>
>   b0db0cc2f695 ("sun/niu: use generic power management")
This warning should not have come as the earlier definition of.suspend() and
.resume(), they were not inside "#ifdef CONFIG_PM" container. Or any other
container. Hence I thought adding the "__maybe_unused" attribute to them
would be unnecessary.

I am sending a patch to do the same.

-- Vaibhav Gupta
>
> --
> Cheers,
> Stephen Rothwell

Reply via email to