netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Larysa Zaremba <larysa.zaremba@intel.com>
Cc: <davem@davemloft.net>, <netdev@vger.kernel.org>,
	<edumazet@google.com>, <pabeni@redhat.com>
Subject: Re: [PATCH net-next 01/10] eth: fbnic: reorder ethtool code
Date: Fri, 20 Dec 2024 09:38:46 -0800	[thread overview]
Message-ID: <20241220093846.3dcec7e3@kernel.org> (raw)
In-Reply-To: <Z2WE3u2xrBw8XYxr@lzaremba-mobl.ger.corp.intel.com>

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@intel.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.

  reply	other threads:[~2024-12-20 17:38 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-20  2:52 [PATCH net-next 00/10] eth: fbnic: support basic RSS config and setting channel count Jakub Kicinski
2024-12-20  2:52 ` [PATCH net-next 01/10] eth: fbnic: reorder ethtool code Jakub Kicinski
2024-12-20 14:53   ` Larysa Zaremba
2024-12-20 17:38     ` Jakub Kicinski [this message]
2024-12-20  2:52 ` [PATCH net-next 02/10] eth: fbnic: support querying RSS config Jakub Kicinski
2024-12-20 11:42   ` Przemek Kitszel
2024-12-20 14:08     ` Jakub Kicinski
2024-12-20 14:23       ` Przemek Kitszel
2024-12-20  2:52 ` [PATCH net-next 03/10] eth: fbnic: don't reset the secondary RSS indir table Jakub Kicinski
2024-12-20  2:52 ` [PATCH net-next 04/10] eth: fbnic: support setting RSS configuration Jakub Kicinski
2024-12-20  2:52 ` [PATCH net-next 05/10] eth: fbnic: let user control the RSS hash fields Jakub Kicinski
2024-12-20  2:52 ` [PATCH net-next 06/10] eth: fbnic: store NAPIs in an array instead of the list Jakub Kicinski
2024-12-20  2:52 ` [PATCH net-next 07/10] eth: fbnic: add IRQ reuse support Jakub Kicinski
2024-12-20  2:52 ` [PATCH net-next 08/10] eth: fbnic: centralize the queue count and NAPI<>queue setting Jakub Kicinski
2024-12-20  2:52 ` [PATCH net-next 09/10] eth: fbnic: support ring channel get and set while down Jakub Kicinski
2024-12-20  2:52 ` [PATCH net-next 10/10] eth: fbnic: support ring channel set while up Jakub Kicinski
2024-12-20 13:49   ` Przemek Kitszel
2024-12-20 14:10     ` Jakub Kicinski
2024-12-20 15:02       ` Przemek Kitszel
2024-12-23 18:50 ` [PATCH net-next 00/10] eth: fbnic: support basic RSS config and setting channel count patchwork-bot+netdevbpf

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=20241220093846.3dcec7e3@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=larysa.zaremba@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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;
as well as URLs for NNTP newsgroup(s).