Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1963060imu; Thu, 10 Jan 2019 06:09:02 -0800 (PST) X-Google-Smtp-Source: ALg8bN7+QSVKuK/gOlLvglAMtKkIw+EQGMzHmDkwoQ92DYeZ9yN3YRU8h0GhKoe6tkTVQG9uqpp1 X-Received: by 2002:a62:c185:: with SMTP id i127mr10438161pfg.43.1547129342652; Thu, 10 Jan 2019 06:09:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547129342; cv=none; d=google.com; s=arc-20160816; b=hArIzFMtpcclPFA3ys3qV8PHAm4X49jqQRAY5v12+sA6MkSOfv0SmbCdPzIsktNg4d 4C3QUsM7j6itW+6oXUEpuf4CGAZwoJt4M2Qn0YsVUZzum+8pt7q8FURRD7h899cfIIEW LsotYHmlFYPL2MVjCcO0zpoTOOld+EfI0dWkNne2gf1WcTwpSVTAnwz6GcQH3te93Wne pM+lyurEqCWjfboEOgU+Lx4kzIMZ1j6Cu6fYrzTKCGXsN9cPT1NI09enBW71naPR13y1 p396cJL1D4G2QBRllBko6INh/rDMWM/Sg+NwTg4MD5pAhni668X6ecM8RgtFx6/BtTnp 1jMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from; bh=LzxJD76AvkpARJNOVuAPuSbZiNZIVpbms+0xJWSgBxo=; b=TE04qOF9MU/dfH4spsYynQ7m+7I21Y5/RFqqtnBW59ViBnWlooMm3SZLe/ZXCEhHZh V5HGdgcP3rmOgRI9MmFLML6AfvPEutOFVXEVKkR9g/352Cs03VSfAjzgZ8nb88kpVmmC R3DQSCchnneDD6A+yxCqPJs0d4Cy6XMUdmeRROws6OWrcy//nE+XQtA/PzWdncLYrq4J MYVJEMRvmUmXi8VIsnNNjdXFCq31Y+J2LCQuXmv0FAfmeA3YkGL94ZhgFzS2AZZv2Vv2 +gkNgOV8iuwACUIHEXS+ya3UdWCBSI3w8ZE9eXD9ot2inaLW9V/oBkve3dvz27sMT8u5 sjBw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x12si12868508pgf.454.2019.01.10.06.08.46; Thu, 10 Jan 2019 06:09:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729013AbfAJOHV (ORCPT + 99 others); Thu, 10 Jan 2019 09:07:21 -0500 Received: from mx2.suse.de ([195.135.220.15]:43610 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728181AbfAJOHV (ORCPT ); Thu, 10 Jan 2019 09:07:21 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 12EA6AC3E; Thu, 10 Jan 2019 14:07:20 +0000 (UTC) From: Andreas Schwab To: Anup Patel Cc: Greg Kroah-Hartman , Jiri Slaby , Palmer Dabbelt , Albert Ou , Atish Patra , Christoph Hellwig , Rob Herring , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: [PATCH] tty/serial: emit CR before NL in RISC-V SBL console References: <20181204135507.3706-1-anup@brainfault.org> <20181204135507.3706-2-anup@brainfault.org> X-Yow: This TOPS OFF my partygoing experience! Someone I DON'T LIKE is talking to me about a HEART-WARMING European film.. Date: Thu, 10 Jan 2019 15:07:18 +0100 In-Reply-To: <20181204135507.3706-2-anup@brainfault.org> (Anup Patel's message of "Tue, 4 Dec 2018 19:25:05 +0530") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Andreas Schwab --- drivers/tty/serial/earlycon-riscv-sbi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/earlycon-riscv-sbi.c b/drivers/tty/serial/earlycon-riscv-sbi.c index e1a551aae3..9c51b945b5 100644 --- a/drivers/tty/serial/earlycon-riscv-sbi.c +++ b/drivers/tty/serial/earlycon-riscv-sbi.c @@ -15,8 +15,11 @@ static void sbi_console_write(struct console *con, { int i; - for (i = 0; i < n; ++i) + for (i = 0; i < n; ++i) { + if (s[i] == '\n') + sbi_console_putchar('\r'); sbi_console_putchar(s[i]); + } } static int __init early_sbi_setup(struct earlycon_device *device, -- 2.20.1 -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."