Re: [PATCH net-next v2 1/1] tg3: Increase buffer size for IRQ label
From: Michael Chan
Date: Wed Oct 16 2024 - 13:56:14 EST
On Wed, Oct 16, 2024 at 2:06 AM Andy Shevchenko
<andriy.shevchenko@xxxxxxxxxxxxxxx> 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.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Thanks.
Reviewed-by: Michael Chan <michael.chan@xxxxxxxxxxxx>
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature