Skip to contentSkip to conversation

sparc: prom: Use the return value from prom_nbputchar()

RFC In review Julian Calaby 2 participants 2 messages Dec 4, 2010 – Dec 12, 2010 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore
#0 lore raw

RFC 2/8 sparc: prom: Use the return value from prom_nbputchar()

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

---
 arch/sparc/prom/console_32.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
arch/sparc/prom/console_32.c +2 -3
index b05e3db..055368a 100644
@@ -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;
 	}
 }
-
maintainer
#1 lore raw

Re: [RFC 2/8] sparc: prom: Use the return value from

From: Julian Calaby <[email protected]>
Date: Sat, 04 Dec 2010 14:56:09 +1100

Quoted 5 lines

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

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