mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>,
	Michael Chan <michael.chan@broadcom.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Potnuri Bharat Teja <bharat@chelsio.com>,
	Christian Benvenuti <benve@cisco.com>,
	Satish Kharat <satishkh@cisco.com>,
	Manish Chopra <manishc@marvell.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-hardening@vger.kernel.org
Subject: Re: [PATCH 2/2][next] net: ethtool: Avoid thousands of -Wflex-array-member-not-at-end warnings
Date: Tue, 29 Oct 2024 16:06:32 -0600	[thread overview]
Message-ID: <318a0d4f-7f47-44db-93a1-aa1659d160ef@embeddedor.com> (raw)
In-Reply-To: <20241029130037.2c7e96c7@kernel.org>



On 29/10/24 14:00, Jakub Kicinski wrote:
> On Tue, 29 Oct 2024 13:18:56 -0600 Gustavo A. R. Silva wrote:
>> By priority I mean if preserving the reverse xmas tree is a most
>> after any changes that mess in some way with it. As in the case below,
>> where things were already messed up:
>>
>> +       const struct ethtool_link_settings_hdr *base = &lk_ksettings->base;
>>           struct bnxt *bp = netdev_priv(dev);
>>           struct bnxt_link_info *link_info = &bp->link_info;
>> -       const struct ethtool_link_settings *base = &lk_ksettings->base;
>>           bool set_pause = false;
>>           u32 speed, lanes = 0;
>>           int rc = 0;
>>
>> Should I leave the rest as-is, or should I now have to rearrange the whole
>> thing to accommodate for the convention?
> 
> Don't rearrange the rest. The point is that if you touch a line you end
> up with a delete and an add. So you can as well move it to get it closer
> to the convention. But that's just nice to have, I brought the entire
> thing up because of the net/ethtool/ code which previously followed the
> convention and after changes it wouldn't.
> 
>> How I see this, we can take a couple of directions:
>>
>> a) when things are already messed up, just implement your changes and leave
>> the rest as-is.
> 
> This is acceptable, moving things closer to convention is nice to have.
> 
>> b) when your changes mess things up, clean it up and accommodate for the
>> convention.
> 
> Yes, if by "your changes mess things up" you mean that the code follows
> the convention exactly for a given function - then yes, the changes must
> remain complaint. Not sure why you say "clean it up", if the code is
> complaint you shouldn't break it. No touching of pre-existing code
> (other than modified lines) should be necessary.

Gotcha. Hopefully, this v2 is just fine:

https://lore.kernel.org/linux-hardening/cover.1730238285.git.gustavoars@kernel.org/

Thanks!
-Gustavo

> 
>> extra option:
>>
>> c) this is probably going to be a case by case thing and we may ask you
>>      to do more changes as we see fit.
>>
>> To be clear, I have no issue with c) (because it's basically how things
>> usually work), as long as maintainers don't expect v1 of any patch to
>> be in pristine form. In any other case, I would really like to be crystal
>> clear about what's expected and what's not.


      reply	other threads:[~2024-10-29 22:06 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-21 19:01 [PATCH 0/2][next] UAPI: net/ethtool: " Gustavo A. R. Silva
2024-10-21 19:01 ` [PATCH 1/2][next] UAPI: ethtool: Use __struct_group() in struct ethtool_link_settings Gustavo A. R. Silva
2024-10-21 20:11   ` Andrew Lunn
2024-10-23 21:30     ` Gustavo A. R. Silva
2024-10-21 19:02 ` [PATCH 2/2][next] net: ethtool: Avoid thousands of -Wflex-array-member-not-at-end warnings Gustavo A. R. Silva
2024-10-28 23:21   ` Jakub Kicinski
2024-10-28 23:32     ` Gustavo A. R. Silva
2024-10-29  0:32       ` Jakub Kicinski
2024-10-29  2:37         ` Gustavo A. R. Silva
2024-10-29 13:56           ` Jakub Kicinski
2024-10-29 13:58   ` Jakub Kicinski
2024-10-29 16:55     ` Gustavo A. R. Silva
2024-10-29 18:08       ` Jakub Kicinski
2024-10-29 18:18         ` Gustavo A. R. Silva
2024-10-29 18:39           ` Jakub Kicinski
2024-10-29 18:48             ` Gustavo A. R. Silva
2024-10-29 18:54               ` Jakub Kicinski
2024-10-29 19:18                 ` Gustavo A. R. Silva
2024-10-29 20:00                   ` Jakub Kicinski
2024-10-29 22:06                     ` Gustavo A. R. Silva [this message]

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=318a0d4f-7f47-44db-93a1-aa1659d160ef@embeddedor.com \
    --to=gustavo@embeddedor.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=benve@cisco.com \
    --cc=bharat@chelsio.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gustavoars@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manishc@marvell.com \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=satishkh@cisco.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

all inboxes | Powered by JetHome®