All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Vinod Koul <vkoul@kernel.org>, Sasha Levin <sashal@kernel.org>,
	dmaengine@vger.kernel.org
Subject: [PATCH AUTOSEL 6.6 08/10] dmaengine: shdma: increase size of 'dev_id'
Date: Mon, 29 Jan 2024 13:35:16 -0500	[thread overview]
Message-ID: <20240129183530.464274-8-sashal@kernel.org> (raw)
In-Reply-To: <20240129183530.464274-1-sashal@kernel.org>

From: Vinod Koul <vkoul@kernel.org>

[ Upstream commit 404290240827c3bb5c4e195174a8854eef2f89ac ]

We seem to have hit warnings of 'output may be truncated' which is fixed
by increasing the size of 'dev_id'

drivers/dma/sh/shdmac.c: In function ‘sh_dmae_probe’:
drivers/dma/sh/shdmac.c:541:34: error: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 9 [-Werror=format-truncation=]
  541 |                          "sh-dmae%d.%d", pdev->id, id);
      |                                  ^~
In function ‘sh_dmae_chan_probe’,
    inlined from ‘sh_dmae_probe’ at drivers/dma/sh/shdmac.c:845:9:
drivers/dma/sh/shdmac.c:541:26: note: directive argument in the range [0, 2147483647]
  541 |                          "sh-dmae%d.%d", pdev->id, id);
      |                          ^~~~~~~~~~~~~~
drivers/dma/sh/shdmac.c:541:26: note: directive argument in the range [0, 19]
drivers/dma/sh/shdmac.c:540:17: note: ‘snprintf’ output between 11 and 21 bytes into a destination of size 16
  540 |                 snprintf(sh_chan->dev_id, sizeof(sh_chan->dev_id),
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  541 |                          "sh-dmae%d.%d", pdev->id, id);
      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/dma/sh/shdma.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/sh/shdma.h b/drivers/dma/sh/shdma.h
index 9c121a4b33ad..f97d80343aea 100644
--- a/drivers/dma/sh/shdma.h
+++ b/drivers/dma/sh/shdma.h
@@ -25,7 +25,7 @@ struct sh_dmae_chan {
 	const struct sh_dmae_slave_config *config; /* Slave DMA configuration */
 	int xmit_shift;			/* log_2(bytes_per_xfer) */
 	void __iomem *base;
-	char dev_id[16];		/* unique name per DMAC of channel */
+	char dev_id[32];		/* unique name per DMAC of channel */
 	int pm_error;
 	dma_addr_t slave_addr;
 };
-- 
2.43.0


  parent reply	other threads:[~2024-01-29 18:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-29 18:35 [PATCH AUTOSEL 6.6 01/10] dmaengine: apple-admac: Keep upper bits of REG_BUS_WIDTH Sasha Levin
2024-01-29 18:35 ` Sasha Levin
2024-01-29 18:35 ` [PATCH AUTOSEL 6.6 02/10] scsi: smartpqi: Add new controller PCI IDs Sasha Levin
2024-01-29 18:35 ` [PATCH AUTOSEL 6.6 03/10] scsi: smartpqi: Fix logical volume rescan race condition Sasha Levin
2024-01-29 18:35 ` [PATCH AUTOSEL 6.6 04/10] tools: selftests: riscv: Fix compile warnings in vector tests Sasha Levin
2024-01-29 18:35   ` Sasha Levin
2024-01-29 18:35 ` [PATCH AUTOSEL 6.6 05/10] tools: selftests: riscv: Fix compile warnings in mm tests Sasha Levin
2024-01-29 18:35   ` Sasha Levin
2024-01-29 18:35 ` [PATCH AUTOSEL 6.6 06/10] scsi: target: core: Add TMF to tmr_list handling Sasha Levin
2024-01-29 18:35 ` [PATCH AUTOSEL 6.6 07/10] cifs: open_cached_dir should not rely on primary channel Sasha Levin
2024-01-29 18:35 ` Sasha Levin [this message]
2024-01-29 18:35 ` [PATCH AUTOSEL 6.6 09/10] dmaengine: fsl-qdma: increase size of 'irq_name' Sasha Levin
2024-01-29 18:35 ` [PATCH AUTOSEL 6.6 10/10] dmaengine: dw-edma: increase size of 'name' in debugfs code Sasha Levin

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=20240129183530.464274-8-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@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 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.