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 0C0EDC61DA4 for ; Mon, 13 Mar 2023 22:00:13 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C431085DAA; Mon, 13 Mar 2023 23:00:09 +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="SAn4NT6b"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E71D885BBD; Mon, 13 Mar 2023 22:31:59 +0100 (CET) Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) (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 3316B85982 for ; Mon, 13 Mar 2023 22:31:55 +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-x62c.google.com with SMTP id p6so14535177plf.0 for ; Mon, 13 Mar 2023 14:31:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678743113; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=/ZmFYEwxSRD2ZY2pXDn6CVTbF85hPtIj9C/ZTdQ+LOU=; b=SAn4NT6brIHI6kta3lJrIhAjiqxrvQpus2Gd50GsUoS8glPHufq3ZKbpDE8Ke8UFiz hEjd3w8r6EHuM5//sBjzTWnMX86jXB80RrYKrkTe5RRrCL/J4SmvkT5c2MVCzpO93NZ+ rzF9uX6b77ZEpzXvvYScB6EaJg7AAqHZRs0wKly8MZTZNfmxyT7HwzIaeidsZLJXVlbK gauDM1zcFIKHC38P6pBDnNpajp5s+47qhEGvq0XL9KvsZ2B8VJxSJnGu8ssu1+Legqej F9Og+d9ods9IoCjp3gAsJPUkZXx01DmhKof9mSV+2XGGy/ZQB0NRdpPQSH6npiUwOcqd kvmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678743113; 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=/ZmFYEwxSRD2ZY2pXDn6CVTbF85hPtIj9C/ZTdQ+LOU=; b=UeKji42zKumL/c/5mx+SFHUfKAyG886h9JTC+ZdDLfrP/BTaDkGcXBhhm9ntgv3CgV xHgJmb/ovD07OMbg0hi7FJVXO4l/WHIzjHgNa3DNgBhLVHShwmqDhDlGv+1iLl1gf582 qi3zhQwEX5SjVHRyl1jNxOn+iRbKCl4KRCeGAM2/Vj8h9HJi9+r8WWD50fC6kBO4HMK4 Fo2ijtznS5mp37ZiUcNwbyG543sBd7yozD0ldDEhfliYrkNfXpnNoTTdH1pmXYK0KxEE ivE4JXCGf5JTx98nIy8W4HqDAnISIwRWnHQgXFSVwPfPdcB7sLBNjxDeLW7nwt83CaDP FEig== X-Gm-Message-State: AO0yUKULnSgDQtLuJLISfE/dGhfx02nL47wqnTBGh5WovMYyoPwTgA+/ xN68Uq2xzVRY2VuBMW95mL0= X-Google-Smtp-Source: AK7set8DBudXBiWOj/B+UUiUro96UzEjxK93Fyp8RDhou7LeZ2RdHzpDJNGk1znxS0r631Sel0ZXvw== X-Received: by 2002:a05:6a20:69a8:b0:c7:7d45:50fb with SMTP id t40-20020a056a2069a800b000c77d4550fbmr31322955pzk.28.1678743113298; Mon, 13 Mar 2023 14:31:53 -0700 (PDT) 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 s24-20020aa78298000000b005d4360ed2bbsm150797pfm.197.2023.03.13.14.31.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 14:31:52 -0700 (PDT) From: Troy Kisky To: sjg@chromium.org, trini@konsulko.com, u-boot@lists.denx.de Cc: gary.bisson@lairdconnect.com, Troy Kisky , AKASHI Takahiro , Alper Nebi Yasak , Andre Przywara , Andrew Davis , Angelo Dureghello , Ashok Reddy Soma , Aspeed BMC SW team , Baruch Siach , Bin Meng , Chia-Wei Wang , Daniel Golle , Fabio Estevam , Frieder Schrempf , Heiko Thiery , Heinrich Schuchardt , Huan Wang , Jaehoon Chung , Joe Hershberger , Joel Stanley , Loic Poulain , Lukasz Majewski , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Marek Vasut , Mario Six , Masahiro Yamada , "Matwey V. Kornilov" , Max Krummenacher , Michal Simek , Michal Suchanek , "NXP i.MX U-Boot Team" , Olaf Mandel , Oleksandr Suvorov , Ovidiu Panait , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Peter Hoyes , Quentin Schulz , Rasmus Villemoes , Rick Chen , Ryan Chen , Samuel Dionne-Riel , Samuel Holland , Stefan Roese , Stefano Babic , Sughosh Ganu , Wolfgang Denk , Wolfgang Wegner Subject: [PATCH v3 00/23] CONFIG_IS_ENABLED vs IS_ENABLED Date: Mon, 13 Mar 2023 14:31:22 -0700 Message-Id: <20230313213146.1775650-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: Mon, 13 Mar 2023 23:00:07 +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.8 at phobos.denx.de X-Virus-Status: Clean This patch set gets ready to checks 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 version 3 changes: Dropped changes to puma-rk3399 and ringneck-px30 in favor of Quentin Schulz's patch https://patchwork.ozlabs.org/project/uboot/patch/20230301-tsd-env-nowhere-kconfig-v1-1-d5c08e096906@theobroma-systems.com/ https://patchwork.ozlabs.org/project/uboot/patch/20230301-tsd-env-nowhere-kconfig-v1-2-d5c08e096906@theobroma-systems.com/ Please apply them before this series. Drop gateworks: venice: Always define setup_fec and setup_eqos Drop arm: cpu: armv7: ls102xa: fdt: remove eth_device support Simon's patches took care of these Add to todo list, these new questionable uses that snuck into the code. PARTITION_TYPE_GUID PHY_ATHEROS RTC_SANDBOX Changes in v3: remove error entirely and prevent with Kconfig new patch to address Tom's concerns - Rebase on Simon's s/CMD_SATA/SATA/ change - commit message updated Changes in v2: - new patch - delay include of linux/kconfig.h to do from Makefile - as suggested by Simon - delay include of linux/kconfig.h to do from Makefile - as suggested by Simon - delay include of linux/kconfig.h to do from Makefile - as suggested by Simon - delay include of linux/kconfig.h to do from Makefile - as suggested by Simon - delay include of linux/kconfig.h to do from Makefile - as suggested by Simon - include linux/kconfig.h from tools/Makefile - as suggested by Simon - 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 Troy Kisky (23): kconfig: add IS_ENABLED_NOCHECK to bypass usage_of_is_enabled_check cmd: nvedit: remove error check, handle with Kconfig 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 watchdog: add and use Kconfig HAS_WATCHDOG_RUNNING 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 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 ifdef CONFIG_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) power: pmic: add dm style definitions if not CONFIG_IS_ENABLED(POWER_LEGACY) CI: add test/usage_of_is_enabled_check.sh .azure-pipelines.yml | 11 ++ .gitlab-ci.yml | 5 + arch/arm/mach-imx/Makefile | 2 +- arch/arm/mach-omap2/boot-common.c | 5 +- arch/m68k/lib/time.c | 7 +- arch/powerpc/lib/interrupts.c | 5 +- arch/powerpc/lib/ticks.S | 2 +- arch/x86/cpu/apollolake/uart.c | 4 + arch/x86/cpu/i386/cpu.c | 2 +- arch/x86/cpu/qemu/qemu.c | 2 +- board/astro/mcf5373l/fpga.c | 10 +- board/freescale/common/pfuze.c | 2 +- board/menlo/m53menlo/m53menlo.c | 2 + board/solidrun/mx6cuboxi/mx6cuboxi.c | 5 +- board/wandboard/wandboard.c | 5 +- boot/image-board.c | 2 +- cmd/nvedit.c | 32 +--- cmd/ximg.c | 10 +- common/board_f.c | 4 +- common/spl/Kconfig | 4 + drivers/crypto/aspeed/aspeed_hace.c | 2 +- drivers/crypto/hash/hash_sw.c | 2 +- drivers/timer/mpc83xx_timer.c | 5 +- drivers/watchdog/Kconfig | 3 + env/Kconfig | 17 ++- fs/cramfs/uncompress.c | 9 +- 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 +- include/watchdog.h | 7 +- lib/bzip2/bzlib.c | 5 +- lib/bzip2/bzlib_decompress.c | 20 +-- 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 | 213 +++++++++++++++++++++++++++ tools/Makefile | 3 + 48 files changed, 584 insertions(+), 127 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