* [PATCH] e1000e: add ifdef to avoid dead code
@ 2020-06-14 6:11 Greg Thelen
2020-06-16 14:53 ` Eric Dumazet
0 siblings, 1 reply; 3+ messages in thread
From: Greg Thelen @ 2020-06-14 6:11 UTC (permalink / raw)
To: Jeff Kirsher, David S. Miller, Jakub Kicinski, Vitaly Lifshits
Cc: intel-wired-lan, netdev, linux-kernel, Greg Thelen
Commit e086ba2fccda ("e1000e: disable s0ix entry and exit flows for ME
systems") added e1000e_check_me() but it's only called from
CONFIG_PM_SLEEP protected code. Thus builds without CONFIG_PM_SLEEP
see:
drivers/net/ethernet/intel/e1000e/netdev.c:137:13: warning: 'e1000e_check_me' defined but not used [-Wunused-function]
Add CONFIG_PM_SLEEP ifdef guard to avoid dead code.
Fixes: e086ba2fccda ("e1000e: disable s0ix entry and exit flows for ME systems")
Signed-off-by: Greg Thelen <gthelen@google.com>
---
drivers/net/ethernet/intel/e1000e/netdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index a279f4fa9962..165f0aea22c9 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -107,6 +107,7 @@ static const struct e1000_reg_info e1000_reg_info_tbl[] = {
{0, NULL}
};
+#ifdef CONFIG_PM_SLEEP
struct e1000e_me_supported {
u16 device_id; /* supported device ID */
};
@@ -145,6 +146,7 @@ static bool e1000e_check_me(u16 device_id)
return false;
}
+#endif /* CONFIG_PM_SLEEP */
/**
* __ew32_prepare - prepare to write to MAC CSR register on certain parts
--
2.27.0.290.gba653c62da-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] e1000e: add ifdef to avoid dead code
2020-06-14 6:11 [PATCH] e1000e: add ifdef to avoid dead code Greg Thelen
@ 2020-06-16 14:53 ` Eric Dumazet
2020-06-16 21:20 ` Kirsher, Jeffrey T
0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2020-06-16 14:53 UTC (permalink / raw)
To: Greg Thelen, Jeff Kirsher, David S. Miller, Jakub Kicinski,
Vitaly Lifshits
Cc: intel-wired-lan, netdev, linux-kernel
On 6/13/20 11:11 PM, Greg Thelen wrote:
> Commit e086ba2fccda ("e1000e: disable s0ix entry and exit flows for ME
> systems") added e1000e_check_me() but it's only called from
> CONFIG_PM_SLEEP protected code. Thus builds without CONFIG_PM_SLEEP
> see:
> drivers/net/ethernet/intel/e1000e/netdev.c:137:13: warning: 'e1000e_check_me' defined but not used [-Wunused-function]
>
> Add CONFIG_PM_SLEEP ifdef guard to avoid dead code.
>
> Fixes: e086ba2fccda ("e1000e: disable s0ix entry and exit flows for ME systems")
> Signed-off-by: Greg Thelen <gthelen@google.com>
> ---
> drivers/net/ethernet/intel/e1000e/netdev.c | 2 ++
> 1 file changed, 2 insertions(+)
Reviewed-by: Eric Dumazet <edumazet@google.com>
Thanks Greg
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] e1000e: add ifdef to avoid dead code
2020-06-16 14:53 ` Eric Dumazet
@ 2020-06-16 21:20 ` Kirsher, Jeffrey T
0 siblings, 0 replies; 3+ messages in thread
From: Kirsher, Jeffrey T @ 2020-06-16 21:20 UTC (permalink / raw)
To: Eric Dumazet, Greg Thelen, David S. Miller, Jakub Kicinski,
Lifshits, Vitaly
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
> -----Original Message-----
> From: Eric Dumazet <eric.dumazet@gmail.com>
> On 6/13/20 11:11 PM, Greg Thelen wrote:
> > Commit e086ba2fccda ("e1000e: disable s0ix entry and exit flows for ME
> > systems") added e1000e_check_me() but it's only called from
> > CONFIG_PM_SLEEP protected code. Thus builds without CONFIG_PM_SLEEP
> > see:
> > drivers/net/ethernet/intel/e1000e/netdev.c:137:13: warning:
> > 'e1000e_check_me' defined but not used [-Wunused-function]
> >
> > Add CONFIG_PM_SLEEP ifdef guard to avoid dead code.
> >
> > Fixes: e086ba2fccda ("e1000e: disable s0ix entry and exit flows for ME
> > systems")
> > Signed-off-by: Greg Thelen <gthelen@google.com>
> > ---
> > drivers/net/ethernet/intel/e1000e/netdev.c | 2 ++
> > 1 file changed, 2 insertions(+)
>
> Reviewed-by: Eric Dumazet <edumazet@google.com>
[Kirsher, Jeffrey T]
This patch is not necessary, after Arnd's patch. Here is his patch:
http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200527134716.948148-1-arnd@arndb.de/
and I will be pushing it to Dave's net tree later tonight.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-06-16 21:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-14 6:11 [PATCH] e1000e: add ifdef to avoid dead code Greg Thelen
2020-06-16 14:53 ` Eric Dumazet
2020-06-16 21:20 ` Kirsher, Jeffrey T
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).