Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1767903rdd; Thu, 11 Jan 2024 08:41:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IF96ldOEsPA8KtuBU4Ku5HrCg6FM6WRHRcuJGjPhzICz9B+qAwfB4B4WAWYRq/QzazUoto9 X-Received: by 2002:a05:6102:1913:b0:467:7d9f:afa3 with SMTP id jk19-20020a056102191300b004677d9fafa3mr54281vsb.2.1704991270701; Thu, 11 Jan 2024 08:41:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704991270; cv=none; d=google.com; s=arc-20160816; b=lr73osVVqLrpn685UkiU/9W9ZUhSa+IZrsOWmSNY8lfrXcBHX1VdupSgW9PuBd4N81 5IVe+S8X0+yvzg6A8OOgIj0VEbnFEBhsdstpGwonfYKRq0xhGbRAQey1Z2NmWvE6DE3p O+csHSpmqYK+A7anMU7ClVek/Da3BkvfQv1spP3melFEa/DgJG14Cuxs2MsKnlB0BgD+ F+TorElBfRcHLp6Qi63o4hOZ9BijZohTPUVEn3InNeb6xdLXNwNA/Du0vqNsMblSJz3K Vq6DHV3igvUI8qYJjGJrz3UJwmJxLh6aWq6xTD97uX3Xml20/Qk5t0Ni1f3th4q1iFxB P5SQ== ARC-Message-Signature: i=1; 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:message-id:date:subject:cc:to :from:dkim-signature; bh=707hjnYLr3Vx1ct/Rjg8EEW9VAMa2gjb6J+FYYoY7LU=; fh=vR2Ax6G3U8MVux01d+we4aSijPPmYFDUEO71mDE/xvI=; b=mnXtdtI1mS77hQPvXw6oQbsJyhCHSxlpxRwAVSvPqeo1NC6UC0LCDCil0lDqp0Ub0j 0Bl7CO/HxyO0wix5lX7VxFNZ9mGC+Ryxw4aqmEgUxg7Ms8TWIJIing+RIfEwSlaflr9N wFWsxNtD8UT9tfTVjHYrp+dhJmfKNYYtLTpEqrHyNIJWDMfff/7aKJ2X92WMNII0zDqp FSDXRLcdnRcWHSS8S63W3RphJ6x3/owhwpt/a9WQGJywmqt1y0SaKqW3APjph1iGuPfV 3eLbQ13ygC/qUCxDiBXh+WZfqAsA9JixY+xnIYzc6OaCUTdJpp9c+XuVzGxuSfJTCkt4 v5Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nisoBO3t; spf=pass (google.com: domain of linux-kernel+bounces-23880-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23880-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id k2-20020a056102082200b00467f0631efcsi172004vsb.405.2024.01.11.08.41.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 08:41:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23880-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nisoBO3t; spf=pass (google.com: domain of linux-kernel+bounces-23880-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23880-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 35DC91C235CB for ; Thu, 11 Jan 2024 16:40:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 71FF750267; Thu, 11 Jan 2024 16:40:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nisoBO3t" 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 9E20E50250; Thu, 11 Jan 2024 16:40:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CF60AC433F1; Thu, 11 Jan 2024 16:39:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704991201; bh=+q75K7vH+apl/4khPV5F4/P02Rn9eXRp5swe8VqdbCE=; h=From:To:Cc:Subject:Date:From; b=nisoBO3t1G8MJenBLBJYJ2eSEgRZVUq3hy1k9wblBpjYRq49J2U8Trc7cenwMFKoD 3fxzoBofSwVs7ITy/TjLNPaea/32K4rN2BCcjh85+OVBm1xHpWSmOz/eQ9LQ6CUus4 EBOU7aQPA6giO+jqE6Lb+/WQttoBbo6D7kwnqbFhINYaw/arh7ixFbzzIGoSHdv7WB hfAP4bG8eWc9fZNHm0AkX/T8DEZS/lykAIFzleSMKMfuppPwknv/MVdFV1rIawBJIE 6WR1U3s4xbbCRn3a2PAgyk766sJ0TWo6zc2y+SAO0xguzUZfboIJkFIy84zApH1D6w JPIcRA+euir/Q== From: Lee Jones To: lee@kernel.org Cc: linux-kernel@vger.kernel.org, Tony Lindgren , Keshava Munegowda , Roger Quadros , linux-omap@vger.kernel.org Subject: [PATCH 1/1] mfd: omap-usb-host: Increase size of buffer to include all possible values Date: Thu, 11 Jan 2024 16:39:49 +0000 Message-ID: <20240111163949.1976778-1-lee@kernel.org> X-Mailer: git-send-email 2.43.0.275.g3460e3d667-goog 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: 8bit Avoid these nasty W=1 errors: drivers/mfd/omap-usb-host.c: In function ‘usbhs_omap_probe’: drivers/mfd/omap-usb-host.c:706:54: error: ‘_clk’ directive output may be truncated writing 4 bytes into a region of size between 1 and 11 [-Werror=format-truncation=] drivers/mfd/omap-usb-host.c:705:17: note: ‘snprintf’ output between 24 and 34 bytes into a destination of size 30 drivers/mfd/omap-usb-host.c:721:56: error: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size 8 [-Werror=format-truncation=] drivers/mfd/omap-usb-host.c:721:33: note: directive argument in the range [-2147483640, 2147483647] drivers/mfd/omap-usb-host.c:720:17: note: ‘snprintf’ output between 28 and 38 bytes into a destination of size 30 drivers/mfd/omap-usb-host.c:731:55: error: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size 9 [-Werror=format-truncation=] drivers/mfd/omap-usb-host.c:731:33: note: directive argument in the range [-2147483640, 2147483647] drivers/mfd/omap-usb-host.c:730:17: note: ‘snprintf’ output between 27 and 37 bytes into a destination of size 30 Cc: Tony Lindgren Cc: Keshava Munegowda Cc: Roger Quadros Cc: linux-omap@vger.kernel.org Signed-off-by: Lee Jones --- drivers/mfd/omap-usb-host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c index ebc62033db169..949feb03d4f8d 100644 --- a/drivers/mfd/omap-usb-host.c +++ b/drivers/mfd/omap-usb-host.c @@ -699,7 +699,7 @@ static int usbhs_omap_probe(struct platform_device *pdev) } for (i = 0; i < omap->nports; i++) { - char clkname[30]; + char clkname[40]; /* clock names are indexed from 1*/ snprintf(clkname, sizeof(clkname), -- 2.43.0.275.g3460e3d667-goog