[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241219071202.777dab06@kernel.org>
Date: Thu, 19 Dec 2024 07:12:02 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Moshe Shemesh <moshe@...dia.com>
Cc: Przemek Kitszel <przemyslaw.kitszel@...el.com>, Tariq Toukan
<tariqt@...dia.com>, <netdev@...r.kernel.org>, Saeed Mahameed
<saeedm@...dia.com>, Gal Pressman <gal@...dia.com>, Leon Romanovsky
<leonro@...dia.com>, Mark Bloch <mbloch@...dia.com>, Yevgeny Kliteynik
<kliteyn@...dia.com>, "David S. Miller" <davem@...emloft.net>, Paolo Abeni
<pabeni@...hat.com>, Eric Dumazet <edumazet@...gle.com>, Andrew Lunn
<andrew+netdev@...n.ch>
Subject: Re: [PATCH net-next V3 04/11] net/mlx5: fs, add mlx5_fs_pool API
On Thu, 19 Dec 2024 14:30:41 +0200 Moshe Shemesh wrote:
> > Locally (say two lines above) your label name is obvious.
> > But please imagine it in the context of whole function, it is much
> > better to name labels after what they jump to (instead of what they
> > jump from). It is not only easier to reason about, but also more
> > future proof. I think Simon would agree.
> > I'm fine with keeping existing code as-is, but for new code, it's
> > always better to write it up to the best practices known.
>
> I tend to name labels according to what they jump from. Though if I see
> on same function labels are used the other way I try to be consistent
> with current code.
> I think there are pros and cons for both ways and both ways are used.
> I can change here, but is that kernel or netdev consensus ?
Yes, there's a consensus now. But I think since all mlx* code uses
the "jump source" naming mixing the two could lead to confusion for
your internal developers, and bugs. So I'd say up to you :(
--
Since Przemek found a real bug elsewhere:
pw-bot: cr
Powered by blists - more mailing lists