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 X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AFD3CC07E9B for ; Tue, 20 Jul 2021 15:05:35 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id EE77B61164 for ; Tue, 20 Jul 2021 15:05:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EE77B61164 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kollasch.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2FA9F82F24; Tue, 20 Jul 2021 17:01:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=kollasch.net Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 2E82E82EB7; Tue, 20 Jul 2021 17:00:31 +0200 (CEST) Received: from poghril.kollasch.net (poghril.kollasch.net [71.19.157.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7D2AC82EEE for ; Tue, 20 Jul 2021 17:00:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=kollasch.net Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=jakllsch@kollasch.net Received: from mail.kollasch.net (mail.kollasch.net [IPv6:2001:470:c03b::454d:4149:4c30]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.kollasch.net", Issuer "kollasch.net postmaster CA" (verified OK)) by poghril.kollasch.net (Postfix) with ESMTPS id D5D4D5C457; Tue, 20 Jul 2021 15:00:17 +0000 (UTC) (envelope-from jakllsch@kollasch.net) Received: from mail.kollasch.net (localhost [127.0.0.1]) by mail.kollasch.net (Postfix) with ESMTP id 265D21DC92; Tue, 20 Jul 2021 15:00:11 +0000 (UTC) (envelope-from jakllsch@kollasch.net) Received: from tazenda.kollasch.net (tazenda.kollasch.net [IPv6:2001:470:c03b:0:216:3eff:fe1e:883]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jakllsch@KOLLASCH.NET) by mail.kollasch.net (Postfix) with ESMTPSA id 063721DC91; Tue, 20 Jul 2021 15:00:10 +0000 (UTC) (envelope-from jakllsch@kollasch.net) Date: Tue, 20 Jul 2021 10:00:13 -0500 From: "Jonathan A. Kollasch" To: Simon Glass Cc: U-Boot Mailing List , Eugeniu Rosca , Roland Gaudig , Heinrich Schuchardt , Stefan Herbrechtsmeier , Sean Anderson , Marek =?iso-8859-1?Q?Beh=FAn?= , Tom Rini , Marek Vasut , Joe Hershberger Subject: Re: [PATCH 00/15] lib: Add support for a decimal 0m prefix for numbers Message-ID: <20210720150012.GW6855@tazenda.kollasch.net> References: <20210720132940.1171011-1-sjg@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210720132940.1171011-1-sjg@chromium.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean On Tue, Jul 20, 2021 at 07:29:24AM -0600, Simon Glass wrote: > U-Boot mostly uses hex for value input, largely because addresses are much > easier to understand in hex. > > But in some cases a hex value is requested, but it is more convenient to > provide a decimal value. This may be because the value comes from another > source, where its base cannot be controlled. > > This series adds support for a 0m prefix to indicate a decimal number. The > letter 'm' is chosen because: > > - 'm' as in deciMal > - cannot use a-f since they indicate a hex value (e.g. 0d would be > ambiguous) > - 'l' is harder to read since 1 and l look similar (0l123) > - 't' (as in ten) seems a bit obscure NetBSD ddb(4) uses 0t as a prefix for base 10. Jonathan