All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Martyn Welch <martyn.welch@collabora.com>
Cc: Claudiu Manoil <claudiu.manoil@nxp.com>,
	Vladimir Oltean <vladimir.oltean@nxp.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	kernel@collabora.com, Vadim Fedorenko <vadim.fedorenko@linux.dev>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v3] net: enetc: Replace ifdef with IS_ENABLED
Date: Fri, 6 Sep 2024 18:20:35 -0700	[thread overview]
Message-ID: <20240906182035.57c478bf@kernel.org> (raw)
In-Reply-To: <20240904105143.2444106-1-martyn.welch@collabora.com>

On Wed,  4 Sep 2024 11:51:41 +0100 Martyn Welch wrote:
> -#ifdef CONFIG_FSL_ENETC_PTP_CLOCK
> -static void enetc_get_rx_tstamp(struct net_device *ndev,
> -				union enetc_rx_bd *rxbd,
> -				struct sk_buff *skb)
> +static void __maybe_unused enetc_get_rx_tstamp(struct net_device *ndev,
> +					       union enetc_rx_bd *rxbd,
> +					       struct sk_buff *skb)

Are you sure you need the __maybe_used's ?
Nice thing about the IS_ENABLED() is that the code is still visible to
the compiler, even if dead code elimination removes it the compiler
shouldn't really warn about unused code.
-- 
pw-bot: cr

  parent reply	other threads:[~2024-09-07  1:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-04 10:51 [PATCH net-next v3] net: enetc: Replace ifdef with IS_ENABLED Martyn Welch
2024-09-04 11:11 ` Vadim Fedorenko
2024-09-04 11:13   ` Vladimir Oltean
2024-09-04 13:01     ` Vadim Fedorenko
2024-09-04 12:55 ` Vladimir Oltean
2024-09-07  1:20 ` Jakub Kicinski [this message]
2024-09-12 14:01   ` Martyn Welch

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=20240906182035.57c478bf@kernel.org \
    --to=kuba@kernel.org \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martyn.welch@collabora.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=vadim.fedorenko@linux.dev \
    --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.