All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: cbe-oss-dev@ozlabs.org
Cc: linuxppc-dev@ozlabs.org, Arnd Bergmann <arnd.bergmann@de.ibm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [Cbe-oss-dev] [patch 02/13] powerpc: add hvc backend for rtas
Date: Thu, 23 Mar 2006 23:36:19 +0100	[thread overview]
Message-ID: <200603232336.19683.arnd@arndb.de> (raw)
In-Reply-To: <20060323213217.GB5538@pb15.lixom.net>

Am Thursday 23 March 2006 22:32 schrieb Olof Johansson:
> > +static inline int hvc_rtas_write_console(uint32_t vtermno, const char
> > *buf, int count) +{
> > +=A0=A0=A0=A0=A0int done;
> > +
> > +=A0=A0=A0=A0=A0/* if there is more than one character to be displayed,=
 wait a bit */
> > +=A0=A0=A0=A0=A0for (done =3D 0; done < count; done++) {=20
> > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0int result;
> > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0result =3D rtas_call(rtascons_p=
ut_char_token, 1, 1, NULL, buf[done]);
> > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0if (result)=20
> > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0break;
>
> Why introduce a scope-local variable just to check it?
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0if(rtas_call(...)) =A0 wo=
uld be cleaner.

I don't like doing the important stuff inside of another expression,
and I prefer conditions not to have side-effects.
If nobody else has a strong opinion on it, I'd prefer to leave it.

BTW, who is the current maintainer of hvc_console? Ryan is working on
glibc nowadays, right?

> > +=A0=A0=A0=A0=A0/* Really the fun isn't over until the worker thread br=
eaks down
> > and the +=A0=A0=A0=A0=A0 * tty cleans up */
> > +=A0=A0=A0=A0=A0if (hvc_rtas_dev)
> > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0hvc_remove(hvc_rtas_dev);
> > +}
> > +module_exit(hvc_rtas_exit); /* before drivers/char/hvc_console.c */
>
> Cryptic comment?

No idea how what it was about, I'll remove it.

	Arnd <><

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: cbe-oss-dev@ozlabs.org
Cc: Olof Johansson <olof@lixom.net>,
	Arnd Bergmann <arnd.bergmann@de.ibm.com>,
	linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org,
	"Ryan S. Arnold" <rsa@us.ibm.com>
Subject: Re: [Cbe-oss-dev] [patch 02/13] powerpc: add hvc backend for rtas
Date: Thu, 23 Mar 2006 23:36:19 +0100	[thread overview]
Message-ID: <200603232336.19683.arnd@arndb.de> (raw)
In-Reply-To: <20060323213217.GB5538@pb15.lixom.net>

Am Thursday 23 March 2006 22:32 schrieb Olof Johansson:
> > +static inline int hvc_rtas_write_console(uint32_t vtermno, const char
> > *buf, int count) +{
> > +     int done;
> > +
> > +     /* if there is more than one character to be displayed, wait a bit */
> > +     for (done = 0; done < count; done++) { 
> > +             int result;
> > +             result = rtas_call(rtascons_put_char_token, 1, 1, NULL, buf[done]);
> > +             if (result) 
> > +                     break;
>
> Why introduce a scope-local variable just to check it?
>                 if(rtas_call(...))   would be cleaner.

I don't like doing the important stuff inside of another expression,
and I prefer conditions not to have side-effects.
If nobody else has a strong opinion on it, I'd prefer to leave it.

BTW, who is the current maintainer of hvc_console? Ryan is working on
glibc nowadays, right?

> > +     /* Really the fun isn't over until the worker thread breaks down
> > and the +      * tty cleans up */
> > +     if (hvc_rtas_dev)
> > +             hvc_remove(hvc_rtas_dev);
> > +}
> > +module_exit(hvc_rtas_exit); /* before drivers/char/hvc_console.c */
>
> Cryptic comment?

No idea how what it was about, I'll remove it.

	Arnd <><

  reply	other threads:[~2006-03-23 22:41 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-23 20:34 [patch 00/13] Cell kernel updates Arnd Bergmann
2006-03-23 20:34 ` Arnd Bergmann
2006-03-22 23:00 ` [patch 01/13] powerpc: hvc_console updates Arnd Bergmann
2006-03-22 23:00   ` Arnd Bergmann
2006-03-27  4:00   ` Paul Mackerras
2006-03-27  4:00     ` Paul Mackerras
2006-03-27 19:25     ` [updated patch 1/2] " Arnd Bergmann
2006-03-27 19:25       ` Arnd Bergmann
2006-03-28  5:23       ` Paul Mackerras
2006-03-28  5:23         ` Paul Mackerras
2006-03-27 19:26     ` [updated patch 2/2] powerpc: add hvc backend for rtas Arnd Bergmann
2006-03-27 19:26       ` Arnd Bergmann
2006-03-22 23:00 ` [patch 02/13] " Arnd Bergmann
2006-03-22 23:00   ` Arnd Bergmann
2006-03-23 21:32   ` Olof Johansson
2006-03-23 21:32     ` Olof Johansson
2006-03-23 22:36     ` Arnd Bergmann [this message]
2006-03-23 22:36       ` [Cbe-oss-dev] " Arnd Bergmann
2006-03-23 22:49       ` Olof Johansson
2006-03-23 22:49         ` Olof Johansson
2006-03-24 18:58       ` powerpc: fix hvc-rtas comments Arnd Bergmann
2006-03-24 18:58         ` Arnd Bergmann
2006-03-22 23:00 ` [patch 03/13] powerpc: update cell platform detection Arnd Bergmann
2006-03-22 23:00   ` Arnd Bergmann
2006-03-22 23:00 ` [patch 04/13] powerpc: fix cell iommu setup Arnd Bergmann
2006-03-22 23:00   ` Arnd Bergmann
2006-03-22 23:00 ` [patch 05/13] powerpc: update cell defconfig Arnd Bergmann
2006-03-22 23:00   ` Arnd Bergmann
2006-03-22 23:00 ` [patch 06/13] powerpc: cell interrupt controller updates Arnd Bergmann
2006-03-22 23:00   ` Arnd Bergmann
2006-03-23 22:15   ` Benjamin Herrenschmidt
2006-03-23 22:15     ` Benjamin Herrenschmidt
2006-03-24 18:47     ` [PATCH] powerpc: use guarded ioremap for on-chip mappings Arnd Bergmann
2006-03-24 18:47       ` Arnd Bergmann
2006-03-24 17:43   ` [patch 06/13] powerpc: cell interrupt controller updates Milton Miller
2006-03-24 17:43     ` Milton Miller
2006-03-24 18:05     ` Arnd Bergmann
2006-03-24 18:05       ` Arnd Bergmann
2006-03-24 18:46       ` [PATCH] powerpc: fix spider-pic affinity setting Arnd Bergmann
2006-03-24 18:46         ` Arnd Bergmann
2006-03-22 23:00 ` [patch 07/13] powerpc: work around a cell interrupt HW bug Arnd Bergmann
2006-03-22 23:00   ` Arnd Bergmann
2006-03-22 23:00 ` [patch 08/13] powerpc: declare arch syscalls in <asm/syscalls.h> Arnd Bergmann
2006-03-22 23:00   ` Arnd Bergmann
2006-03-22 23:00 ` [patch 09/13] spufs: allow SPU code to do syscalls Arnd Bergmann
2006-03-22 23:00   ` Arnd Bergmann
2006-03-22 23:00 ` [patch 10/13] add sys_unshare to syscalls.h Arnd Bergmann
2006-03-22 23:00   ` Arnd Bergmann
2006-03-22 23:00 ` [patch 11/13] spufs: implement mfc access for PPE-side DMA Arnd Bergmann
2006-03-22 23:00   ` Arnd Bergmann
2006-03-22 23:00 ` [patch 12/13] spufs: enable SPE problem state MMIO access Arnd Bergmann
2006-03-22 23:00   ` Arnd Bergmann
2006-03-22 23:00 ` [patch 13/13] spufs: initialize context correctly Arnd Bergmann
2006-03-22 23:00   ` Arnd Bergmann
2006-03-24 18:49 ` [PATCH] spufs: Fix endless protection fault on LS writes by SPE Arnd Bergmann
2006-03-24 18:49   ` Arnd Bergmann
2006-03-27 19:27 ` [PATCH] fix __init/__exit annotations for spufs Arnd Bergmann
2006-03-27 19:27   ` Arnd Bergmann

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=200603232336.19683.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=arnd.bergmann@de.ibm.com \
    --cc=cbe-oss-dev@ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.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 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.