DMA Engine development
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@nxp.com>
To: Vinod Koul <vkoul@kernel.org>
Cc: dmaengine@vger.kernel.org
Subject: Re: [PATCH 2/3] dmaengine: fsl-qdma: increase size of 'irq_name'
Date: Fri, 19 Jan 2024 12:18:34 -0500	[thread overview]
Message-ID: <Zaqu6tr5WtvLZzXb@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20240119124944.152562-2-vkoul@kernel.org>

On Fri, Jan 19, 2024 at 06:19:43PM +0530, Vinod Koul wrote:
> We seem to have hit warnings of 'output may be truncated' which is fixed
> by increasing the size of 'irq_name'
> 
> drivers/dma/fsl-qdma.c: In function ‘fsl_qdma_irq_init’:
> drivers/dma/fsl-qdma.c:824:46: error: ‘%d’ directive writing between 1 and 11 bytes into a region of size 10 [-Werror=format-overflow=]
>   824 |                 sprintf(irq_name, "qdma-queue%d", i);
>       |                                              ^~
> drivers/dma/fsl-qdma.c:824:35: note: directive argument in the range [-2147483641, 2147483646]
>   824 |                 sprintf(irq_name, "qdma-queue%d", i);
>       |                                   ^~~~~~~~~~~~~~
> drivers/dma/fsl-qdma.c:824:17: note: ‘sprintf’ output between 12 and 22 bytes into a destination of size 20
>   824 |                 sprintf(irq_name, "qdma-queue%d", i);
>       |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Signed-off-by: Vinod Koul <vkoul@kernel.org>
> ---

Reviewed-by: Frank Li <Frank.Li@nxp.com>

>  drivers/dma/fsl-qdma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/fsl-qdma.c b/drivers/dma/fsl-qdma.c
> index 47cb28468049..a1d0aa63142a 100644
> --- a/drivers/dma/fsl-qdma.c
> +++ b/drivers/dma/fsl-qdma.c
> @@ -805,7 +805,7 @@ fsl_qdma_irq_init(struct platform_device *pdev,
>  	int i;
>  	int cpu;
>  	int ret;
> -	char irq_name[20];
> +	char irq_name[32];
>  
>  	fsl_qdma->error_irq =
>  		platform_get_irq_byname(pdev, "qdma-error");
> -- 
> 2.43.0
> 

  reply	other threads:[~2024-01-19 17:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-19 12:49 [PATCH 1/3] dmaengine: shdma: increase size of 'dev_id' Vinod Koul
2024-01-19 12:49 ` [PATCH 2/3] dmaengine: fsl-qdma: increase size of 'irq_name' Vinod Koul
2024-01-19 17:18   ` Frank Li [this message]
2024-01-19 12:49 ` [PATCH 3/3] dmaengine: dw-edma: increase size of 'name' in debugfs code Vinod Koul
2024-01-22  9:32   ` Serge Semin

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=Zaqu6tr5WtvLZzXb@lizhi-Precision-Tower-5810 \
    --to=frank.li@nxp.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=vkoul@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox