public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jerry Van Baren <gerald.vanbaren@ge.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/7] fdt_support: Add multi-serial support for stdout fixup
Date: Wed, 16 Sep 2009 11:27:53 -0400	[thread overview]
Message-ID: <4AB103F9.4010605@ge.com> (raw)
In-Reply-To: <20090916151704.GA15878@oksana.dev.rtsoft.ru>

Anton Vorontsov wrote:
> Thanks for review Jerry.
> 
> On Wed, Sep 16, 2009 at 08:59:14AM -0400, Jerry Van Baren wrote:
> [...]
>> Below is a *HAND MODIFIED* (i.e. probably broken) edit of Anton's
>> patch reflecting my thoughts.
>>
>> I'll leave it up to Anton and Kumar... I'm OK with Anton's original
>> patch and you have my
>>   Acked-by: Gerald Van Baren <vanbaren@cideas.com>
>> or you can verify and adopt my proposed change (more work :-() and add a
>>   Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
>> to Anton's s-o-b.
>>
>> Thanks,
>> gvb
>> ------------------------------------------------------------------------
> [...]
>>  #ifdef CONFIG_OF_STDOUT_VIA_ALIAS
>> +
>> +#ifdef CONFIG_SERIAL_MULTI
>> +static void fdt_fill_sername(char *sername, size_t maxlen)
>> +{
>> +	const char *outname = stdio_devices[stdout]->name;
>> +
>> +	if (strcmp(outname, "serial") > 0)
>> +		strncpy(sername, outname, maxlen);
> 
> (1)
> 
>> +	/* eserial? */
>> +	if (strcmp(outname + 1, "serial") > 0)
>> +		strncpy(sername, outname + 1, maxlen);
>> +}
>> +#else
>> +static inline void fdt_fill_sername(char *sername, size_t maxlen)
>> +{
>> +	sprintf(sername, "serial%d", CONFIG_CONS_INDEX - 1);
> 
> This case is also needed with multiserial, since 'serial' is
> what you get by default, and (1) doesn't account 'serial' name.

Ahh, whups, missed that.

> So, we can either leave the patch as, or duplicate some code
> for multiserial case, or do this ugly thing (I quite dislike
> #ifdef like this, i.e. inside the code flow):

[snip]

> Though, I'll do whatever you prefer.

Lets use the original patch.

Acked-by: Gerald Van Baren <vanbaren@cideas.com>

Thanks,
gvb

  reply	other threads:[~2009-09-16 15:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-19 18:37 [U-Boot] [PATCH 1/7] fdt_support: Add multi-serial support for stdout fixup Anton Vorontsov
2009-09-16  4:18 ` Kumar Gala
2009-09-16 12:59   ` Jerry Van Baren
2009-09-16 15:17     ` Anton Vorontsov
2009-09-16 15:27       ` Jerry Van Baren [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-10-15 13:46 [U-Boot] [PATCH 0/7] Some patches for MPC8569E-MDS Anton Vorontsov
2009-10-15 13:47 ` [U-Boot] [PATCH 1/7] fdt_support: Add multi-serial support for stdout fixup Anton Vorontsov
2009-10-22 14:24   ` Kumar Gala
2009-10-22 14:47     ` Jerry Van Baren
2009-10-27  2:39   ` Kumar Gala

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=4AB103F9.4010605@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox