* [PATCH] e1000e: Squash an unused function warning
@ 2020-06-10 1:49 Palmer Dabbelt
2020-06-10 16:18 ` [Intel-wired-lan] " Neftin, Sasha
0 siblings, 1 reply; 2+ messages in thread
From: Palmer Dabbelt @ 2020-06-10 1:49 UTC (permalink / raw)
To: davem
Cc: jeffrey.t.kirsher, kuba, intel-wired-lan, netdev, linux-kernel,
kernel-team, Palmer Dabbelt
From: Palmer Dabbelt <palmerdabbelt@google.com>
e1000e_check_me is only used under CONFIG_PM_SLEEP but exists
unconditionally, which triggers a warning.
Signed-off-by: Palmer Dabbelt <palmerdabbelt@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..f7148d1fcba2 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -134,6 +134,7 @@ static const struct e1000e_me_supported me_supported[] = {
{0}
};
+#ifdef CONFIG_PM_SLEEP
static bool e1000e_check_me(u16 device_id)
{
struct e1000e_me_supported *id;
@@ -145,6 +146,7 @@ static bool e1000e_check_me(u16 device_id)
return false;
}
+#endif
/**
* __ew32_prepare - prepare to write to MAC CSR register on certain parts
--
2.27.0.278.ge193c7cf3a9-goog
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [Intel-wired-lan] [PATCH] e1000e: Squash an unused function warning
2020-06-10 1:49 [PATCH] e1000e: Squash an unused function warning Palmer Dabbelt
@ 2020-06-10 16:18 ` Neftin, Sasha
0 siblings, 0 replies; 2+ messages in thread
From: Neftin, Sasha @ 2020-06-10 16:18 UTC (permalink / raw)
To: Palmer Dabbelt, davem
Cc: netdev, Palmer Dabbelt, linux-kernel, intel-wired-lan, kuba,
kernel-team, Neftin, Sasha, vitaly.lifshits, amir.avivi
On 6/10/2020 04:49, Palmer Dabbelt wrote:
> From: Palmer Dabbelt <palmerdabbelt@google.com>
>
> e1000e_check_me is only used under CONFIG_PM_SLEEP but exists
> unconditionally, which triggers a warning.
>
> Signed-off-by: Palmer Dabbelt <palmerdabbelt@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..f7148d1fcba2 100644
> --- a/drivers/net/ethernet/intel/e1000e/netdev.c
> +++ b/drivers/net/ethernet/intel/e1000e/netdev.c
> @@ -134,6 +134,7 @@ static const struct e1000e_me_supported me_supported[] = {
> {0}
> };
>
> +#ifdef CONFIG_PM_SLEEP
Thanks Palmer for catching this warning,
can we use "__maybe_unused" declaration instead of wrapping? I think it
is more convenient and consistent.
> static bool e1000e_check_me(u16 device_id)
> {
> struct e1000e_me_supported *id;
> @@ -145,6 +146,7 @@ static bool e1000e_check_me(u16 device_id)
>
> return false;
> }
> +#endif
>
> /**
> * __ew32_prepare - prepare to write to MAC CSR register on certain parts
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-10 16:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-10 1:49 [PATCH] e1000e: Squash an unused function warning Palmer Dabbelt
2020-06-10 16:18 ` [Intel-wired-lan] " Neftin, Sasha
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®