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 519B8C77B7C for ; Thu, 11 May 2023 19:34:09 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8935A861D7; Thu, 11 May 2023 21:32:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com 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=konsulko.com header.i=@konsulko.com header.b="ThTxCp16"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F1D56861AC; Thu, 11 May 2023 21:30:54 +0200 (CEST) Received: from mail-yw1-x1129.google.com (mail-yw1-x1129.google.com [IPv6:2607:f8b0:4864:20::1129]) (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 1FCB9861BF for ; Thu, 11 May 2023 21:30:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-559f1819c5dso136196757b3.0 for ; Thu, 11 May 2023 12:30:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1683833447; x=1686425447; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=qK0yhrMB6eMbblaQ22t3I5Hf6UAbYXYJYFZrVpTj818=; b=ThTxCp16WL8Bq69QWZV3R2FD45ufqbsU0hVKgQNOrWtfmo+Xmdn8e9L6Jfw7MDjL5Q TGN6oJfgKf8L2M24P27qkN0RT+mvrHkVqshTVX7u2ICP5roytJeYN5iuJFZCC3nArTEG 1yVo8C/znc57vcBk7ugEnCnU8AYeEOEoFR5z0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683833447; x=1686425447; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=qK0yhrMB6eMbblaQ22t3I5Hf6UAbYXYJYFZrVpTj818=; b=CRehO5rfFM5BYFYXauVzuejSJQ9RcsPJKxXDD0NfrKSf9rq3FT1FAZkrJM+jmmzQb3 z9rMR61B1eyegkF+h2h3AWtmVokKHrFXp3ZTfUreD8QqDNmy7s4ndbO3c0qpuTczXMqR udBIKjbLRwdtwLrC0HkzK37wuC+GSVg3mr4fOervTsFjMI1QLFZ4/2T9WEjcpNUjO01s OMRnbYKGSPMSZFTREkqh3VEebd6NCJACuNwZh+63VkEXjo01GF7Ntt/m+hObw70gevfg 7QV1N0imrp5geIh1XKZSNqV11EfJWsVrdWFQFAcHD9oVmgr7Y7sCpX2viTm7k/kPsoxG gByg== X-Gm-Message-State: AC+VfDymL19MGiCDO2/hTTqm+68947t0j1T5ga9aHCn4GN8S5CN1c1kk +XxmG0+R0Of0cU/y3I9wrGrMUQ== X-Google-Smtp-Source: ACHHUZ63txS1IWhbN9RZ+SzYflWI+b2Ox7o/xpXH7EdhaGS+KxESoowE/h1u5s175CUAeid2P4TfZQ== X-Received: by 2002:a81:4a82:0:b0:54f:bb49:c3a2 with SMTP id x124-20020a814a82000000b0054fbb49c3a2mr14032260ywa.28.1683833446619; Thu, 11 May 2023 12:30:46 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-f28e-c97c-cd14-627d.res6.spectrum.com. [2603:6081:7b00:6400:f28e:c97c:cd14:627d]) by smtp.gmail.com with ESMTPSA id z184-20020a8189c1000000b00560beb1c97bsm2251138ywf.97.2023.05.11.12.30.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 12:30:46 -0700 (PDT) Date: Thu, 11 May 2023 15:30:43 -0400 From: Tom Rini To: Troy Kisky Cc: sjg@chromium.org, u-boot@lists.denx.de, gary.bisson@lairdconnect.com, 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 , Marek =?iso-8859-1?Q?Beh=FAn?= , 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 , Pali =?iso-8859-1?Q?Roh=E1r?= , 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: Re: [PATCH v3 00/23] CONFIG_IS_ENABLED vs IS_ENABLED Message-ID: <20230511193043.GZ2398826@bill-the-cat> References: <20230313213146.1775650-1-troykiskyboundary@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="b389l1vcxPe0fP0U" Content-Disposition: inline In-Reply-To: <20230313213146.1775650-1-troykiskyboundary@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett X-Mailman-Approved-At: Thu, 11 May 2023 21:32:08 +0200 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 --b389l1vcxPe0fP0U Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 13, 2023 at 02:31:22PM -0700, Troy Kisky wrote: > This patch set gets ready to checks the usage of > CONFIG_IS_ENABLED/IS_ENABLED. >=20 > 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 >=20 > 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 >=20 > 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. >=20 > 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 >=20 > Add to todo list, these new questionable uses that snuck into the code. > PARTITION_TYPE_GUID > PHY_ATHEROS > RTC_SANDBOX >=20 > 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 >=20 > 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 So, I've provided some feedback on a few of these in particular, and applied a number of others. The biggest problems I see are that I'm not sure that overall the changes make the code more readable. When I ran the whole conversion series there were a few places where the resulting code changed because of how things are used today. Not as a problem for you to jump off and solve, but, looking harder at this makes me think that going for CONFIG_(SPL|TPL|VPL|etc)_FOO makes it harder to use the macros people expect from the kernel, where things are done as a suffix and so we could just use IS_ENABLED(CONFIG_FOO) and have things expand to test for CONFIG_FOO || (CONFIG_FOO_SPL && CONFIG_SPL_BUILD) || .. --=20 Tom --b389l1vcxPe0fP0U Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmRdQl8ACgkQFHw5/5Y0 tyzuiAwAilGCUZvdx1MtFrAGVF5YRUJq3HzJudNiOgF7gY4wsaxtHcBfCvk5Fps9 3E93zk2VVvtTxye+d6YoPpixUnsERx2EZWRdhwsXa5aZVLzJmBMjQKWdsdywnAYM FIWa/IFBzo9OaDkRljRi1AfLV9Qwqd4Z2a66Ol/RxI0EmUoCu6nccVKRswRyBa0J 4uV6UMnOkq2jiWTuOZx7/5lHYe4eLLHqUi+tjhTwKy/qBWxI14rz3ZtHpA1jqs73 oddruiwfhQQiA7R1mG0NBBi1SQj40BJPrtLyfpdwoxfPPAAskHE5zeLlghc8BSq2 T5a/yTkm/TruQt1SOXE3ibCeULGvUHpZmlytPM7qhrOCNl3UVEj3IKiZ3j57RL8g Xf7PeRlJQQvjXjf70CWQRW66/Hfd1TtQV7zbliMC55lnUs1ULMYyMpFXn3SdJLrK /gcGbbjfv+YpCgM3FczUaz5KLkgG7qC/Uqm1/v0bt6YSCZWSlQ9tpwHXVwhP13/1 Bc1KBPOn =cfL6 -----END PGP SIGNATURE----- --b389l1vcxPe0fP0U--