From: Lubomir Popov <lpopov@mm-sol.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] should print_mmc_devices() not add an extraneous blank between devices?
Date: Wed, 21 Aug 2013 09:34:26 +0300 [thread overview]
Message-ID: <52145F72.80203@mm-sol.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1308201643160.7459@oneiric>
Hi Robert,
On 20/08/13 23:46, Robert P. J. Day wrote:
>
> playing on my beaglebone black and:
>
> U-Boot# mmc list
> OMAP SD/MMC: 0
> OMAP SD/MMC: 1 <-- ???
> U-Boot#
>
> puzzled as to why the second line is indented, and discovered, first
> from cmd_mmc.c:
>
> print_mmc_devices('\n');
>
> which reasonably defines a newline as a separator, but then there's
> this in drivers/mmc/mmc.c:
>
> list_for_each(entry, &mmc_devices) {
> m = list_entry(entry, struct mmc, link);
>
> printf("%s: %d", m->name, m->block_dev.dev);
>
> if (entry->next != &mmc_devices)
> printf("%c ", separator);
> }
>
> where that loop inserts the separator *and* a blank. is that
> deliberate? it just looks weird.
>
I have used to fix this as follows on some older U-Boot versions:
if (entry->next != &mmc_devices) {
printf("%c", separator);
if (separator != '\n')
puts (" ");
}
But as this is just cosmetics, never bothered to submit a patch, nor
am fixing it anymore locally. If you are a style perfectionist, do
submit one... ;)
Best regards,
Lubomir
prev parent reply other threads:[~2013-08-21 6:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-20 20:46 [U-Boot] should print_mmc_devices() not add an extraneous blank between devices? Robert P. J. Day
2013-08-21 6:34 ` Lubomir Popov [this message]
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=52145F72.80203@mm-sol.com \
--to=lpopov@mm-sol.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox