From: "Neftin, Sasha" <sasha.neftin@intel.com>
To: Palmer Dabbelt <palmer@dabbelt.com>, davem@davemloft.net
Cc: netdev@vger.kernel.org, Palmer Dabbelt <palmerdabbelt@google.com>,
linux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org,
kuba@kernel.org, kernel-team@android.com, "Neftin,
Sasha" <sasha.neftin@intel.com>,
vitaly.lifshits@intel.com, amir.avivi@intel.com
Subject: Re: [Intel-wired-lan] [PATCH] e1000e: Squash an unused function warning
Date: Wed, 10 Jun 2020 19:18:02 +0300 [thread overview]
Message-ID: <8b01c6d6-db4d-d05c-d8cd-733cec31094e@intel.com> (raw)
In-Reply-To: <20200610014907.148473-1-palmer@dabbelt.com>
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
>
prev parent reply other threads:[~2020-06-10 16:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-10 1:49 Palmer Dabbelt
2020-06-10 16:18 ` Neftin, Sasha [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8b01c6d6-db4d-d05c-d8cd-733cec31094e@intel.com \
--to=sasha.neftin@intel.com \
--cc=amir.avivi@intel.com \
--cc=davem@davemloft.net \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kernel-team@android.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=palmer@dabbelt.com \
--cc=palmerdabbelt@google.com \
--cc=vitaly.lifshits@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®