[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241220093846.3dcec7e3@kernel.org>
Date: Fri, 20 Dec 2024 09:38:46 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Larysa Zaremba <larysa.zaremba@...el.com>
Cc: <davem@...emloft.net>, <netdev@...r.kernel.org>, <edumazet@...gle.com>,
<pabeni@...hat.com>
Subject: Re: [PATCH net-next 01/10] eth: fbnic: reorder ethtool code
On Fri, 20 Dec 2024 15:53:18 +0100 Larysa Zaremba wrote:
> I thought type and name on separate lines are not desirable, it could be moved
> to a single line in this commit. Assuming such adjustment,
I find this style more readable, TBH. I tend to break the line after
return type if the function declaration doesn't fit on a line and the
type is longer than 3 chars (IOW int/u32/u8 are exceptions).
Functions which end up looking like:
static struct some_type_struct *some_function_name_here(struct another *ptr,
int argument);
are really ugly. And break if > 3 chars is a simple rule to follow.
You will find that most of fbnic does not follow this style, because
I didn't write most of it. But most of the nfp driver does.
I think I learned the breaking after return type from Felix Fietkau.
Not that he specified the 3 character thing as pedantically as I do.
> Reviewed-by: Larysa Zaremba <larysa.zaremba@...el.com>
>
> Also, this would be a little bit out of scope for this commit, but seeing
> relatively new code that does not use `for (int i = 0,...)` is surprising.
I think you at Intel try to adopt the novelties much more than the rest of us.
Let us old timers be, please.
Powered by blists - more mailing lists