Received: by 2002:ab2:f03:0:b0:1ef:ffd0:ce49 with SMTP id i3csp90899lqf; Tue, 26 Mar 2024 15:40:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW+wGYPrF0pTNzS/ARNDcIBNV3FrP4omQ4ekkL+7Xs6+DoChYTorDG48Z78Vs/sf8EDj7zQZxvhw86cIn2SF6hb44lOyNYKR0tQdss0Yw== X-Google-Smtp-Source: AGHT+IHuqx+Ftg03PfhcHdt65370PRPrN2yqerGR7i+kzgktk4oEHKoeALcEFDm6Aeak29nWLvYx X-Received: by 2002:a05:6512:49c:b0:513:d640:ff16 with SMTP id v28-20020a056512049c00b00513d640ff16mr3070536lfq.29.1711492802809; Tue, 26 Mar 2024 15:40:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711492802; cv=pass; d=google.com; s=arc-20160816; b=JCtAyTtZ40D3mKA/2DPNz8qZ4I8xF37tmWK7wvqE0S7g8pvrj450ELFem+d3L8yISW BvHxN0fSSN2h4d28WBF76v1BzCi4GFuD1fO/PxmA2HCHUXlMqIkErgcIEj1R5C88DPzL VqMj2HHtMTYHgFLHoP6ww5/Cuekuh066SDNq0OsO7O9lgLaGaIo31HNKwakPwXcsIbL+ EoRJPl3qV1cErORk3D2nG+MxrlbGOmAJQH1CRPL1amScZGj+qO8FnEoLllB7M01TR6cd DfO9SAxxLih/iVPwiRiD09eLk3UwdrDxH6MnPHf5P/+7MmpJpTS4UfEO4lcPZU910OH0 iE0A== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=47UJ/en3Vw5GpimiJV30EpX94SLQBe1dKUb7PTRzLw8=; fh=EDE+guHZgZGGdxpYxebd1kPCTUf/VjpWNE8so/2MEFM=; b=JrHR7vdlBQHHFIUM7a+5KYcSRfYWaJjbhyvrU96E3KeW+r3ATRwywk1ycLBJDQOu8M m8wO/+iL+2AYi7jwx7bGyXNdkz86cGj7X3z6iOb7V3g05bR+Nfj/elNSUagCIJPCaOe0 p5DXkoUbaXBU1J+B4gf7fsCpPHOLpO4R/V2/GqgO85+k1EpXt8LIIof/Ajaznk7CBRQP 4ziNEH+0Bc49GPBGl0LNauZ9p+uUX1yUwCMhmjbHY22fNCGm+Aq3IDjypPYWTBtN8lED 7P4Hd1amTVDzzFfQKwg0TWeJyHcwHEF8a0aibOoLl6x6Wnxd79U9016f3hXWcyVbfLRi oO0Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pGx4NCTG; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-120073-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120073-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. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id u11-20020a170906b10b00b00a46bda1dbeasi3940572ejy.625.2024.03.26.15.40.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 15:40:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-120073-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pGx4NCTG; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-120073-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120073-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 547DD1F6611A for ; Tue, 26 Mar 2024 22:40:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D1B8C13E88A; Tue, 26 Mar 2024 22:38:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pGx4NCTG" 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 A3EF11CAAE; Tue, 26 Mar 2024 22:38:38 +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=1711492718; cv=none; b=PeJX4x6FprfZnO5m1b3rffLvUdtKwkVx5hHXp+Tcdg8vrFTtXYTxHReWa22CJQTofV57JJzlAINibmogxo6bLXG3N0mHldY4cQsJQKwh6td57gqDvf9UGAu72V5+YwGINVCY9rHe7g/qo5Vq5gbdx4SKJfJ903G7F7CdgONNd3U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711492718; c=relaxed/simple; bh=SPB6L/ctChhLveaXdYBbCjCt9oobwLX1bdGDBwGOoO0=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=Un9hgeGrMF/OiPcwJCWsFpvigripAziA4Gwo8NKYXHCuZRwCqj9ZOnexbEnLzeM9UBuJ3hMjTo32k1IeUU0SzV8bClgFuXtRqodYSBPHI9slCYLGuOwifNBhid4d1cdgSTFDW4BKWQjdPSodclvsRdKgBJjRmPRKLQX3xWvPNXM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pGx4NCTG; arc=none smtp.client-ip=10.30.226.201 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=20J=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 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 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(-) -- 2.39.2 Cc: Dmitry Torokhov Cc: Claudiu Manoil Cc: Vladimir Oltean Cc: Jakub Kicinski Cc: Saeed Mahameed Cc: Leon Romanovsky Cc: Ariel Elior Cc: Manish Chopra Cc: Hans de Goede Cc: "Ilpo Järvinen" Cc: Maximilian Luz Cc: Hannes Reinecke Cc: "Martin K. Petersen" Cc: Helge Deller Cc: Masahiro Yamada Cc: Nathan Chancellor Cc: Nicolas Schier Cc: Johannes Berg Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Nick Desaulniers Cc: Bill Wendling Cc: Justin Stitt Cc: linux-input@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: netdev@vger.kernel.org Cc: linux-rdma@vger.kernel.org Cc: platform-driver-x86@vger.kernel.org Cc: linux-scsi@vger.kernel.org Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linux-kbuild@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: alsa-devel@alsa-project.org Cc: linux-sound@vger.kernel.org Cc: llvm@lists.linux.dev