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 D063DC6FA8E for ; Sat, 25 Feb 2023 00:41:57 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9783D85B6B; Sat, 25 Feb 2023 01:41:54 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="YwCghM0w"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9725585B8A; Fri, 24 Feb 2023 19:11:03 +0100 (CET) Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) (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 DFA3485B6A for ; Fri, 24 Feb 2023 19:10:58 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=troykiskyboundary@gmail.com Received: by mail-pl1-x630.google.com with SMTP id c1so336673plg.4 for ; Fri, 24 Feb 2023 10:10:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=THXNuWxuj7IR+ZheoGC+eyQku7YsoqJE1pUVRLTSsnk=; b=YwCghM0w2IE7crYA/J9UwrBed2/zDFSpTGzaLplOhhAgWX3yKF5TcxhBJebFWhIlJb zPFaS9FH/w0wJCUPzuBMZBLwLvG2jcbTs5k5gBxYHyW4eMuHOzgXv8zDqumuz1t+Bz9s PX56Pi9/3X2QA8mNXvS/jh9k9bPX+c417c0ApkxVbmTmdynzvixsnmeZPtLs7WIi5C8z oshAL34kBlb+SN2Wr8hx/L/Cx32g9HfJa3PXs85PhKVz8rTNou02+ihXpU1WId3oCC9d emX474HkxktC4Ve2kQGtznEH8sYfUNf38eA+YUtROxjwNwe7txyhwlidZ8E2BL6EkkAN 5EhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=THXNuWxuj7IR+ZheoGC+eyQku7YsoqJE1pUVRLTSsnk=; b=V72qZqPOGUZOz7Hdz74whL0zvLjgB4w49tnfd9ROrLAsLuONM7GsNO1vUbc6K4cnIQ 5N+3xlChQM0zw3rOT3gpIOV6yZU1Jkvubgmbz8WLV/ndtBwB2AP6iuktjHy0/aedqGA1 vdtyWLcWr3cuQzQV7219R5s8e/tomFg4NklqOKC2TBLhBoRizgi9Ag8J7es6ClCuWxBq bY5a7PibkM4XzJxR2ApvgVseOSIdHVSPbQ3ZrAw6+o9nDHzHJaOOgOCXJcsOzZu+YSzH Hcv8m2tToYkPqJj0P98cgxe3mrhj5AZwRcKTWOM5DtbG8Emc2jShWvMd7hAxuno3/JpZ HIww== X-Gm-Message-State: AO0yUKXT03cudyEA0WwwGt/OfSj+tZPcVX0gQOvXiEV82h0FSnhqtjbV bKV9arucb0jyeP3wuMWWPFg= X-Google-Smtp-Source: AK7set/RW/QUjQtjPdTUHBcsQDuB2vlcufWGLLfxOZ9dpdjpENPOJlnQZqJvG5AL9w+SUetPYokDGA== X-Received: by 2002:a17:903:288d:b0:19c:e0fe:ed1a with SMTP id ku13-20020a170903288d00b0019ce0feed1amr1066525plb.26.1677262257222; Fri, 24 Feb 2023 10:10:57 -0800 (PST) Received: from OS2.boundarydevices.com. (wsip-184-189-120-117.oc.oc.cox.net. [184.189.120.117]) by smtp.gmail.com with ESMTPSA id o1-20020a170902bcc100b0019c922911a2sm7513957pls.40.2023.02.24.10.10.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Feb 2023 10:10:56 -0800 (PST) From: Troy Kisky To: sjg@chromium.org, trini@konsulko.com, u-boot@lists.denx.de Cc: gary.bisson@lairdconnect.com, Troy Kisky , AKASHI Takahiro , Andre Przywara , Baruch Siach , Bin Meng , Fabio Estevam , Heiko Thiery , Heinrich Schuchardt , Jaehoon Chung , Jason Liu , Joel Stanley , Klaus Goger , Loic Poulain , Lukasz Majewski , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Marek Vasut , Masahiro Yamada , "Matwey V. Kornilov" , Max Krummenacher , "NXP i.MX U-Boot Team" , Olaf Mandel , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Peter Hoyes , Quentin Schulz , Rasmus Villemoes , Rick Chen , Samuel Dionne-Riel , Samuel Holland , Stefan Roese , Stefano Babic , Sughosh Ganu , Tim Harvey Subject: [PATCH v2 00/26] CONFIG_IS_ENABLED vs IS_ENABLED Date: Fri, 24 Feb 2023 10:10:21 -0800 Message-Id: <20230224181047.2775829-1-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Sat, 25 Feb 2023 01:41:52 +0100 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 This patch set gets ready to check the usage of CONFIG_IS_ENABLED/IS_ENABLED. After the set has been applied, you can delete test/usage_of_is_enabled_todo.txt and run test/usage_of_is_enabled_commit.sh The script test/usage_of_is_enabled_check.sh checks for new questionable uses of CONFIG_IS_ENABLED/IS_ENABLED and is added to .azure-pipelines.yml, and .gitlab-ci.yml Changes in v2: - new patch - delay include of linux/kconfig.h to do from Makefile - include linux/kconfig.h from tools/Makefile - as suggested by Simon - keep #error, but change condition to use IS_ENABLED_NOCHECK - keep #error, but change condition to use IS_ENABLED_NOCHECK - changed condition of when to include field bdf - added protection to another instance of bdf in uart.c - Thanks to Simon for getting this corrected - use normal if, not preprocessor - new in series - use an accessor function gd_set_pci_ram_top - Always define function instead of using same protection Troy Kisky (26): kconfig: add IS_ENABLED_NOCHECK to bypass usage_of_is_enabled_check cmd: nvedit: check for ENV_SUPPORT lib: crc32: prepare for CONFIG_IS_ENABLED changes lib: md5: prepare for CONFIG_IS_ENABLED changes lib: sha1: prepare for CONFIG_IS_ENABLED changes lib: sha256: prepare for CONFIG_IS_ENABLED changes lib: sha512: prepare for CONFIG_IS_ENABLED changes tools: prevent CONFIG_IS_ENABLED errors by including linux/kconfig.h tools: Makefile: prepare for CONFIG_IS_ENABLED changes by adding CONFIG_TOOLS_xxx x86: cpu: qemu: qemu: remove SPL use with CONFIG_IS_ENABLED config_distro_bootcmd: remove booting environment variables from SPL environment ofnode: fdt_support definitions needed if OF_CONTROL is enabled ringneck-px30: use IS_ENABLED_NOCHECK to avoid CI test failure for ENV_IS_NOWHERE puma-rk3399: use IS_ENABLED_NOCHECK to avoid CI test failure for ENV_IS_NOWHERE fdt_support: always define fdt_fixup_mtdparts m53menlo: define ft_board_setup only if CONFIG_IS_ENABLED(OF_LIBFDT) freescale: common: pfuze: define pfuze_mode_init only if defined(CONFIG_DM_PMIC) ns16550: match when to define bdf with uart code solidrun: mx6cuboxi: use CONFIG_IS_ENABLED(SATA) instead of CONFIG_CMD_SATA wandboard: use CONFIG_IS_ENABLED(SATA) instead of ifdef CONFIG_SATA arm: mach-imx: use CONFIG_$(SPL_)SATA instead of CONFIG_SATA x86: cpu: i386: cpu: only set pci_ram_top if CONFIG_IS_ENABLED(PCI) gateworks: venice: Always define setup_fec and setup_eqos power: pmic: add dm style definitions if not CONFIG_IS_ENABLED(POWER_LEGACY) arm: cpu: armv7: ls102xa: fdt: remove eth_device support CI: add test/usage_of_is_enabled_check.sh .azure-pipelines.yml | 11 + .gitlab-ci.yml | 5 + arch/arm/cpu/armv7/ls102xa/fdt.c | 12 - arch/arm/mach-imx/Makefile | 2 +- arch/x86/cpu/apollolake/uart.c | 4 + arch/x86/cpu/i386/cpu.c | 2 +- arch/x86/cpu/qemu/qemu.c | 2 +- board/freescale/common/pfuze.c | 2 +- board/gateworks/venice/venice.c | 2 +- board/menlo/m53menlo/m53menlo.c | 2 + board/solidrun/mx6cuboxi/mx6cuboxi.c | 5 +- .../puma_rk3399/puma-rk3399.c | 2 +- .../ringneck_px30/ringneck-px30.c | 2 +- board/wandboard/wandboard.c | 5 +- cmd/nvedit.c | 5 +- include/asm-generic/global_data.h | 6 + include/config_distro_bootcmd.h | 23 ++ include/fdt_support.h | 26 ++- include/linux/kconfig.h | 5 + include/ns16550.h | 2 +- include/power/pmic.h | 2 +- lib/crc32.c | 11 +- lib/md5.c | 7 +- lib/sha1.c | 7 +- lib/sha256.c | 7 +- lib/sha512.c | 11 +- test/usage_of_is_enabled_check.sh | 19 ++ test/usage_of_is_enabled_commit.sh | 12 + test/usage_of_is_enabled_correct.sh | 50 +++++ test/usage_of_is_enabled_exempt.txt | 9 + test/usage_of_is_enabled_list.sh | 86 +++++++ test/usage_of_is_enabled_splcfg.txt | 21 ++ test/usage_of_is_enabled_todo.txt | 210 ++++++++++++++++++ tools/Makefile | 3 + 34 files changed, 527 insertions(+), 53 deletions(-) create mode 100755 test/usage_of_is_enabled_check.sh create mode 100755 test/usage_of_is_enabled_commit.sh create mode 100755 test/usage_of_is_enabled_correct.sh create mode 100644 test/usage_of_is_enabled_exempt.txt create mode 100755 test/usage_of_is_enabled_list.sh create mode 100644 test/usage_of_is_enabled_splcfg.txt create mode 100644 test/usage_of_is_enabled_todo.txt -- 2.34.1