All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julian Calaby <julian.calaby@gmail.com>
To: sparclinux@vger.kernel.org
Subject: [RFC 2/8] sparc: prom: Use the return value from prom_nbputchar()
Date: Sat, 04 Dec 2010 03:56:09 +0000	[thread overview]
Message-ID: <4CF9BBD9.2090403@gmail.com> (raw)

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;
 	}
 }
-

             reply	other threads:[~2010-12-04  3:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-04  3:56 Julian Calaby [this message]
2010-12-12 22:51 ` [RFC 2/8] sparc: prom: Use the return value from David Miller

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=4CF9BBD9.2090403@gmail.com \
    --to=julian.calaby@gmail.com \
    --cc=sparclinux@vger.kernel.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.