From patchwork Fri Jan 19 12:49:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 13523738 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 75FBB4C3D2 for ; Fri, 19 Jan 2024 12:49:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705668592; cv=none; b=U44ArKI5tKiW1fgrirl9YqmnrhGGI05HB1MWsnP25E97hb2IuuZ5j5EZynS5vzbl9ExqfrZRLrk34zptaY6t/A493ChiD2p/YxcUQBLwIJaJpZm2I6yc0IKJH1QWHTPhjQxLcN63TXfLH57VMxnFH6Oyjib51nmi8x0ddavf/sg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705668592; c=relaxed/simple; bh=uag77kOUfM7/xRJI0XxCWxVSc8DQqTt4Lm71qZYhdqw=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=tKNtThMszaP6+t0rN6LcDlFwuILNe8+9uCiMWrAAros4R0IEImJl4ulZfbBJiVKocREGYbLSPHwEutkAGeCP0LEnrSIjc2IxC+8EilN83+JOBc1HKb5/eFYTHGMjjZWqsf4jM7Xm+lJNJa4M5MiLWSxMVa72b3a7WpV1fFP8hKU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OoOZmLdP; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OoOZmLdP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC88FC433F1; Fri, 19 Jan 2024 12:49:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705668591; bh=uag77kOUfM7/xRJI0XxCWxVSc8DQqTt4Lm71qZYhdqw=; h=From:To:Subject:Date:From; b=OoOZmLdPMMcQIJ/HqHpbqidySSDSB0KG+vJpdF+QB780S0osJ5r3jURD8gjLMnJi7 wrqlhg9v90Hq0MVIjth+pmSrqjGJxml+OW3uFWIptw75H5Jy9X+w9YJyG+WL6lEHUQ ESCPFHvb301GsijZYSYY9j/V0/VpEmdS66NLfTmjiRiTDIlSGw3FXkQoEYwOpy/Ukd eJ8bV27PrT4Stp4mBzyijthxs4gRa6vnk8WX/JyVYtFu1lkLXksTx3dJhNWWt1N1Mi zx5e8fvjo1Hc+/HXqlEil/gUFJAn5/VULhDnPf5RO2lfCm0lEgcWbPH+OxsjtHupBW I/TDcs1tFKtpw== From: Vinod Koul To: dmaengine@vger.kernel.org, Vinod Koul Subject: [PATCH 1/3] dmaengine: shdma: increase size of 'dev_id' Date: Fri, 19 Jan 2024 18:19:42 +0530 Message-ID: <20240119124944.152562-1-vkoul@kernel.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: dmaengine@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 --- 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; }; From patchwork Fri Jan 19 12:49:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 13523739 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2961A4EB5B for ; Fri, 19 Jan 2024 12:49:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705668594; cv=none; b=N/lcoJCkEUWkBuhbs+1LPA8agE4vFncSyfCcsg7qquGYRwmvavvEE3kW9tyzPge36ibR/bS9Ua3Eo+mLXAacdYO5CTOAu9/SYbwQz/UxjZqjaGi0VqKpaLE2041Tdvtt6XOIRk5iogW06U4qRPYEm+jsowDTonfRITvNbBOMGiM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705668594; c=relaxed/simple; bh=dBRxwrmU/a2LE6/EDZDMXwNx3M7QpOXM9ox78PRWVL4=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=BOoQM3JLQU7d3t8DEMKuSyK6MOweqoI1ReRYdTgtuxVSvzfLVpR3R39xagqfGyIm4an2B0Oypij+N/oMP4UG/0vChPMVoDjYz9um/WT+4GCUSX3iVaMyb9lU60bScewfssOPMcFglIA5LtlumJFWf7vCXHHZKS6fiLD2E8kUGrs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EZD+5wQt; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EZD+5wQt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93B30C433C7; Fri, 19 Jan 2024 12:49:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705668593; bh=dBRxwrmU/a2LE6/EDZDMXwNx3M7QpOXM9ox78PRWVL4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=EZD+5wQtb9d9mgNYHe2zV3rmMaJsuKI+A2pCjAS5o2gI7xp2Vjw0Fi8AUux9x/WGf EC4G5Sbpxq4BstJLdDHwBte0/m4Hzr3EcbtLP3xkQWF0xqnL8PMvJ7171Q9KiBGSpi RnAa3TmuFtOiMDrhUFZVxw+uTBr3QgBJAoTRbt9ZVT91toGdYldiqF0UVPW+d2+x0N owHA3M+cZFduLu9zXn8DPyIjPO8H4Yrct+3LuE6OMXqbmLsNvLXegvo28HQc+LwRUD eIAYIPhv86r2azKqy0LfapjF/7UeCZLPOlziS2RXB08Z4QMUxbMDFxay6oeJOm0qTM ya4qypW1dzbyg== From: Vinod Koul To: dmaengine@vger.kernel.org, Vinod Koul Subject: [PATCH 2/3] dmaengine: fsl-qdma: increase size of 'irq_name' Date: Fri, 19 Jan 2024 18:19:43 +0530 Message-ID: <20240119124944.152562-2-vkoul@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240119124944.152562-1-vkoul@kernel.org> References: <20240119124944.152562-1-vkoul@kernel.org> Precedence: bulk X-Mailing-List: dmaengine@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Reviewed-by: Frank Li --- 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"); From patchwork Fri Jan 19 12:49:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 13523740 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F3AC94C3D2 for ; Fri, 19 Jan 2024 12:49:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705668596; cv=none; b=TrQ+tY0uIHSafekNRtNaxoxH64cGLB5mFD1SusUX4snMwkGK3VETHA5o9iXyWsgLjA9GLlv5VwjKLfH4kP7nDKo0okU2twYgzV+cfd58r5uiuDcAlnOdZ0n1OvDWlCwY3ei6Hs78znSWUrtU19sPGj97HJSQh7YUu7oM6dlRpyQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705668596; c=relaxed/simple; bh=t3zAQPK9B6UGRZLtH4SKvNCUMjE3y+M+uR5nAJgXi6U=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=TUdjEQooGRw+wJ+fej/POGOy7aHi6M2kji9NE9/8DxMHu9EUeCojkI5bOmggxUtXj7hT4qNzwgU8Amf4CQWrG1L3qflrwd62DpkJa4ud13St4n7WND23mpokxH4/lMKdkKNRkGVPdF7eYZvn4vUI7BWq0tFz7Pfq0ki86l0u3Vc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AkCv3BtD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="AkCv3BtD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 45759C433F1; Fri, 19 Jan 2024 12:49:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705668595; bh=t3zAQPK9B6UGRZLtH4SKvNCUMjE3y+M+uR5nAJgXi6U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=AkCv3BtDsina4KoC486OYCzywFnQkgILWw1PUTMi4utJcxuaMMNI9Pz6w79OVhmbR 1wzh3ntnq715p1kfcvyz/TJAg7NVGfVBtzLxw80tZon15fwAm8YjMEVcc24h+OOiPt u/h0aVmJH5eZfq9LBRdzohDgkab/Vcrh9DbpG+GdavMleFq/nuu40149MfX2gugFvI NbojsmiHeI0UGekd/65me5rVL6cjZeMgXlM4sCUOsQ2eMdajUkBSGt6mvgO8ScDODr xpTuFGaKBUcsp41EdhOgMFHbnHxjWckj/sp8xTPCwS+70OODKjNJOa/ugVeNx4F1lB nYETpaU24CnSA== From: Vinod Koul To: dmaengine@vger.kernel.org, Vinod Koul Subject: [PATCH 3/3] dmaengine: dw-edma: increase size of 'name' in debugfs code Date: Fri, 19 Jan 2024 18:19:44 +0530 Message-ID: <20240119124944.152562-3-vkoul@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240119124944.152562-1-vkoul@kernel.org> References: <20240119124944.152562-1-vkoul@kernel.org> Precedence: bulk X-Mailing-List: dmaengine@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 We seem to have hit warnings of 'output may be truncated' which is fixed by increasing the size of 'name' drivers/dma/dw-edma/dw-hdma-v0-debugfs.c: In function ‘dw_hdma_v0_debugfs_on’: drivers/dma/dw-edma/dw-hdma-v0-debugfs.c:125:50: error: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size 8 [-Werror=format-truncation=] 125 | snprintf(name, sizeof(name), "%s:%d", CHANNEL_STR, i); | ^~ drivers/dma/dw-edma/dw-hdma-v0-debugfs.c: In function ‘dw_hdma_v0_debugfs_on’: drivers/dma/dw-edma/dw-hdma-v0-debugfs.c:142:50: error: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size 8 [-Werror=format-truncation=] 142 | snprintf(name, sizeof(name), "%s:%d", CHANNEL_STR, i); | ^~ drivers/dma/dw-edma/dw-edma-v0-debugfs.c: In function ‘dw_edma_debugfs_regs_wr’: drivers/dma/dw-edma/dw-edma-v0-debugfs.c:193:50: error: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size 8 [-Werror=format-truncation=] 193 | snprintf(name, sizeof(name), "%s:%d", CHANNEL_STR, i); | ^~ Signed-off-by: Vinod Koul Reviewed-by: Serge Semin Reported-by: kernel test robot --- drivers/dma/dw-edma/dw-edma-v0-debugfs.c | 4 ++-- drivers/dma/dw-edma/dw-hdma-v0-debugfs.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/dma/dw-edma/dw-edma-v0-debugfs.c b/drivers/dma/dw-edma/dw-edma-v0-debugfs.c index 0745d9e7d259..406f169b09a7 100644 --- a/drivers/dma/dw-edma/dw-edma-v0-debugfs.c +++ b/drivers/dma/dw-edma/dw-edma-v0-debugfs.c @@ -176,7 +176,7 @@ dw_edma_debugfs_regs_wr(struct dw_edma *dw, struct dentry *dent) }; struct dentry *regs_dent, *ch_dent; int nr_entries, i; - char name[16]; + char name[32]; regs_dent = debugfs_create_dir(WRITE_STR, dent); @@ -239,7 +239,7 @@ static noinline_for_stack void dw_edma_debugfs_regs_rd(struct dw_edma *dw, }; struct dentry *regs_dent, *ch_dent; int nr_entries, i; - char name[16]; + char name[32]; regs_dent = debugfs_create_dir(READ_STR, dent); diff --git a/drivers/dma/dw-edma/dw-hdma-v0-debugfs.c b/drivers/dma/dw-edma/dw-hdma-v0-debugfs.c index 520c81978b08..dcdc57fe976c 100644 --- a/drivers/dma/dw-edma/dw-hdma-v0-debugfs.c +++ b/drivers/dma/dw-edma/dw-hdma-v0-debugfs.c @@ -116,7 +116,7 @@ static void dw_hdma_debugfs_regs_ch(struct dw_edma *dw, enum dw_edma_dir dir, static void dw_hdma_debugfs_regs_wr(struct dw_edma *dw, struct dentry *dent) { struct dentry *regs_dent, *ch_dent; - char name[16]; + char name[32]; int i; regs_dent = debugfs_create_dir(WRITE_STR, dent); @@ -133,7 +133,7 @@ static void dw_hdma_debugfs_regs_wr(struct dw_edma *dw, struct dentry *dent) static void dw_hdma_debugfs_regs_rd(struct dw_edma *dw, struct dentry *dent) { struct dentry *regs_dent, *ch_dent; - char name[16]; + char name[32]; int i; regs_dent = debugfs_create_dir(READ_STR, dent);