All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Pavan Chebbi <pavan.chebbi@broadcom.com>,
	Michael Chan <mchan@broadcom.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net-next v1 1/1] tg3: Increase buffer size for IRQ label
Date: Mon, 14 Oct 2024 13:30:50 +0100	[thread overview]
Message-ID: <20241014123050.GU77519@kernel.org> (raw)
In-Reply-To: <20241014103810.4015718-1-andriy.shevchenko@linux.intel.com>

On Mon, Oct 14, 2024 at 01:38:10PM +0300, Andy Shevchenko wrote:
> GCC is not happy with the current code, e.g.:
> 
> .../tg3.c:11313:37: error: ‘-txrx-’ directive output may be truncated writing 6 bytes into a region of size between 1 and 16 [-Werror=format-truncation=]
> 11313 |                                  "%s-txrx-%d", tp->dev->name, irq_num);
>       |                                     ^~~~~~
> .../tg3.c:11313:34: note: using the range [-2147483648, 2147483647] for directive argument
> 11313 |                                  "%s-txrx-%d", tp->dev->name, irq_num);
> 
> When `make W=1` is supplied, this prevents kernel building. Fix it by
> increasing the buffer size for IRQ label and use sizeoF() instead of
> hard coded constants.
> 
> While at it, move the respective buffer out from the structure as
> it's used only in one caller. This also improves memory footprint
> of struct tg3_napi.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Very nice to see this addressed :)

Reviewed-by: Simon Horman <horms@kernel.org>

  reply	other threads:[~2024-10-14 12:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-14 10:38 [PATCH net-next v1 1/1] tg3: Increase buffer size for IRQ label Andy Shevchenko
2024-10-14 12:30 ` Simon Horman [this message]
2024-10-15 15:16 ` Jakub Kicinski
2024-10-16  8:55   ` Andy Shevchenko

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=20241014123050.GU77519@kernel.org \
    --to=horms@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pavan.chebbi@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 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.