From: Jerry Van Baren <gerald.vanbaren@ge.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] cmd_bdinfo: move implementation to arch instead of common
Date: Wed, 12 Nov 2008 09:02:15 -0500 [thread overview]
Message-ID: <491AE1E7.6080107@ge.com> (raw)
In-Reply-To: <1226436864-6377-1-git-send-email-plagnioj@jcrosoft.com>
Jean-Christophe PLAGNIOL-VILLARD wrote:
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> ---
> apply after my precedent fix for cmd_bdinfo
>
> Best Regards,
> J.
> common/Makefile | 1 -
> common/cmd_bdinfo.c | 447 -----------------------------------------------
> include/common.h | 15 ++
> lib_arm/Makefile | 1 +
> lib_arm/bdinfo.c | 69 ++++++++
> lib_avr32/Makefile | 1 +
> lib_avr32/bdinfo.c | 62 +++++++
> lib_blackfin/Makefile | 1 +
> lib_blackfin/bdinfo.c | 68 +++++++
> lib_i386/Makefile | 1 +
> lib_i386/bdinfo.c | 62 +++++++
> lib_m68k/Makefile | 1 +
> lib_m68k/bdinfo.c | 101 +++++++++++
> lib_microblaze/Makefile | 1 +
> lib_microblaze/bdinfo.c | 65 +++++++
> lib_mips/Makefile | 1 +
> lib_mips/bdinfo.c | 62 +++++++
> lib_nios/Makefile | 1 +
> lib_nios/bdinfo.c | 61 +++++++
> lib_nios2/Makefile | 1 +
> lib_nios2/bdinfo.c | 71 ++++++++
> lib_ppc/Makefile | 1 +
> lib_ppc/bdinfo.c | 141 +++++++++++++++
> lib_sh/Makefile | 1 +
> lib_sh/bdinfo.c | 62 +++++++
> lib_sparc/Makefile | 13 +-
> lib_sparc/bdinfo.c | 78 ++++++++
Hi Jean-Christophe,
Is this a good idea? It takes one centralized mess (that is deprecated,
but we don't have a good track record of death after deprecation) and
spreads it out over a bunch of files. Reminds me of cancer. :-(
The centralized mess had no duplication of code, but a lot of #ifdef
ugly. This patch trades off the removal of most of the #ifdef ugly for
a lot of duplication. Which is the lesser of two evils?
If you continue down the fragmentation path, would it work to keep the
primary bdinfo command (cmd_bdinfo.c) and add two weak function calls to
it that processor families and boards can hook to add in their extra
processor- and board-specific stuff? This may result in some
rearrangement of the print output (which I don't view as a problem, but
manual writers might not like it). It also results in some additional
obscurity since a processor/board porter needs to understand that there
is an additional hook to grab for customization.
Thanks,
gvb
next prev parent reply other threads:[~2008-11-12 14:02 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-11 20:54 [U-Boot] [PATCH] cmd_bdinfo: move implementation to arch instead of common Jean-Christophe PLAGNIOL-VILLARD
2008-11-12 14:02 ` Jerry Van Baren [this message]
2008-11-12 14:57 ` Jean-Christophe PLAGNIOL-VILLARD
2008-11-12 19:13 ` [U-Boot] [PATCH V2] " Jean-Christophe PLAGNIOL-VILLARD
2008-11-12 19:36 ` Mike Frysinger
2008-11-12 19:45 ` Jean-Christophe PLAGNIOL-VILLARD
2008-11-12 19:55 ` Mike Frysinger
2008-11-12 20:06 ` Jean-Christophe PLAGNIOL-VILLARD
2008-12-04 12:29 ` [U-Boot] [PATCH V3] " Jean-Christophe PLAGNIOL-VILLARD
2008-12-04 12:35 ` [U-Boot] [PATCH V4] " Jean-Christophe PLAGNIOL-VILLARD
2008-12-04 13:36 ` Joakim Tjernlund
2008-11-13 8:15 ` [U-Boot] [PATCH] " Haavard Skinnemoen
2008-11-12 16:17 ` Mike Frysinger
2008-11-12 16:31 ` Jean-Christophe PLAGNIOL-VILLARD
2008-11-12 17:55 ` Mike Frysinger
2008-11-12 18:08 ` Jean-Christophe PLAGNIOL-VILLARD
2008-11-12 18:16 ` Mike Frysinger
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=491AE1E7.6080107@ge.com \
--to=gerald.vanbaren@ge.com \
--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.