2020-07-07 07:07:43

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build warning after merge of the net-next tree

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")

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2020-07-07 07:26:30

by Vaibhav Gupta

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the net-next tree

On Tue, Jul 7, 2020 at 12:36 PM Stephen Rothwell <[email protected]> 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