Thread (29 messages) 29 messages, 7 authors, 2006-03-28

Re: [Cbe-oss-dev] [patch 02/13] powerpc: add hvc backend for rtas

From: Arnd Bergmann <arnd@arndb.de>
Date: 2006-03-23 22:36:33
Also in: lkml

Am Thursday 23 March 2006 22:32 schrieb Olof Johansson:
quoted
+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 */
quoted
+=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]);
quoted
+=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?
quoted
+=A0=A0=A0=A0=A0/* Really the fun isn't over until the worker thread br=
eaks down
quoted
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 <><
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help