Re: [PATCH v3] net: ethernet: emulex: benet: fix adapter->fw_on_flash truncation warning
From: Jakub Kicinski
Date: Tue Oct 28 2025 - 21:42:56 EST
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.