Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp977801rdb; Fri, 19 Jan 2024 04:51:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IErrpgg4wO0WIWASCk2Bpr7NRZSoKtCy3cu3DrqQ8lRYpcsa4D+JowpREprCh582fbD5Tg5 X-Received: by 2002:a17:906:7fca:b0:a2d:ad14:a2a6 with SMTP id r10-20020a1709067fca00b00a2dad14a2a6mr1396844ejs.23.1705668684179; Fri, 19 Jan 2024 04:51:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705668684; cv=pass; d=google.com; s=arc-20160816; b=CGO58jU4KLMzdfUDTSIV0LaGlvRzZDEkeX5Lh56EIPhnvYtElYadsHslQrDD+4V4IB yVHdlVqc27TyshpI7PGUlJE+FertoeI3A+IFBcXGzPpvIx/WLjqAScq6VzdthlW3Jmdv UjHKcOjWUADUsiIit/g5Dw0LNv8x+WxvBJEAjKdAqXp6IKH2Za2oFP/TewMdCQ7o4atl heRg/+vGfA6U23cRMyOpQhqgxj7X7NKsU3W7JT9rK2CyjCpCvGGjbPM8qQO+35dkZrqS OGHABGThPFD3xZHC41kfBwZL7JzemrrHaqB8Ky5KkN8XYL4OpbdF/dUezrhAGEp02HMV Ijvg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:subject :references:in-reply-to:cc:to:from:dkim-signature; bh=D8Qgo/OYKv8Z7EBRRNeTXvLSWfAC938C2ENUuXnPuqc=; fh=Ct9t0FSh5FEBsAA+//Q2ZeX6rvwyhWhd4ZOEW67BO6E=; b=iwg11a5jRwkzTTlGgL+BNKIpEI1Xc6Zgg4Yn8sPLTRhOYvP3YXpQ+L8tDzmXUCwYZ9 4aS1f3ISKnXNiYry56flvRwAcL/JlERwt+McdipvZ+hCW7Hth41EXeSqGk/2CbG1514A +GuiEgPFeN2FEnM8QkvavL1QTf+UuzmGbsBcFnhrj6IwOaDes2NVOA5Co2zVvpQqPRwV LpXzaMqOs8B0OT0loDv+aITVJY0aYFzhW/5EhVkyTZPNwqvVWjkSbBVCd1TxpFDFfCUZ dQxJyvzhIEwME0/ubyxEmNi9rTQ+TzexMtEMA7pKaUWu9ITCcyLFR9DPeLi2L1xegRlo 74zw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=l5eph6EO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-31145-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31145-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id t8-20020a170906178800b00a2a1482957asi7765363eje.288.2024.01.19.04.51.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 04:51:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31145-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=l5eph6EO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-31145-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31145-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 5E56A1F23484 for ; Fri, 19 Jan 2024 12:51:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1CD2D52F80; Fri, 19 Jan 2024 12:50:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="l5eph6EO" 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 4455852F61; Fri, 19 Jan 2024 12:50:43 +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=1705668643; cv=none; b=rz8ck/RkXjS7B/c8gbITRTC2tZ4VPJe3/ZNkIV014UG9RLCz9pfHWIMNYH9yXpJVeQlnQZkGOC/VuEeyu/SKOd/WvfyBp+ghBkqOaIJ9UD8nOPbdgf+2cOEP5VxCkzGR04NyRHqpT6pAOsM7U7tIQNHpQproC6lUBYwwpY+JLAE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705668643; c=relaxed/simple; bh=W30j+6xPy6cUeAZEgfVIhN/c9OYj0SxAoxddbCYFL1o=; h=From:To:Cc:In-Reply-To:References:Subject:Message-Id:Date: MIME-Version:Content-Type; b=Bx/HxROgqLUXXG4i8FlGdiNi1nXJXWOnaQZbP0zdmey4MMj3tLA6dAhUtonTeDJ/ZdsTjSZf/ejpem+OajpzXlOl5Tjm5Dc8E5L5vhN0pP873oCCPUK984FKv09hQB0oOmksnPY+/G+/rFk9bdFBktTXZqC6upFQv2lOAylHA90= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=l5eph6EO; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C634AC433F1; Fri, 19 Jan 2024 12:50:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705668643; bh=W30j+6xPy6cUeAZEgfVIhN/c9OYj0SxAoxddbCYFL1o=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=l5eph6EOyfHiK5WMh/Udh+oAI7oZAwzfM/nkxtH3aRwtbhJO2ypzuKkNXWbkD9pz+ SNV56UVNEjyXRsUVFKjwyz8rRmck0+ATOEIj0dd1DpCEdx8eHo3JO4i8+MmurtoR85 DMLBhs8/rHhstc+kovk92pZ3n9Jhjsd6F3ezwRo3JFdh7onJ1W5cQEZmt+1ss4csS4 2vUXEiyKJ2FhEIOL9zIfF0DM18kFRImlCTg2mJb3i7Y4R5ssUDVUWqRAHjUNiZhal2 E06WYMf8DlJbnm2HLfleEOu/qolkp0AnRrM2BLVPSuIL2PemHrdkD6/t4zrsYfwpiU VqvCjQICEA3Xw== From: Vinod Koul To: Geert Uytterhoeven , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Tudor Ambarus , Kees Cook , Prabhakar Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Claudiu Beznea , Lad Prabhakar In-Reply-To: <20240110222210.193479-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20240110222210.193479-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Subject: Re: [PATCH] dmaengine: usb-dmac: Avoid format-overflow warning Message-Id: <170566863937.152659.9559198996956911602.b4-ty@kernel.org> Date: Fri, 19 Jan 2024 18:20:39 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.12.3 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