[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250708160957.GQ452973@horms.kernel.org>
Date: Tue, 8 Jul 2025 17:09:57 +0100
From: Simon Horman <horms@...nel.org>
To: ALOK TIWARI <alok.a.tiwari@...cle.com>
Cc: sgoutham@...vell.com, andrew+netdev@...n.ch, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
netdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
darren.kenny@...cle.com, linux-kernel@...r.kernel.org
Subject: Re: [External] : Re: [PATCH net] net: thunderx: Fix
format-truncation warning in bgx_acpi_match_id()
On Tue, Jul 08, 2025 at 08:34:39AM +0530, ALOK TIWARI wrote:
>
>
> On 7/8/2025 12:46 AM, Simon Horman wrote:
> > > drivers/net/ethernet/cavium/thunder/thunder_bgx.c:1434:23: note:
> > > directive argument in the range [0, 255]
> > > snprintf(bgx_sel, 5, "BGX%d", bgx->bgx_id);
> > > ^~~~~~~
> > > drivers/net/ethernet/cavium/thunder/thunder_bgx.c:1434:2: note:
> > > ‘snprintf’ output between 5 and 7 bytes into a destination of size 5
> > > snprintf(bgx_sel, 5, "BGX%d", bgx->bgx_id);
> > >
> > > compiler warning due to insufficient snprintf buffer size.
> > >
> > > Signed-off-by: Alok Tiwari<alok.a.tiwari@...cle.com>
> > Thanks Alok,
> >
> > I agree this is a good change.
> >
> > However, by my reading the range of values of bgx->bgx_id is 0 - 8
> > because of the application of BGX_ID_MASK which restricts the
> > value to 3 bits.
> >
> > If so, I don't think this is a bug and it should be targeted at net-next.
> > With a description of why it is not a bug.
> >
> > Conversely, you think it is a bug, then I think an explanation as to why
> > would be nice to add to the commit description. And A fixes tag is needed.
>
> Thanks Simon,
> It is compile warning, We can target it for net-next.
>
> I will resend it with [PATCH net-next]
Thanks, good plan.
Powered by blists - more mailing lists