From patchwork Tue Jul 18 04:30:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeffy Chen X-Patchwork-Id: 9846835 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 90C0B600CC for ; Tue, 18 Jul 2017 04:31:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 81F2027F89 for ; Tue, 18 Jul 2017 04:31:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 76A0327F92; Tue, 18 Jul 2017 04:31:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0FFB927F89 for ; Tue, 18 Jul 2017 04:31:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=ZH6cyFFYUdhzH8Pp/aaFJ3K5ZTlLaUpLLXUBTAncFz4=; b=pMmBAp05ESFOJmSmiT4esumH43 w60coqmTlVYPSCoOTS0vwwq2LnAV28Mna68MRcePF/7kuI3Rf8zbQPFWwO+EISbGHGheXcSryZ8sj APJzOOCEZfds2Jlcgcvl8CyjbHgBAzXd9WCl8jK+YvSt7fUN8T7M2cCr/2ewEKidqvglXkc/DZ+QU cSp4BqFJClmyrnDznQ6QkW3Fdwk/UP3R7aChBPS8Le8krn0310LWeMkiGUxShaCJpwD7om6bIlQUj X5qH0YLJ94bmFRBQYr2vufJ2JQwYLZTBsJd24R4kfK5dXCveaBDVVd625g/0i47RepRxbEpFhlsne f0OyBW7w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dXKA5-0006A6-9N; Tue, 18 Jul 2017 04:31:05 +0000 Received: from regular1.263xmail.com ([211.150.99.131]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dXKA1-0005vD-B4 for linux-arm-kernel@lists.infradead.org; Tue, 18 Jul 2017 04:31:03 +0000 Received: from jeffy.chen?rock-chips.com (unknown [192.168.167.233]) by regular1.263xmail.com (Postfix) with ESMTP id 1C5BD61FB; Tue, 18 Jul 2017 12:30:37 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 Received: from localhost (localhost [127.0.0.1]) by smtp.263.net (Postfix) with ESMTPA id 7F2B3383; Tue, 18 Jul 2017 12:30:32 +0800 (CST) X-RL-SENDER: jeffy.chen@rock-chips.com X-FST-TO: linux-kernel@vger.kernel.org X-SENDER-IP: 103.29.142.67 X-LOGIN-NAME: jeffy.chen@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-SENDER: cjf@rock-chips.com X-DNS-TYPE: 0 Received: from localhost (unknown [103.29.142.67]) by smtp.263.net (Postfix) whith ESMTP id 21272Z3MO3Y; Tue, 18 Jul 2017 12:30:36 +0800 (CST) From: Jeffy Chen To: linux-kernel@vger.kernel.org Subject: [RFC PATCH 3/5] serial: xuartps: Remove __init marking from early write Date: Tue, 18 Jul 2017 12:30:01 +0800 Message-Id: <1500352203-21513-4-git-send-email-jeffy.chen@rock-chips.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1500352203-21513-1-git-send-email-jeffy.chen@rock-chips.com> References: <1500352203-21513-1-git-send-email-jeffy.chen@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170717_213101_660095_6477BE40 X-CRM114-Status: UNSURE ( 6.81 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: briannorris@chromium.org, peter@hurleysoftware.com, gregkh@linuxfoundation.org, Jeffy Chen , dianders@chromium.org, Michal Simek , linux-arm-kernel@lists.infradead.org, linux-serial@vger.kernel.org, Jiri Slaby , =?UTF-8?q?S=C3=B6ren=20Brinkmann?= MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The earlycon would be alive outside the init code in these cases: 1/ we have keep_bootcon in cmdline. 2/ we don't have a real console to switch to. So remove the __init marking to avoid invalid memory access. Signed-off-by: Jeffy Chen --- drivers/tty/serial/xilinx_uartps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index fde55dc..31a630a 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -1163,7 +1163,7 @@ static void cdns_uart_console_putchar(struct uart_port *port, int ch) writel(ch, port->membase + CDNS_UART_FIFO); } -static void __init cdns_early_write(struct console *con, const char *s, +static void cdns_early_write(struct console *con, const char *s, unsigned n) { struct earlycon_device *dev = con->data;