lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0aa17b0eaf91334e9d3f989f04f264efae5f0b40.camel@collabora.com>
Date: Thu, 12 Sep 2024 15:01:25 +0100
From: Martyn Welch <martyn.welch@...labora.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Claudiu Manoil <claudiu.manoil@....com>, Vladimir Oltean	
 <vladimir.oltean@....com>, "David S. Miller" <davem@...emloft.net>, Eric
 Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
 kernel@...labora.com, Vadim Fedorenko <vadim.fedorenko@...ux.dev>,
 netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v3] net: enetc: Replace ifdef with IS_ENABLED

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ