All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ramon Fried <rfried.dev@gmail.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>,
	Joe Hershberger <joe.hershberger@ni.com>,
	Bin Meng <bmeng.cn@gmail.com>
Subject: Re: [PATCH] net: tsec: mark tsec_set_promisc() as __maybe_unused
Date: Wed, 3 Nov 2021 08:57:45 +0200	[thread overview]
Message-ID: <CAGi-RU+PgvY-qZFE-80-g+1bw1J1K=pNaKO4bx_jdTRHD-3fsg@mail.gmail.com> (raw)
In-Reply-To: <20211031215158.4028047-1-vladimir.oltean@nxp.com>

On Sun, Oct 31, 2021 at 11:52 PM Vladimir Oltean
<vladimir.oltean@nxp.com> wrote:
>
> Since the tsec driver supports both configurations with and without
> DM_ETH, and since the eth_ops :: set_promisc() method is only provided
> for DM_ETH, the implication is that builds with DM_ETH disabled will
> result in a 'defined but not used' warning.
>
> To silence those, mark the function as __maybe_unused.
>
> Fixes: 79ba3435f43d ("net: tsec: add support for promiscuous mode")
> Reported-by: Ramon Fried <rfried.dev@gmail.com>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> ---
>  drivers/net/tsec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c
> index 4354753cab9c..64bb42b0c006 100644
> --- a/drivers/net/tsec.c
> +++ b/drivers/net/tsec.c
> @@ -156,7 +156,7 @@ static int tsec_mcast_addr(struct udevice *dev, const u8 *mcast_mac, int join)
>         return 0;
>  }
>
> -static int tsec_set_promisc(struct udevice *dev, bool enable)
> +static int __maybe_unused tsec_set_promisc(struct udevice *dev, bool enable)
>  {
>         struct tsec_private *priv = dev_get_priv(dev);
>         struct tsec __iomem *regs = priv->regs;
> --
> 2.25.1
>
Hi.
I will alter your original patch with this addition, as it wasn't merged yet.
We should have all our commits pass compilation.
Thanks,
Ramon

      reply	other threads:[~2021-11-03  6:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-31 21:51 [PATCH] net: tsec: mark tsec_set_promisc() as __maybe_unused Vladimir Oltean
2021-11-03  6:57 ` Ramon Fried [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='CAGi-RU+PgvY-qZFE-80-g+1bw1J1K=pNaKO4bx_jdTRHD-3fsg@mail.gmail.com' \
    --to=rfried.dev@gmail.com \
    --cc=bmeng.cn@gmail.com \
    --cc=joe.hershberger@ni.com \
    --cc=u-boot@lists.denx.de \
    --cc=vladimir.oltean@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.