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 638CAC05027 for ; Wed, 1 Feb 2023 15:48:33 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2FA2185C98; Wed, 1 Feb 2023 16:48:31 +0100 (CET) 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="fPimf3Il"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D898885C98; Wed, 1 Feb 2023 16:48:27 +0100 (CET) Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) (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 ED84085C90 for ; Wed, 1 Feb 2023 16:48:17 +0100 (CET) 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-qt1-x829.google.com with SMTP id c2so4041487qtw.5 for ; Wed, 01 Feb 2023 07:48:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; 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=rZaJ1ZyIWpg3Aw3B8WP8kZVAk03W7Pv/uqb3Cdiyq1Y=; b=fPimf3IlWjipbUBe6xb+83n1hz3H6U3q6agX0oXl3N364+1KuXpuJ0sWUp/MV+sVAL 7iozAhRUnpyo1KpXJKJ3JPcCO6kGMfkiYaorDEM4uRkvLzu6UGwdXAFt0pGV+aSIGQBX kV3OW3GrEJ/7+66N0LHpAHmZOxIaKbKdJyWAA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=rZaJ1ZyIWpg3Aw3B8WP8kZVAk03W7Pv/uqb3Cdiyq1Y=; b=HFlM0jxtmR+gwiuGUlpko6r2HPis84UZfBbM3dInZkYfNjgzC+MUQyA1gnYw+56xk7 6fFt3DmXepBFx+W8H8XZ55gh7XpmkKAmx0gIaZpwFa265DGaHo2MP1vgfzESAlQZNaEL GvXb/6cs1/WPryGSukzrF3guqTpJCmvNqxqgo8XYQQA7rzm5Uf5bn0tLttjuEddoYJIn zPXWZn+rNz7f/b/O7lyj/7O36EFJjiDveqDzllX55kS0UWDpgSHZlQVidNlcUQtlWBBa k3BeUkcyW43peuCyFYhjyz4yvp6VHIL6s458amtlJGaUu7aCa8PI1VX3fy2XkLsVoQm1 RewQ== X-Gm-Message-State: AO0yUKWX8BP3eeR/Fn3FNWUsGC0v+13I87LDGnOjeRLqxnMwAIgZFyjL r3tzlY3J2obKUplCMgFflv544kNFKGx/fMQY0HY= X-Google-Smtp-Source: AK7set/baF+A4N0VO+qnUFP4z75GsJ75+WaWMTzBw53GTF5pgM9r34pjy1xD7kygSPqlFS58v6EFgQ== X-Received: by 2002:a05:622a:1350:b0:3b6:a1c2:f63c with SMTP id w16-20020a05622a135000b003b6a1c2f63cmr3160341qtk.33.1675266496406; Wed, 01 Feb 2023 07:48:16 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-d3bc-07cf-bf94-8c52.res6.spectrum.com. [2603:6081:7b00:6400:d3bc:7cf:bf94:8c52]) by smtp.gmail.com with ESMTPSA id 8-20020a05620a078800b0070383f1b6f1sm12387664qka.31.2023.02.01.07.48.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 07:48:15 -0800 (PST) Date: Wed, 1 Feb 2023 10:48:14 -0500 From: Tom Rini To: Rasmus Villemoes Cc: Simon Glass , U-Boot Mailing List , Masahiro Yamada Subject: Re: [PATCH v2 09/87] Rename ARCH_NPCM7xx Message-ID: References: <20230129005903.74918-1-sjg@chromium.org> <20230129005903.74918-10-sjg@chromium.org> <416041af-edc9-9d86-76f1-f8aebe8af584@prevas.dk> <99babe88-6f78-7e5f-62e3-f47b26ee6428@prevas.dk> <8ee6e925-cc64-ea0b-c93a-793d5d01caf4@prevas.dk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="bQvafkH4+SN1ExZE" Content-Disposition: inline In-Reply-To: <8ee6e925-cc64-ea0b-c93a-793d5d01caf4@prevas.dk> X-Clacks-Overhead: GNU Terry Pratchett 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 --bQvafkH4+SN1ExZE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 01, 2023 at 01:19:51PM +0100, Rasmus Villemoes wrote: > On 31/01/2023 15.16, Simon Glass wrote: > > Hi Rasmus, > >=20 > > On Mon, 30 Jan 2023 at 14:12, Rasmus Villemoes > > wrote: > >> > >> On 30/01/2023 16.54, Tom Rini wrote: > >>> On Sun, Jan 29, 2023 at 10:57:28PM +0100, Rasmus Villemoes wrote: > >>>> On 29/01/2023 01.57, Simon Glass wrote: > >>>>> CONFIG options must not use lower-case letter. > >>>> > >>>> Why? > >>> > >>> So, kconfiglib complains about these. > >> > >> Which IMO would be a bug in kconfiglib. Can you point me at where that > >> warning is in kconfiglib.py and how it looks and when one would > >> encounter it? > >> > >>> However, I can't find a formal > >>> language definition and the kernel documentation doesn't specify, mer= ely > >>> imply that it should always be all uppercase. > >> > >> Well, yes, mostly, but since the de facto specification (namely, the > >> kernel's implementation) doesn't complain and the kernel's Kconfig fil= es > >> do contain several examples of config symbols with lowercase character= s, > >> why deviate? In particular, since we share a lot of code, if some piece > >> of kernel code has an IS_ENABLED(CONFIG_FOO876xx), why make it harder = to > >> import and keep that in sync? > >> > >> Perhaps we can get Masahiro to tell us whether lowercase characters are > >> allowed in kconfig symbols or not. > >> > >> For reference, another kconfig-using project decided to fix their own > >> infrastructure around kconfig instead of enforcing uppercase symbols: > >> > >> https://github.com/zephyrproject-rtos/zephyr/issues/40420 > >=20 > > That's all good context, thank you. > >=20 > > When we use #define it is normally with an upper-case string. The is > > the convention in U-Boot and Linux (and many other projects), I > > believe. >=20 > I don't disagree with the "normally", but that very word is precisely my > point: It's not universal, and there can be good reasons to deviate. > Both projects frown upon camelcase, so you don't see a lot of mixed-case > macros, but there's definitely a lot of all-lowercase ones (e.g. > iterators), and to pick just one example of a justified mixed-case one, > there's a "#define RANGE_mA" in some iio device. >=20 > Also, having lower and upper case strings does become > > confusing, and inconsistent. > >=20 > > I was unaware that lower-case was allowed in Linux. It seems there are > > 35 cases of this in Linux. >=20 > Dunno how you reach that number, I can easily find 174. Among them stuff > like "config FONT_6x11" which is definitely more readable than with an > uppercase X. But yes, either way it's a very small fraction of all > config symbols, but OTOH I highly doubt linux would accept patches to > start renaming those without a very strong reason - it would break > out-of-tree defconfig files. >=20 > > But perhaps we should not allow it in U-Boot? >=20 > Discourage, definitely, perhaps even add something to checkpatch. But > renaming existing seems to be pointless churn, and definitely needs a > better rationale than "is not allowed" when that is manifestly not true. >=20 > Maybe prepend a patch updating codingstyle.rst and amend this to say "is > not allowed by the U-Boot coding standard". Or otherwise please provide > some reference answering my "why". I suspect the answer here is that we should: - Patch (and submit upstream) kconfiglib.py to accept lowercase [a-z] as valid symbol names, as they are. - Add a sentence or two to codingstyle.rst about discouraging lowercase, as suggested by Rasmus - Drop the rename parts of this series. --=20 Tom --bQvafkH4+SN1ExZE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmPaiboACgkQFHw5/5Y0 tyywFwv+Of+vCWzEE9ES0iDRPeg2DcQkq4pMvrSjcChHc1E+mqT9B5/olXg9RNGh 6uWb8WnJ9IV7tP8t+x8w/HhvEEBgOPA6ocZ67G8M0kqGXohwJxNlvUgc2IgL0xQq boM5ufuIuQ9gT+La5XpyePsd5RIAmWDUCWQBpmrHdpV59iDLioJBYceaK8DXtyw4 NMGxnMAHvIlo/pRJW6VDitP0pHAOuQXKfyLDstJHH+YsdIKkhLSuXG1mC0Zx5NSi Yel5UIDGEGZosRNWheQKSA8R59pkSWhcUwj6ys+yL68aTtC295+wxKAFrsVmRsn1 iHPI3M2N7pZlOyEGuwK3DsWWBs+71BmhpUh/M8WTtql3euKlb8hn0F6Kuc8CPkjP SCk/98ONEdGXwDnsVpm74/r9wPxG2+0kSIRANfaeJa6/z3SpiDVQBZIuEJz7AJHO iXeSA129TuOYWslAXj3RR6t3fTxzXIxILAaidKYwsDBsZx35A9ligStYYzS7j8+Y zww8AS/s =uMEm -----END PGP SIGNATURE----- --bQvafkH4+SN1ExZE--