From patchwork Tue Mar 26 22:37:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 784897 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7C798CD11DF for ; Tue, 26 Mar 2024 22:45:07 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 1B1F32BD7; Tue, 26 Mar 2024 23:44:54 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1B1F32BD7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1711493104; bh=SPB6L/ctChhLveaXdYBbCjCt9oobwLX1bdGDBwGOoO0=; h=From:To:Cc:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=PLrCbW9F1zlkYvj2Xxamq7X5Jb3tOlHZPh7u9mfWLbmi1m+zkzzZzgTlg0rsPLX1D q+0ELpWCcd8KcnjP8A6Ce7drjaiUvfaWovXlnR3gd8hMa8XeEl9ekKQ5v4X8Ef+u1L Dz6YfT59tkeLYy5nBY9HKa0OKrnFHTKzHRMT9KdU= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2CC98F80588; Tue, 26 Mar 2024 23:44:32 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id BE14BF805A9; Tue, 26 Mar 2024 23:44:30 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2F926F8025F; Tue, 26 Mar 2024 23:39:13 +0100 (CET) Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 6F76FF801EB for ; Tue, 26 Mar 2024 23:38:42 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6F76FF801EB Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=pGx4NCTG Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id D65A8CE246F; Tue, 26 Mar 2024 22:38:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C948DC433C7; Tue, 26 Mar 2024 22:38:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711492718; bh=SPB6L/ctChhLveaXdYBbCjCt9oobwLX1bdGDBwGOoO0=; h=From:To:Cc:Subject:Date:From; b=pGx4NCTG2LWhkmyMjnIr7QzormuwKJKb8jduPcvEr9fHh9kO7VEnTBmioJRHspeDT H5YNlaoP6D7Q2ZgNhshKsS/BmV6fY0stqvvKrjUKukKt4t3PljRcdOcYW/I+80sDbg R89SGRiBcBON/LwB2ujoF+tWhQ32eqIRVBcCpCVeYkax6D8uqqRGex5bSxoqmAZeGP jXOGpr6Ob6HCEsFvy948o0gSqCxIS6NpNrU2aJMXy9NSc5Ih2WSgU5M/QN5d0Wk4Em AUaltyTlXALh0GnoMXcZLFVs6K3I9Nov1ese+LhHwPhrOpJpNBoK+83Fr966hvuTK7 Zkic1AdBfrkmw== From: Arnd Bergmann To: llvm@lists.linux.dev Cc: Arnd Bergmann , Dmitry Torokhov , Claudiu Manoil , Vladimir Oltean , Jakub Kicinski , Saeed Mahameed , Leon Romanovsky , Ariel Elior , Manish Chopra , Hans de Goede , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Maximilian Luz , Hannes Reinecke , "Martin K. Petersen" , Helge Deller , Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Johannes Berg , Jaroslav Kysela , Takashi Iwai , Nick Desaulniers , Bill Wendling , Justin Stitt , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-rdma@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-scsi@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kbuild@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, alsa-devel@alsa-project.org, linux-sound@vger.kernel.org Subject: [PATCH 0/9] enabled -Wformat-truncation for clang Date: Tue, 26 Mar 2024 23:37:59 +0100 Message-Id: <20240326223825.4084412-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Message-ID-Hash: 7OPSIKICLDUKX2JEQKMQDQMLKU374PX2 X-Message-ID-Hash: 7OPSIKICLDUKX2JEQKMQDQMLKU374PX2 X-MailFrom: arnd@kernel.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Arnd Bergmann With randconfig build testing, I found only eight files that produce warnings with clang when -Wformat-truncation is enabled. This means we can just turn it on by default rather than only enabling it for "make W=1". Unfortunately, gcc produces a lot more warnings when the option is enabled, so it's not yet possible to turn it on both both compilers. I hope that the patches can get picked up by platform maintainers directly, so the final patch can go in later on. Arnd Arnd Bergmann (9): fbdev: shmobile: fix snprintf truncation enetc: avoid truncating error message qed: avoid truncating work queue length mlx5: avoid truncating error message surface3_power: avoid format string truncation warning Input: IMS: fix printf string overflow scsi: mylex: fix sysfs buffer lengths ALSA: aoa: avoid false-positive format truncation warning kbuild: enable -Wformat-truncation on clang drivers/input/misc/ims-pcu.c | 4 ++-- drivers/net/ethernet/freescale/enetc/enetc.c | 2 +- .../ethernet/mellanox/mlx5/core/esw/bridge.c | 2 +- drivers/net/ethernet/qlogic/qed/qed_main.c | 9 ++++--- drivers/platform/surface/surface3_power.c | 2 +- drivers/scsi/myrb.c | 20 ++++++++-------- drivers/scsi/myrs.c | 24 +++++++++---------- drivers/video/fbdev/sh_mobile_lcdcfb.c | 2 +- scripts/Makefile.extrawarn | 2 ++ sound/aoa/soundbus/i2sbus/core.c | 2 +- 10 files changed, 35 insertions(+), 34 deletions(-)