[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250612073451.7f53b559@kernel.org>
Date: Thu, 12 Jun 2025 07:34:51 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Gal Pressman <gal@...dia.com>
Cc: "David S. Miller" <davem@...emloft.net>, Eric Dumazet
<edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Andrew Lunn
<andrew+netdev@...n.ch>, netdev@...r.kernel.org, Alex Lazar
<alazar@...dia.com>, Dragos Tatulea <dtatulea@...dia.com>
Subject: Re: [PATCH net-next 1/2] net: vlan: Replace BUG() with
WARN_ON_ONCE() in vlan_dev_* stubs
On Thu, 12 Jun 2025 13:32:33 +0300 Gal Pressman wrote:
> > This should let the compiler eliminate the dead code completely,
> > assuming it truly dead. We can still replace the BUG()s as
> > a of cleanup but I think the above is strictly preferable as
> > a solution to your problem?
>
> Makes sense.
>
> If we're going in this direction, maybe just provide a stub
> is_vlan_dev() for the !IS_ENABLED case?
I guess it's a question of whether we prefer simpler expression
or fewer ifdefs. I picked fewer ifdefs, but no strong preference.
Powered by blists - more mailing lists