From mboxrd@z Thu Jan 1 00:00:00 1970 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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1F43FC636CC for ; Tue, 31 Jan 2023 15:33:54 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3DFD185B52; Tue, 31 Jan 2023 16:29:58 +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="XSumH4JX"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3E2CA85AFE; Tue, 31 Jan 2023 16:28:36 +0100 (CET) Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) (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 E1BF785AE7 for ; Tue, 31 Jan 2023 16:28:14 +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-il1-x12d.google.com with SMTP id l7so4747742ilf.0 for ; Tue, 31 Jan 2023 07:28:03 -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=WCWvr4ohVG5mNArdQzSiT+qeQVwKlRtlKAbAmPhdMww=; b=XSumH4JXCj5ns9HUiVJsnLSaAwt4TEF9VEv3go7uwxdisp1W/KQE8lmG8uj0V8Rtyz bdDUAIlXQav4+5GTiwZtieJq9qkcF/omcp6xAvu5VaqtCmcjeqajJ1LB8eouXnd/y67B 6tbck0hu3bHobI8cQgb8jtioSlqxtKFMBlFs4= 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=WCWvr4ohVG5mNArdQzSiT+qeQVwKlRtlKAbAmPhdMww=; b=s4EiueU/hOzEP5Dj5+H/aPcKTNbfdP67fTiZQlGvi9cri5p5QHaVmwwjYdCniWwsS0 bgrbEBccsQsVofsG0CRfga2SJNOOSVEzePHH1bHZM3XTaRZ5NkzRLaUpPKfx52q7Ot1+ FDo2xxPLQAWt7WGPrt6/R41GfbW7lR2ViBZIUKniywx3H10fB3otLKSXfYwfcq9HQ63I ADHz/bGBio5/O0A6LV+fKH/vt1VmFt9Unj54MYUCLciaA4pUEyB2fRUFEEFHhmfKTIP+ vlRKCTHJDf1BLWRXl7clnl5kLTAvZHCatUdXyGEVH+VuAjDAOilI7jNLE5ioLT3Gqvwv OzvQ== X-Gm-Message-State: AO0yUKUxivtRnTP9vmDP9EBKDJuoBVyxThR2uZSK95uMzgp+b3nbIee3 9pqJ6ANB2fIu7jElHMSBZGnqUNsq8wX0pyUg X-Google-Smtp-Source: AK7set+QZBSnwVH4ZhFapgqUX5nSRSXr/i8nzw43QAffx6Ux4SaEKocuq1fejxzGRJ+7Fx+dnWPqLg== X-Received: by 2002:a05:6e02:1b05:b0:311:e5:5d15 with SMTP id i5-20020a056e021b0500b0031100e55d15mr4923738ilv.10.1675178882706; Tue, 31 Jan 2023 07:28:02 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.28.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:28:02 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Masahiro Yamada Subject: [PATCH 28/32] kconfig: Drop CONFIG_IS_ENABLED() Date: Tue, 31 Jan 2023 08:26:58 -0700 Message-Id: <20230131152702.249197-29-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean We can use IS_ENABLED() now, so drop the CONFIG_IS_ENABLED() macro. Signed-off-by: Simon Glass --- include/linux/kconfig.h | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/include/linux/kconfig.h b/include/linux/kconfig.h index 77d8e6b6129..50e5a3d7606 100644 --- a/include/linux/kconfig.h +++ b/include/linux/kconfig.h @@ -61,32 +61,26 @@ #define __unwrap1(case1, case0) __unwrap case1 #define __unwrap0(case1, case0) __unwrap case0 -#define __CONFIG_IS_ENABLED_1(option) __CONFIG_IS_ENABLED_3(option, (1), (0)) -#define __CONFIG_IS_ENABLED_2(option, case1) __CONFIG_IS_ENABLED_3(option, case1, ()) -#define __CONFIG_IS_ENABLED_3(option, case1, case0) \ +#define __IS_ENABLED_1(option) __IS_ENABLED_3(option, (1), (0)) +#define __IS_ENABLED_2(option, case1) __IS_ENABLED_3(option, case1, ()) +#define __IS_ENABLED_3(option, case1, case0) \ __concat(__unwrap, config_enabled(option, 0)) (case1, case0) /* - * CONFIG_IS_ENABLED(CONFIG_FOO) returns 1 if CONFIG_FOO is enabled for the - * phase being built, else 0. + * IS_ENABLED(CONFIG_FOO) returns 1 if CONFIG_FOO is enabled for the phase being + * built, else 0. * * The optional second and third arguments must be parenthesized; that * allows one to include a trailing comma, e.g. for use in * - * CONFIG_IS_ENABLED(CONFIG_ACME, ({.compatible = "acme,frobnozzle"},)) + * IS_ENABLED(CONFIG_ACME, ({.compatible = "acme,frobnozzle"},)) * * which adds an entry to the array being defined if CONFIG_ACME is * set, and nothing otherwise. */ -#define CONFIG_IS_ENABLED(option, ...) \ - __concat(__CONFIG_IS_ENABLED_, __count_args(option, ##__VA_ARGS__)) (option, ##__VA_ARGS__) - -/* - * IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y', - * 0 otherwise. - */ -#define IS_ENABLED(option, ...) CONFIG_IS_ENABLED(option, ##__VA_ARGS__) +#define IS_ENABLED(option, ...) \ + __concat(__IS_ENABLED_, __count_args(option, ##__VA_ARGS__)) (option, ##__VA_ARGS__) #ifndef __ASSEMBLY__ /* -- 2.39.1.456.gfc5497dd1b-goog