public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 0/9] Unified command execution in one place
Date: Thu, 12 Jan 2012 08:17:28 +0100	[thread overview]
Message-ID: <201201120817.28767.sr@denx.de> (raw)
In-Reply-To: <CAPnjgZ3yttd6veFVFbjhsXfMOkAN-gPvJE5hxN8K0K-P5J_nVg@mail.gmail.com>

Hi Simon,

On Thursday 12 January 2012 05:37:00 Simon Glass wrote:
> Hi,
> 
> On Sat, Dec 10, 2011 at 10:43 AM, Simon Glass <sjg@chromium.org> wrote:
> > At present two parsers have similar code to execute commands. Also
> > cmd_usage() is called all over the place. This series adds a single
> > function which processes commands called cmd_process().
> > 
> > This new function understands return codes, and in particular
> > CMD_RET_USAGE to indicate a usage error. So rather than calling
> > cmd_usage() themselves, the command handlers can just return this
> > error.
> > 
> > There appears to be a run_command2() which is used to run commands
> > with the selected parser. This series changes this in two separate
> > steps to just run_command(), and renames the old run_command() to
> > builtin_run_command(). No one should call this outside main.c since
> > if the hush parser is being used it is wrong to call it. The
> > built-in parser code could move into a separate file perhaps in a
> > future patch.
> > 
> > The overall series reduces code size on ARM by about 1KB on
> > my ~160KB U-Boot text region when the hush parser is used, and around
> > 60 bytes when it isn't.
> > 
> > As an aside the only user of parse_line() is fsl_ddr_interactive()
> > which seems to have its own command line interface which operates
> > before DRAM is set up. Do I have this right? Is there no way this
> > could be done later from a normal U-Boot command?
> > 
> > (I have run this through MAKEALL and it seems clean)
> > 
> > Changes in v2:
> > - Fix minor errors one of which created a warning
> > - Squash i2c patch into the common/ patch
> > 
> > Simon Glass (9):
> >  Remove CMD_PXE's static on run_command()
> >  Rename run_command() to builtin_run_command()
> >  Rename run_command2() to run_command()
> >  Stop using builtin_run_command()
> >  Don't include standard parser if hush is used
> >  Create a single cmd_call() function to handle command execution
> >  Remove interleave of non-U-Boot code in hush
> >  Add cmd_process() to process commands in one place
> >  Convert cmd_usage() calls in common to use a return value
> 
> Does any of the maintainers feel inclined to pick up these patches? It
> still seems to rebase cleanly against master, so it might be ok as is,
> but happy to resend if needed.

Looking into it right now. Stay tuned...
 
Best regards,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de

  reply	other threads:[~2012-01-12  7:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-10 18:43 [U-Boot] [PATCH v2 0/9] Unified command execution in one place Simon Glass
2011-12-10 18:43 ` [U-Boot] [PATCH v2 1/9] Remove CMD_PXE's static on run_command() Simon Glass
2011-12-10 18:43 ` [U-Boot] [PATCH v2 2/9] Rename run_command() to builtin_run_command() Simon Glass
2011-12-10 18:43 ` [U-Boot] [PATCH v2 3/9] Rename run_command2() to run_command() Simon Glass
2011-12-10 18:43 ` [U-Boot] [PATCH v2 4/9] Stop using builtin_run_command() Simon Glass
2012-01-13 19:27   ` Wolfgang Denk
2012-01-13 19:43     ` Simon Glass
2012-01-13 21:25       ` Wolfgang Denk
2012-01-13 21:33         ` Simon Glass
2012-01-14  6:33           ` Simon Glass
2011-12-10 18:43 ` [U-Boot] [PATCH v2 5/9] Don't include standard parser if hush is used Simon Glass
2011-12-10 18:43 ` [U-Boot] [PATCH v2 6/9] Create a single cmd_call() function to handle command execution Simon Glass
2011-12-10 18:43 ` [U-Boot] [PATCH v2 7/9] Remove interleave of non-U-Boot code in hush Simon Glass
2011-12-10 18:44 ` [U-Boot] [PATCH v2 8/9] Add cmd_process() to process commands in one place Simon Glass
2011-12-10 18:44 ` [U-Boot] [PATCH v2 9/9] Convert cmd_usage() calls in common to use a return value Simon Glass
2012-01-12  4:37 ` [U-Boot] [PATCH v2 0/9] Unified command execution in one place Simon Glass
2012-01-12  7:17   ` Stefan Roese [this message]
2012-01-12  7:43 ` Stefan Roese
2012-01-17 16:45   ` Simon Glass

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=201201120817.28767.sr@denx.de \
    --to=sr@denx.de \
    --cc=u-boot@lists.denx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox