All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 0/6] stdio: Clean up
Date: Sat, 1 Sep 2012 16:19:06 +0200	[thread overview]
Message-ID: <201209011619.06260.marex@denx.de> (raw)
In-Reply-To: <20120901121745.2EE9E205615@gemini.denx.de>

Dear Wolfgang Denk,

> Dear Marek Vasut,
> 
> In message <1346453055-30888-1-git-send-email-marex@denx.de> you wrote:
> > Clean up a few things in STDIO. Mostly, don't export structures directly,
> > but introduce some kind of accessors if needed and remove dead code.
> > 
> > NOTE: I'm still working on the "compile tested on 2 different
> > architectures"
> > 
> >       part. I'll keep you posted about that. I'd be glad for a review
> >       though. I'd hate to pull in logic errors, especially into such
> >       critical code.
> > 
> > NOTE2: Cross-posting cover to DM list, so I get feedback from those guys.
> > 
> > Marek Vasut (6):
> >   stdio: dm: Murder dead code in console.c
> >   stdio: dm: Add accessors to stdio_devices[]
> >   stdio: dm: Make stdio_devices[] local
> >   stdio: dm: Add stdio_fd_to_name() call
> >   stdio: dm: Use stdio_fd_to_name() call to localize stdio_names
> >   stdio: dm: Optimize stdio_print_current_devices()
> 
> I can't make heads nor tails from this patch series.
> 
> 1) It was posted to the U-Boot list, but all patches carry a "dm:" in
>    the subject, which does not appear to make sense to me, as at
>    least some of the changes have no relation to DM work at all.

They very distantly are. I really needed to clean up the STDIO a bit to 
familiarize myself with the code I'm soon going to break.

But all in all, I think exporting structures for others to access them as they 
wish isn't the best of ideas. Therefore I encapsulated these into the file and 
added accessors. The direction these patches take with STDIO and console.c stuff 
in U-Boot is such that applying proper encapsulation will allow easier 
conversion to the driver model stuff later. Yet I'm getting there with really 
small steps as I need to be very careful here.

> 2) It appears this might be a RFC series, so why isn't it maked as
>    such in the Subject: ?

It's not RFC, why would it be RFC? I'm still working on the "NOTE" part though.

> 3) It appears that some code gets added - what is the impact of these
>    changes on the memory footprint?

So far I tested this on M28:

Before:
   text    data     bss     dec     hex filename
 415705    7688  288708  712101   adda5 ./u-boot
  11754     788      12   12554    310a ./spl/u-boot-spl

After:
   text    data     bss     dec     hex filename
 415590    7676  288700  711966   add1e ./u-boot
  11794     788      12   12594    3132 ./spl/u-boot-spl

As you can see, the SPL grows a bit, yet U-Boot shrunk. Tested with Debian GCC 
4.7.1 .

> 4) Besides the dead code removal - what exactly is the purpose of
>    these patches?

Mostly see 1).

> Best regards,
> 
> Wolfgang Denk

Best regards,
Marek Vasut

  reply	other threads:[~2012-09-01 14:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-31 22:44 [U-Boot] [PATCH 0/6] stdio: Clean up Marek Vasut
2012-08-31 22:44 ` [U-Boot] [PATCH 1/6] stdio: dm: Remove dead code in console.c Marek Vasut
2012-08-31 22:44 ` [U-Boot] [PATCH 2/6] stdio: dm: Add accessors to stdio_devices[] Marek Vasut
2012-08-31 22:44 ` [U-Boot] [PATCH 3/6] stdio: dm: Make stdio_devices[] local Marek Vasut
2012-09-01 20:14   ` Marek Vasut
2012-09-01 23:11   ` Andreas Bießmann
2012-09-02  0:02     ` Marek Vasut
2012-09-02  8:12       ` Wolfgang Denk
2012-08-31 22:44 ` [U-Boot] [PATCH 4/6] stdio: dm: Add stdio_fd_to_name() call Marek Vasut
2012-08-31 22:44 ` [U-Boot] [PATCH 5/6] stdio: dm: Use stdio_fd_to_name() call to localize stdio_names Marek Vasut
2012-08-31 22:44 ` [U-Boot] [PATCH 6/6] stdio: dm: Optimize stdio_print_current_devices() Marek Vasut
2012-09-01 12:17 ` [U-Boot] [PATCH 0/6] stdio: Clean up Wolfgang Denk
2012-09-01 14:19   ` Marek Vasut [this message]
2012-09-01 16:33     ` Wolfgang Denk
2012-09-01 16:57       ` Marek Vasut
2012-09-01 20:00         ` Wolfgang Denk
2012-09-01 20:12           ` Marek Vasut

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=201209011619.06260.marex@denx.de \
    --to=marex@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 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.