Message ID | 20230212231638.1134219-95-sjg@chromium.org |
---|---|
State | RFC |
Delegated to: | Tom Rini |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=Uik3Ze8z; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PFNzp1WhNz23r9 for <incoming@patchwork.ozlabs.org>; Mon, 13 Feb 2023 10:32:22 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 88807858EE; Mon, 13 Feb 2023 00:25:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Uik3Ze8z"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9EF3F856CB; Mon, 13 Feb 2023 00:18:51 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 514798580E for <u-boot@lists.denx.de>; Mon, 13 Feb 2023 00:18:29 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd2b.google.com with SMTP id l128so3958472iof.2 for <u-boot@lists.denx.de>; Sun, 12 Feb 2023 15:18:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=II/lrTf5WWw4ZGATRCU9F5uYtOA16vr5w8IXn2x4i3k=; b=Uik3Ze8zWCz9ZcHu6cA9/9w7UO6KTiKm3dBrEcEF7zasZK2jE1fVfTlP9wHUsCx5DL ML8XPmNpy/wuWXMC7k4I1xgKT+sli7TN5yALIPXEm9JJtwsxfUR7cZQHI0KKs0MkOR5h qZTXdvtLqxDygRaywECtN2Noy57/6u5hb8R7E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=II/lrTf5WWw4ZGATRCU9F5uYtOA16vr5w8IXn2x4i3k=; b=3q7GSE9+BzoIfPq0Al6shzegI2C7LpbUQ1OrQoCj0O3tZ2O1M+Imdscz5kq9V5C3r2 fjXi3R1Tq/CubLo5qvrK4WgmYjfSJVmMiH9yWyfDk/DJNUUQFfVhbZ+fSh17NBpRua0l 5m5Y6fz0tHjfd8tC+HvI+L3rFTrhUxhWrNHD2KqatG4afJUbMgLhHHKu4TavlEvfxKpX nPnQuS3G2V8iCjiOJloZrOXIKN4KSb3uMlvFHpucLrFKR8Yy5EEOEihQPbYSDDnWlr92 4ofDOS9Z5e3KYCO0xmhNFOLfXiZbUl+d1JgnOAtRhupOsTRNutCFskVFwWj6Al+HwfYQ UWSw== X-Gm-Message-State: AO0yUKXRnLANrwVVRzpamR3KpTNfR8RHyPXemlkIAWlV0f2wz7U9DNX2 f8jIeL3Ds3lVf13JEv64KpfblTBIKYVTvCOI X-Google-Smtp-Source: AK7set86sk//ZI8hN654aDhaA3PplcSCBnuHVfUWFA6cxCzmrWRbAr55PgJuanGqrM2rRy2KFErwzg== X-Received: by 2002:a5e:9907:0:b0:734:e4df:cd7b with SMTP id t7-20020a5e9907000000b00734e4dfcd7bmr19380493ioj.6.1676243908751; Sun, 12 Feb 2023 15:18:28 -0800 (PST) Received: from sjg1.roam.corp.google.com (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id n16-20020a6b8b10000000b006dfbd35e995sm3627849iod.21.2023.02.12.15.18.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Feb 2023 15:18:28 -0800 (PST) From: Simon Glass <sjg@chromium.org> To: U-Boot Mailing List <u-boot@lists.denx.de> Cc: Tom Rini <trini@konsulko.com>, Simon Glass <sjg@chromium.org> Subject: [PATCH v3 94/95] checkpatch: Remove unwanted CONFIG_IS_ENABLED rules Date: Sun, 12 Feb 2023 16:16:37 -0700 Message-Id: <20230212231638.1134219-95-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.581.gbfd45094c4-goog In-Reply-To: <20230212231638.1134219-1-sjg@chromium.org> References: <20230212231638.1134219-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean |
Series |
RFC: Migrate to split config
|
expand
|
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index ccfcbb3e125..f6fdfcf58de 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2654,12 +2654,6 @@ sub u_boot_line { "Avoid setting skip_board_fixup env variable\n" . $herecurr); } - # Do not use CONFIG_ prefix in CONFIG_IS_ENABLED() calls - if ($line =~ /^\+.*CONFIG_IS_ENABLED\(CONFIG_\w*\).*/) { - ERROR("CONFIG_IS_ENABLED_CONFIG", - "CONFIG_IS_ENABLED() takes values without the CONFIG_ prefix\n" . $herecurr); - } - # Use _priv as a suffix for the device-private data struct if ($line =~ /^\+\s*\.priv_auto\s*=\s*sizeof\(struct\((\w+)\).*/) { my $struct_name = $1; @@ -7197,16 +7191,6 @@ sub process { "IS_ENABLED($1) is normally used as IS_ENABLED(${CONFIG_}$1)\n" . $herecurr); } -# check for #if defined CONFIG_<FOO> || defined CONFIG_<FOO>_MODULE - if ($line =~ /^\+\s*#\s*if\s+defined(?:\s*\(?\s*|\s+)(${CONFIG_}[A-Z_]+)\s*\)?\s*\|\|\s*defined(?:\s*\(?\s*|\s+)\1_MODULE\s*\)?\s*$/) { - my $config = $1; - if (WARN("PREFER_IS_ENABLED", - "Prefer IS_ENABLED(<FOO>) to ${CONFIG_}<FOO> || ${CONFIG_}<FOO>_MODULE\n" . $herecurr) && - $fix) { - $fixed[$fixlinenr] = "\+#if IS_ENABLED($config)"; - } - } - # check for /* fallthrough */ like comment, prefer fallthrough; my @fallthroughs = ( 'fallthrough', diff --git a/tools/patman/test_checkpatch.py b/tools/patman/test_checkpatch.py index 4c2ab6e590e..6eb73433a4f 100644 --- a/tools/patman/test_checkpatch.py +++ b/tools/patman/test_checkpatch.py @@ -405,12 +405,6 @@ index 0000000..2234c87 pm.add_line('include/myfile.h', '#include <dm.h>') self.check_single_message(pm, 'BARRED_INCLUDE_IN_HDR', 'error') - def test_config_is_enabled_config(self): - """Test for accidental CONFIG_IS_ENABLED(CONFIG_*) calls""" - pm = PatchMaker() - pm.add_line('common/main.c', 'if (CONFIG_IS_ENABLED(CONFIG_CLK))') - self.check_single_message(pm, 'CONFIG_IS_ENABLED_CONFIG', 'error') - def check_struct(self, auto, suffix, warning): """Check one of the warnings for struct naming
These are not relevant anymore so drop them. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Tom Rini <trini@konsulko.com> --- (no changes since v1) scripts/checkpatch.pl | 16 ---------------- tools/patman/test_checkpatch.py | 6 ------ 2 files changed, 22 deletions(-)