2021-03-17 07:58:15

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/intel/e1000e/netdev.c:6926:12: warning: 'e1000e_pm_prepare' defined but not used [-Wunused-function]
static int e1000e_pm_prepare(struct device *dev)
^~~~~~~~~~~~~~~~~

Introduced by commit

ccf8b940e5fd ("e1000e: Leverage direct_complete to speed up s2ram")

CONFIG_PM_SLEEP is not set for this build.

--
Cheers,
Stephen Rothwell


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

2021-03-17 08:18:56

by Chen Yu

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

Hi Stephen,
On Wed, Mar 17, 2021 at 06:56:05PM +1100, Stephen Rothwell wrote:
> Hi all,
>
> After merging the net-next tree, today's linux-next build (sparc64
> defconfig) produced this warning:
>
> drivers/net/ethernet/intel/e1000e/netdev.c:6926:12: warning: 'e1000e_pm_prepare' defined but not used [-Wunused-function]
> static int e1000e_pm_prepare(struct device *dev)
> ^~~~~~~~~~~~~~~~~
>
> Introduced by commit
>
> ccf8b940e5fd ("e1000e: Leverage direct_complete to speed up s2ram")
>
> CONFIG_PM_SLEEP is not set for this build.
>
Thanks for reporting. I think we need to add the '__maybe_unused' attribute as in case
CONFIG_PM_SLEEP is not set. Tony, it seems that the original v1 patch should eliminate
this warning, could you please help double check and apply that version?

thanks,
Chenyu

> --
> Cheers,
> Stephen Rothwell