From: Martyn Welch <martyn.welch@collabora.com>
To: Jakub Kicinski <kuba@kernel.org>
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: Thu, 12 Sep 2024 15:01:25 +0100 [thread overview]
Message-ID: <0aa17b0eaf91334e9d3f989f04f264efae5f0b40.camel@collabora.com> (raw)
In-Reply-To: <20240906182035.57c478bf@kernel.org>
On Fri, 2024-09-06 at 18:20 -0700, Jakub Kicinski wrote:
> 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.
Hi Jakub,
I thought that was required, but upon re-reading the Linux kernel
coding style documentation on the subject, I see that I miss-
understood. I will check and see.
Martyn
prev parent reply other threads:[~2024-09-12 14:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-04 10:51 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
2024-09-12 14:01 ` Martyn Welch [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=0aa17b0eaf91334e9d3f989f04f264efae5f0b40.camel@collabora.com \
--to=martyn.welch@collabora.com \
--cc=claudiu.manoil@nxp.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kernel@collabora.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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 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®