All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: ALOK TIWARI <alok.a.tiwari@oracle.com>
Cc: sgoutham@marvell.com, andrew+netdev@lunn.ch, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	darren.kenny@oracle.com, linux-kernel@vger.kernel.org
Subject: Re: [External] : Re: [PATCH net] net: thunderx: Fix format-truncation warning in bgx_acpi_match_id()
Date: Tue, 8 Jul 2025 17:09:57 +0100	[thread overview]
Message-ID: <20250708160957.GQ452973@horms.kernel.org> (raw)
In-Reply-To: <96f8e9d7-6e4c-4f7a-bb66-a3b43e30182a@oracle.com>

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


      reply	other threads:[~2025-07-08 17:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-06 19:51 [PATCH net] net: thunderx: Fix format-truncation warning in bgx_acpi_match_id() Alok Tiwari
2025-07-07 19:16 ` Simon Horman
2025-07-08  3:04   ` [External] : " ALOK TIWARI
2025-07-08 16:09     ` Simon Horman [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=20250708160957.GQ452973@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=alok.a.tiwari@oracle.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=darren.kenny@oracle.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sgoutham@marvell.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.