mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Antony Pavlov <antonynpavlov@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [RFC-PATCH] Fix loads command
Date: Mon, 22 Aug 2011 08:58:44 +0200	[thread overview]
Message-ID: <20110822065844.GW31404@pengutronix.de> (raw)
In-Reply-To: <1313953720-31008-1-git-send-email-antonynpavlov@gmail.com>

Hi Antony,

On Sun, Aug 21, 2011 at 11:08:40PM +0400, Antony Pavlov wrote:
> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
> ---
>  commands/Kconfig  |    7 +-
>  commands/Makefile |    1 -
>  commands/loads.c  |  295 ++++++++++++++++++++++++++++++-----------------------
>  common/Makefile   |    1 +
>  4 files changed, 171 insertions(+), 133 deletions(-)

There seem to be many whitespace cleanups in this patch. Can you please
post a seperate patch for these for easier review?
I think the baudrate change can be made in unconditionally.

I don't know if you are interested in doing this and I don't mind at
all if you don't, but for a full fixing of these commands I would
suggest the following:

- There should be an internal C API for each load/save function for
  noninteractive use.
- Instead of writing to some sdram offset the commands should write
  to a file descriptor.
- There should be no more than one positional argument to each command.

A good start would be to cleanup the coding style and to make it compile
again.

I just saw that you copied baudrate switching code from loadb.c. It
tries to get the current baudrate with:

(int)simple_strtoul(dev_get_param(&cdev->class_dev, "baudrate"), NULL, 10);

I wonder if it wouldn't be simpler not to change the baudrate when
no baudrate change is requested.

Another thing: since the loads stuff depends on broken and obviously was
never used since U-Boot it would also be acceptable to remove it
completely and to do a fresh start.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2011-08-22  6:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-21 19:08 Antony Pavlov
2011-08-22  6:58 ` Sascha Hauer [this message]
2011-08-22 18:36   ` Antony Pavlov

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=20110822065844.GW31404@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=antonynpavlov@gmail.com \
    --cc=barebox@lists.infradead.org \
    /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