Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1389493lqp; Mon, 15 Apr 2024 05:21:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVrm8LH21bcPS67BuiM8+oJBhU8DO1wYz1HpAn3OHCauB010v8wCFfDSY46Mghx21b8u53rSoLFgha7lCejNhrMdpDXdPsuQOAdojSnlg== X-Google-Smtp-Source: AGHT+IH1mzK489xiK0Xuz0n4RuJJSt4K1fNgg464Kuvbr9YeHmjwkE44Zcruh0Bkzdtxy0fSVUYo X-Received: by 2002:a17:906:3b99:b0:a52:527c:ea86 with SMTP id u25-20020a1709063b9900b00a52527cea86mr3279753ejf.33.1713183714992; Mon, 15 Apr 2024 05:21:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713183714; cv=pass; d=google.com; s=arc-20160816; b=cN9q0oxuOqRegFv21eki2KEohNeQrNsq3ENdSFOykaMYL0Ku2hUbez+YtIHnKiPrWJ FIt2cHmYUqdc9lMgEH96tQVDSgSsP3c16JLV48TE9xMZUhxhf9zOm2oSPFMQjRXWyJvJ C5Amg4zrmS86nVeGBii0+TEriD/yu1kfLS+fYsQyD4o704dJDZrOuRdEtg1kL7RIrJRl 2tOI/KOJrrh6WPhDOEvXl5XB8vAa3WQQSQrDNLwFC5seJ2VeXPQjssGv9oXO06UfkwQp bh69ulLe9hdNYNVZpKeOFQjCX26H5S7u5u1SOAqdS881td0HItun5WmYT/VZPBEk/Z75 V9ew== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=77eYAD7dkJ4UFebLfZ9d4686wM5KWGsrM/H/bYH9AFI=; fh=8mZP3M6PAgp/PjjZstGz5vfdgfC3/JFy0A6tayPaJ0U=; b=XM3WapqlE3hAVx2heidr2xXGxylXGDpIWATJEoVhY1dJqGXvl5W/U/pMlIXrtZySav oXX83nsGsHBADQOhlzbBWPq1POJzXMcg/Oq4FNp6eWrtKOARX3dowBbdDc+pswF1yJ6Z VxCw3g/QRvMw6mIMn4x4ub4huoVpDxoqHICnWERT3xLdA6jR1DHI9gsO0Qn7YfHdp9bs 1IZxrbeOvVVwndxAx9smlUPkR/Wwl1ZjSMsSPSFTjyw7oEHelfzy/Fawfmw6u0dLdUJc 5z+viABSeJb7+85DkHnA0eVARXoMFMsFckibDgv90HWlo0u9S42Y55/BqDCYkhlUn/rE tEHw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i7rNnt4o; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-145056-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145056-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 hd18-20020a170907969200b00a51930774a4si4730092ejc.615.2024.04.15.05.21.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 05:21:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-145056-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=i7rNnt4o; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-145056-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145056-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 2ED891F22860 for ; Mon, 15 Apr 2024 12:21:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9C2C86EB51; Mon, 15 Apr 2024 12:20:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="i7rNnt4o" 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 B6CE06E612; Mon, 15 Apr 2024 12:20:50 +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=1713183650; cv=none; b=Rd90qPFKs6vVZjARAMuVJGcuVabmT8b0yDixAcxWBuEjO6Fp/GgqN9/bWJMoNWUEQry9QVVdLb16kCyZYRYCfIZ7gKWKQaKzLnbDyeL96DbP1M4/oPRvsmEbXk7tmQFQ1QWJSPrJkGVOKGvDyGaFuVIwCEVODZLaY0OyzcNS1SU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713183650; c=relaxed/simple; bh=eLuBpJKWhyM4IlNLRbcijbvdvKbw+xEyERqd1eOHI0E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=q8z4nhaLle4Lw1kp7S2Uj9Ev0XRgM25/+rEPlZn6PYHTJQYbIcZQ4FyPZfLxB3aP6iPJAyaYedmmW6m4Umt5NXuBRzmJpPELzAtF0SfdaRToeVJDtC1vFoGGny/Z7bWYDDiRFLhEZOD/ghIXCk4Z7re2ECduk/wLJ6ZV1ArYnxw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=i7rNnt4o; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6DE58C3277B; Mon, 15 Apr 2024 12:20:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713183650; bh=eLuBpJKWhyM4IlNLRbcijbvdvKbw+xEyERqd1eOHI0E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i7rNnt4oi5SBsEAOZbb234zsfmvss2yhv/ZCiVHEtRa9wACjgvLvKMPzMtU4nJnNu 7cKfrxmtQsJElyGYLFiDLW7az7bN/RvFHKatGpIuVAUwxRqDWdE0pgABqXJaASheUP gMK3fRjJa+bk7tAgcyFlET1CVhEs3g4WjDEwEEBzo+Y/Q5yxi5p6xQC1U3/zsDpRWf 4UP/G6GUgPaH9J+kOCW8W9uyFrGJ9qluidrPUUjtYatSm/s2XbfZHUWAUjXO/VYfPr zQUABzblNx0ze2zXNyH3lmMCS1YtB3huNrmDmU1/wilYGg2idfuHSpNT+GWmSHLwdZ cq8sujwxUrcnQ== From: Arnd Bergmann To: Andrew Morton Cc: Arnd Bergmann , Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Kees Cook , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/6] [v3] kbuild: remove redundant extra warning flags Date: Mon, 15 Apr 2024 14:20:33 +0200 Message-Id: <20240415122037.1983124-3-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240415122037.1983124-1-arnd@kernel.org> References: <20240415122037.1983124-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Arnd Bergmann There is no point in turning individual options off and then on again, or vice versa, as the last one always wins. Now that -Wextra always gets passed first, remove all the redundant lines about warnings that are implied by either -Wall or -Wextra, and keep only the last one that disables it in some configurations. This should not have any effect but keep the Makefile more readable and the command line shorter. Signed-off-by: Arnd Bergmann --- scripts/Makefile.extrawarn | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn index c247552c192c..8b3f5b62b837 100644 --- a/scripts/Makefile.extrawarn +++ b/scripts/Makefile.extrawarn @@ -37,11 +37,6 @@ else KBUILD_CFLAGS += -Wno-main endif -# These warnings generated too much noise in a regular build. -# Use make W=1 to enable them (see scripts/Makefile.extrawarn) -KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable) -KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable) - # These result in bogus false positives KBUILD_CFLAGS += $(call cc-disable-warning, dangling-pointer) @@ -90,16 +85,9 @@ KBUILD_CFLAGS += -Wunused # ifneq ($(findstring 1, $(KBUILD_EXTRA_WARN)),) -KBUILD_CFLAGS += $(call cc-option, -Wrestrict) KBUILD_CFLAGS += -Wmissing-format-attribute -KBUILD_CFLAGS += -Wold-style-definition KBUILD_CFLAGS += -Wmissing-include-dirs -KBUILD_CFLAGS += $(call cc-option, -Wunused-but-set-variable) KBUILD_CFLAGS += $(call cc-option, -Wunused-const-variable) -KBUILD_CFLAGS += $(call cc-option, -Wpacked-not-aligned) -KBUILD_CFLAGS += $(call cc-option, -Wformat-overflow) -KBUILD_CFLAGS += $(call cc-option, -Wformat-truncation) -KBUILD_CFLAGS += $(call cc-option, -Wstringop-truncation) KBUILD_CPPFLAGS += -Wundef KBUILD_CPPFLAGS += -DKBUILD_EXTRA_WARN1 @@ -150,9 +138,6 @@ ifneq ($(findstring 2, $(KBUILD_EXTRA_WARN)),) KBUILD_CFLAGS += -Wdisabled-optimization KBUILD_CFLAGS += -Wshadow KBUILD_CFLAGS += $(call cc-option, -Wlogical-op) -KBUILD_CFLAGS += -Wmissing-field-initializers -KBUILD_CFLAGS += -Wtype-limits -KBUILD_CFLAGS += $(call cc-option, -Wmaybe-uninitialized) KBUILD_CFLAGS += $(call cc-option, -Wunused-macros) KBUILD_CPPFLAGS += -DKBUILD_EXTRA_WARN2 -- 2.39.2