All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 2/8] sparc: prom: Use the return value from prom_nbputchar()
@ 2010-12-04  3:56 Julian Calaby
  2010-12-12 22:51 ` [RFC 2/8] sparc: prom: Use the return value from David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Julian Calaby @ 2010-12-04  3:56 UTC (permalink / raw)
  To: sparclinux

As prom_nbputchar() now returns 1 when it succeeds, use it instead
of decrementing len or incrementing buf - as this matches the
behaviour of prom_console_write_buf() in console_64.c

Signed-off-by: Julian Calaby <julian.calaby@gmail.com>
---
 arch/sparc/prom/console_32.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/sparc/prom/console_32.c b/arch/sparc/prom/console_32.c
index b05e3db..055368a 100644
--- a/arch/sparc/prom/console_32.c
+++ b/arch/sparc/prom/console_32.c
@@ -50,8 +50,7 @@ void prom_console_write_buf(const char *buf, int len)
 		int n = prom_nbputchar(buf);
 		if (n < 0)
 			continue;
-		len--;
-		buf++;
+		len -= n;
+		buf += n;
 	}
 }
-

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [RFC 2/8] sparc: prom: Use the return value from
  2010-12-04  3:56 [RFC 2/8] sparc: prom: Use the return value from prom_nbputchar() Julian Calaby
@ 2010-12-12 22:51 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-12-12 22:51 UTC (permalink / raw)
  To: sparclinux

From: Julian Calaby <julian.calaby@gmail.com>
Date: Sat, 04 Dec 2010 14:56:09 +1100

> As prom_nbputchar() now returns 1 when it succeeds, use it instead
> of decrementing len or incrementing buf - as this matches the
> behaviour of prom_console_write_buf() in console_64.c
> 
> Signed-off-by: Julian Calaby <julian.calaby@gmail.com>

Since we're not doing patch #5 this change no longer makes
any sense.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-12-12 22:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-04  3:56 [RFC 2/8] sparc: prom: Use the return value from prom_nbputchar() Julian Calaby
2010-12-12 22:51 ` [RFC 2/8] sparc: prom: Use the return value from David Miller

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.