All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: Wolfgang Denk <wd@denx.de>
Cc: "Tom Rini" <trini@konsulko.com>,
	"U-Boot Mailing List" <u-boot@lists.denx.de>,
	"Eugeniu Rosca" <erosca@de.adit-jv.com>,
	"Roland Gaudig" <roland.gaudig@weidmueller.com>,
	"Heinrich Schuchardt" <xypron.glpk@gmx.de>,
	"Stefan Herbrechtsmeier" <stefan.herbrechtsmeier@weidmueller.com>,
	"Sean Anderson" <seanga2@gmail.com>,
	"Marek Behún" <marek.behun@nic.cz>, "Marek Vasut" <marex@denx.de>,
	"Joe Hershberger" <joe.hershberger@ni.com>
Subject: Re: [PATCH 00/15] lib: Add support for a decimal 0m prefix for numbers
Date: Wed, 21 Jul 2021 08:46:03 -0600	[thread overview]
Message-ID: <CAPnjgZ3ywNr-NLcU_9-x8Qx2tSxqxk1hgzpb2RoxYOPC=j6mdA@mail.gmail.com> (raw)
In-Reply-To: <912010.1626853970@gemini.denx.de>

Hi Wolfgang,

On Wed, 21 Jul 2021 at 01:53, Wolfgang Denk <wd@denx.de> wrote:
>
> Hi,
>
> In message <20210720160547.GM9379@bill-the-cat> you wrote:
> >
> > > So for example (10)123 would mean decimal 123? I don't know how we
> > > would parse brackets separately from expressions though.
> >
> > (123)10 would be "123" in decimal.  Which is indeed a mouthful.  But it
> > would also be generic and (123)16 would be 0x123.  So the parsing
> > shouldn't be too hard, for most commands.  But then yes, expressions
> > become quite hard.
>
> Come on, guys, be serious!  This is a boot loader.  Size matters.
>
> Do we _really_ need all this, and is it worth the code size?
>
> Simon's patches include some cleanup, which probably even reduces
> the size, so good.

It reduces U-Boot proper by about 400-700 bytes but not much effect on SPL:

16: RFC: Change simple_strtoul() et al to default to hex
       arm:     evb-ast2500 brppt1_spi brsmarc1
   aarch64: (for 300/301 boards) all -754.8 bss +0.0
spl/u-boot-spl:all -9.9 spl/u-boot-spl:text -9.9 text -754.8
       arc: (for 10/11 boards) all -242.0 text -242.0
       arm: (for 625/627 boards) all -468.7 bss +0.8 data +0.0 rodata
+0.0 spl/u-boot-spl:all -1.5 spl/u-boot-spl:bss -0.1
spl/u-boot-spl:text -1.4 text -469.5
      m68k: (for 18/18 boards) all -499.1 data +11.8 text -510.9
microblaze: (for 1/1 boards) all -392.0 bss +44.0 data +4.0 rodata
-4.0 text -436.0
      mips: (for 43/43 boards) all -457.5 bss +1.1 text -458.6
     nds32: (for 2/2 boards) all -206.0 text -206.0
     nios2: (for 2/2 boards) all -480.0 text -480.0
   powerpc: (for 40/98 boards) all -708.4 text -708.4

>
> But whether it's 0m123 or 0t123 or 0!123 or ... is pretty much
> irrelevant - chose one symbol, use it, and be done with that.

Regards,
Simon

  reply	other threads:[~2021-07-21 14:46 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-20 13:29 [PATCH 00/15] lib: Add support for a decimal 0m prefix for numbers Simon Glass
2021-07-20 13:29 ` [PATCH 01/15] hash: Ensure verification hex pairs are terminated Simon Glass
2021-07-20 13:29 ` [PATCH 02/15] global: Convert simple_strtoul() with hex to hextoul() Simon Glass
2021-07-20 13:29 ` [PATCH 03/15] global: Convert simple_strtoul() with decimal to dectoul() Simon Glass
2021-07-20 13:29 ` [PATCH 04/15] lib: Comment the base parameter with simple_strtoul/l() Simon Glass
2021-07-20 13:29 ` [PATCH 05/15] lib: Drop unnecessary check for hex digit Simon Glass
2021-07-20 13:29 ` [PATCH 06/15] lib: Add tests for simple_strtoull() Simon Glass
2021-07-20 13:29 ` [PATCH 07/15] lib: Add octal tests for simple_strtoul/l() Simon Glass
2021-07-20 13:29 ` [PATCH 08/15] lib: Move common digit-parsing code into a function Simon Glass
2021-07-20 13:29 ` [PATCH 09/15] doc: Convert command-line info to rST Simon Glass
2021-07-20 13:29 ` [PATCH 10/15] doc: Add a note about number representation Simon Glass
2021-07-20 13:29 ` [PATCH 11/15] lib: Allow using 0x when a decimal value is requested Simon Glass
2021-07-20 13:29 ` [PATCH 12/15] lib: Support a decimal prefix 0m Simon Glass
2021-07-20 13:29 ` [PATCH 13/15] RFC: lib: Support a binary prefix 0y Simon Glass
2021-07-21  8:05   ` Sean Anderson
2021-07-21  8:30     ` Wolfgang Denk
2021-07-21  8:27   ` Wolfgang Denk
2021-07-21 14:23     ` Simon Glass
2021-07-22  9:48       ` Wolfgang Denk
2021-07-22 13:28         ` Simon Glass
2021-07-22 14:44           ` Tom Rini
2021-07-23  3:07             ` Simon Glass
2021-07-23  6:55           ` Wolfgang Denk
2021-07-23 21:41             ` Simon Glass
2021-07-24 13:00               ` Wolfgang Denk
2021-07-20 13:29 ` [PATCH 14/15] RFC: lib: Use 0o prefix for octal Simon Glass
2021-07-20 13:29 ` [PATCH 15/15] RFC: Change simple_strtoul() et al to default to hex Simon Glass
2021-07-20 14:22 ` [PATCH 00/15] lib: Add support for a decimal 0m prefix for numbers Tom Rini
2021-07-20 15:57   ` Simon Glass
2021-07-20 16:05     ` Tom Rini
2021-07-20 16:30       ` Eugeniu Rosca
2021-07-20 18:33       ` Simon Glass
2021-07-20 19:28         ` Tom Rini
2021-07-21 13:57           ` Simon Glass
2021-07-21  7:52       ` Wolfgang Denk
2021-07-21 14:46         ` Simon Glass [this message]
2021-07-23 21:41           ` Simon Glass
2021-07-20 15:00 ` Jonathan A. Kollasch
2021-07-20 15:04   ` Tom Rini
2021-07-21  7:42 ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPnjgZ3ywNr-NLcU_9-x8Qx2tSxqxk1hgzpb2RoxYOPC=j6mdA@mail.gmail.com' \
    --to=sjg@chromium.org \
    --cc=erosca@de.adit-jv.com \
    --cc=joe.hershberger@ni.com \
    --cc=marek.behun@nic.cz \
    --cc=marex@denx.de \
    --cc=roland.gaudig@weidmueller.com \
    --cc=seanga2@gmail.com \
    --cc=stefan.herbrechtsmeier@weidmueller.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=wd@denx.de \
    --cc=xypron.glpk@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.