From: Ankan Biswas <spyjetfayed@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: ajit.khaparde@broadcom.com, sriharsha.basavapatna@broadcom.com,
somnath.kotur@broadcom.com, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
skhan@linuxfoundation.org, khalid@kernel.org,
david.hunter.linux@gmail.com,
linux-kernel-mentees@lists.linux.dev
Subject: Re: [PATCH v3] net: ethernet: emulex: benet: fix adapter->fw_on_flash truncation warning
Date: Wed, 29 Oct 2025 12:30:13 +0530 [thread overview]
Message-ID: <60657a94-8b91-41d5-9cf7-61ed5ceb2161@gmail.com> (raw)
In-Reply-To: <20251028184254.1d902b50@kernel.org>
On 10/29/25 7:12 AM, Jakub Kicinski wrote:
> On Fri, 24 Oct 2025 23:45:41 +0530 Ankan Biswas wrote:
>> The benet driver copies both fw_ver (32 bytes) and fw_on_flash (32 bytes)
>> into ethtool_drvinfo->fw_version (32 bytes), leading to a potential
>> string truncation warning when built with W=1.
>>
>> Store fw_on_flash in ethtool_drvinfo->erom_version instead, which some
>> drivers use to report secondary firmware information.
>
> You are changing user-visible behavior to silence a W=1 warning.
> I can't stress enough how bad of an idea this is.
> Please find a better fix.. or leave this code be.
Hi Jakub,
Thanks for the feedback. I felt this would be better than the value
appearing truncated to the user. However, yes this is not the ideal fix.
Will avoid modifying user-visible behavior.
An ideal fix may require a lot more changes, which may not be worth the
effort at this point, so I guess it is better to drop this patch.
Best Regards,
Ankan Biswas
prev parent reply other threads:[~2025-10-29 7:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-24 18:15 [PATCH v3] net: ethernet: emulex: benet: fix adapter->fw_on_flash truncation warning Ankan Biswas
2025-10-29 1:42 ` Jakub Kicinski
2025-10-29 7:00 ` Ankan Biswas [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=60657a94-8b91-41d5-9cf7-61ed5ceb2161@gmail.com \
--to=spyjetfayed@gmail.com \
--cc=ajit.khaparde@broadcom.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=david.hunter.linux@gmail.com \
--cc=edumazet@google.com \
--cc=khalid@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=skhan@linuxfoundation.org \
--cc=somnath.kotur@broadcom.com \
--cc=sriharsha.basavapatna@broadcom.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).