[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <170566863937.152659.9559198996956911602.b4-ty@kernel.org>
Date: Fri, 19 Jan 2024 18:20:39 +0530
From: Vinod Koul <vkoul@...nel.org>
To: Geert Uytterhoeven <geert+renesas@...der.be>,
Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
Tudor Ambarus <tudor.ambarus@...aro.org>, Kees Cook <keescook@...omium.org>,
Prabhakar <prabhakar.csengg@...il.com>
Cc: dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-renesas-soc@...r.kernel.org,
Claudiu Beznea <claudiu.beznea.uj@...renesas.com>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Subject: Re: [PATCH] dmaengine: usb-dmac: Avoid format-overflow warning
On Wed, 10 Jan 2024 22:22:10 +0000, Prabhakar wrote:
> gcc points out that the fix-byte buffer might be too small:
> drivers/dma/sh/usb-dmac.c: In function 'usb_dmac_probe':
> drivers/dma/sh/usb-dmac.c:720:34: warning: '%u' directive writing between 1 and 10 bytes into a region of size 3 [-Wformat-overflow=]
> 720 | sprintf(pdev_irqname, "ch%u", index);
> | ^~
> In function 'usb_dmac_chan_probe',
> inlined from 'usb_dmac_probe' at drivers/dma/sh/usb-dmac.c:814:9:
> drivers/dma/sh/usb-dmac.c:720:31: note: directive argument in the range [0, 4294967294]
> 720 | sprintf(pdev_irqname, "ch%u", index);
> | ^~~~~~
> drivers/dma/sh/usb-dmac.c:720:9: note: 'sprintf' output between 4 and 13 bytes into a destination of size 5
> 720 | sprintf(pdev_irqname, "ch%u", index);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> [...]
Applied, thanks!
[1/1] dmaengine: usb-dmac: Avoid format-overflow warning
commit: 62b68a88795942512936896b9fec1ee7d5fa9922
Best regards,
--
~Vinod
Powered by blists - more mailing lists