Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp3384631lqp; Tue, 26 Mar 2024 07:52:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV/Ua/RzwrX2ggBVzmEuy06xyInUDzcY6diB/bI/b3vDJPTR+JNEadEcTVCe9nDHvDCBIa7Yn3fvO5GNC3kAaAJ+kG/dX5xmvxKpfd5CA== X-Google-Smtp-Source: AGHT+IGbzmLrfF5YRy8Ozyq6rWBC5CAU+MvvVhcLskZaSnd3LaBlCWIwq0IIPT6yQGv7lWoNrmYv X-Received: by 2002:a05:6214:62f:b0:696:74e6:3f25 with SMTP id a15-20020a056214062f00b0069674e63f25mr16100533qvx.40.1711464753150; Tue, 26 Mar 2024 07:52:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711464753; cv=pass; d=google.com; s=arc-20160816; b=yX3DG4qzwVdtDhzSbs94QoEpl/PV6nMs4PAkBhLGGTixt/nBipSmETaKMn4EiTQAFu 3S+M91H4h5XPGs/QZtR49Yc5SfSfZzJM9loVJLEukGsnBUqHtiS33KtGlen4pBaaAzSL q9b7TFGkT/AVD9IRHfmLQg+vK4hQw6NisG2gw6elvZHmZ5Rlen2Fax7uwkAIJA2mxnRd 9jHl0wkcjTP14ukK9Py40WvZUvcDBW2TJfhL7unk4cPnbfGSS62PXWGH8816QQTDynr4 O/pkz0mXyzUgMs/fVKTCa9UhDCarO8vEdVdXF/ItmzfNmhhgabwkdD59eqVyEG/pJbhN 8d7g== 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=oZ/+jcVFpOn0khgZtv4JTeJlAjBNFVrwyPkkwvToCvA=; fh=Nyew/h7v5TQjkq8FQ4xznOaoQ0ssQE6qFpB17sc1BII=; b=Xe/ysxF7+dVJkJETziGgKdA3S+EZZaMFQXBsMnofpvc/jK1tQyi0k4VgHZqEan49Wk RZxC++aVzdT2DLjxlt7wrfZushW1U21PPhgD/9ycPAEmdZ4rtP1M0q5QNqn3KzLnsvNQ xT5GtV97xcBaqPjRHriRXz5mcd2XH+bJkhk1BbX1eXS/2Dta7t0ZkzA0brUdUCkoPGyD xwONhv5bis4HTR2CROV5G/QhCSOiSYi3kixgVb5eptZOQuKorrpPFzsr67FRfG2U+Iei 4NupeihBp2QEk63GvJqdNM59EsubRq3JuC3n2tWYMiVOVH/v7UEoli316ly6DSlc7HyN OmXg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bc0Z5Ray; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-119222-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-119222-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. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id jz15-20020a0562140e6f00b006916700d754si2070244qvb.312.2024.03.26.07.52.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 07:52:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-119222-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bc0Z5Ray; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-119222-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-119222-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 482491C632F8 for ; Tue, 26 Mar 2024 14:52:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4929313C813; Tue, 26 Mar 2024 14:52:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bc0Z5Ray" 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 71694ED9; Tue, 26 Mar 2024 14:52:07 +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=1711464727; cv=none; b=Hsf9TQoNtrFpV69wy+M99+LKpnBkBeDIuusQ8ep/k3ZgS00Mj6Hz//vMZC7WVhCVW6/B7FfgJ1hmNCiC++8sA8/Nl4cYdqPwqKLih1OCemqUpRihA/lqi//0ZToj3FFuNXvpqtP7hbqjKA0yb5t4TJhc5mP2CqsaBFrJcO4Ky8E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711464727; c=relaxed/simple; bh=0okQEvlY3/SmSkoMjSltwkYaqxJU8EJLgR7wUY2TM0k=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ewIQXods4zGzd7ibNKoeMno/6pAvDLP+Lt+HK3S86kvvVLSL3JkHlIvxVSvTddXiOwCCdSpzdHyCM6eGjb+i2HZ25S7qWHhQudoN8K5ZphitQADDYLUvWy7+Y9AoCBSJHU/fvq8X2HliyEE3Vqrfw0ocSVTMzLyKTIGchAZfmx4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bc0Z5Ray; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 909C6C433C7; Tue, 26 Mar 2024 14:52:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711464727; bh=0okQEvlY3/SmSkoMjSltwkYaqxJU8EJLgR7wUY2TM0k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bc0Z5RayV1XemfrTMDXsxDPJZXCN3VR61E91hT+mSImmGfzt7ozPFX3xpbUh7fYQm zLYnyYJZeyyAt3NK0/UWbgU7S013p4YximxvX8rAk8k4+l1StTXNcS9Mz+meREfb10 7bOBiMDMcsvLi3nb2enppeHxmOpc3ElHM/3Cj66YKRKDQs095ZPRdTQp7Us98e5hxp 78YU5tu/pteXz0K3qKvPh+OBnXyWHMzbzmgqr6Mg6LcPBPlP4V3yjJcnVvFNyA4+MP iT0AvyPIgKgq69FDIHG8p0rLsa+m3rlJ7zuei7FGVXEgeFaW+prLcGPDnWNseU8sJW xt2xbOEG7Q+JQ== From: Arnd Bergmann To: linux-kbuild@vger.kernel.org, Masahiro Yamada Cc: Nicolas Schier , Nathan Chancellor , Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH 04/12] kbuild: remove redundant extra warning flags Date: Tue, 26 Mar 2024 15:51:29 +0100 Message-Id: <20240326145140.3257163-3-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240326144741.3094687-1-arnd@kernel.org> References: <20240326144741.3094687-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 | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn index c247552c192c..17b00d85f6aa 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,8 @@ 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 +137,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