From patchwork Mon May 22 13:37:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9740359 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 2FFE36034C for ; Mon, 22 May 2017 13:39:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B9F028500 for ; Mon, 22 May 2017 13:39:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0F86828641; Mon, 22 May 2017 13:39:24 +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 A7BCD28500 for ; Mon, 22 May 2017 13:39:23 +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: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:In-Reply-To: References:List-Owner; bh=O40G58Zb+j5gzlc6SPVDY6ck0b4m5L3kNJNgpp731Ck=; b=QMP yKtzw00ED2P4Te2DJyOi20qqq0aF1sTw6pc326spP5WtSrwnBXBJifBG95s6KGD1rJxQcSn15L1sq BKaSWA+KhO1EDlNtlbMAGfYZdt7ykYMtWyE/nFurKg9YBI9rxeN12nE6+Q76ReeqGI61XjW0eNuI0 BFzdYs/AyAVHhzpVpCzvO654keoyTZ55wXIUNiAR1iXrzzbnukRkCsyHvwKo/OxuHdrD1n4kIEAuU 1quasA/NhVptDm/JJhB9YKPpzPmY+Rznc7IzJFjIjWIJpi7JV/yGomJ1yemCGg3vbhZC8jfl20/GS IRmOjtgjOUM37eNbV7s8Wf/AgBOySVQ==; 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 1dCnYF-0001Is-VO; Mon, 22 May 2017 13:39:11 +0000 Received: from mout.kundenserver.de ([217.72.192.73]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dCnY8-0001F5-5k; Mon, 22 May 2017 13:39:11 +0000 Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0MUEtu-1dKwkG35E2-00R3O4; Mon, 22 May 2017 15:37:50 +0200 From: Arnd Bergmann To: Greg Kroah-Hartman Subject: [PATCH] serial: meson: hide an unused function Date: Mon, 22 May 2017 15:37:03 +0200 Message-Id: <20170522133746.880230-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:dxXKndoXoZ6I0IoRefa2SjoHl3ZziIT1m2sG9Utq0c/uIkUr0OH sOHG07enO99qJWnTT/cWnpsdUXtVaxW7vvb4hsZdTd9byPhYx0vrQAqUZzxlHaJJ968c39i 0GhG6l9QnCt9DCVbSk/aIOO9k/iirOGXUKy4arFgSgTq8d9cMhl4qdU3Uxqjef0RVpX7pi7 z0JmYA5NyVJQ+08oUkF8g== X-UI-Out-Filterresults: notjunk:1; V01:K0:YPYvyV4jTQo=:vCWgWVPLuh4nyWXAb5dlba JsJdm5K0r/Dv649Vn4huQzakfCmF6z7aFe49iz6rZFnjD0VV7D7ng4FMMNsnqy954FXwZ+xvy WlcfN8TARReiIoJn0BPwV4VisS95c94VLeFbj0viCtLxrkc5Qdb/JdH7z4jCRLR2rC3tZtjzb RAhw6fakbg+3GfCLcJ3zQgyciZjO7mrTAiHFDe2HX9QLHzP1B7fV6TM9B0uXeyjqI2O4p/pUA gU7k61x1eCL7PHaj7qsE70FaBzxn+sQdcteTgEpYSXL5SUNh4QTa4jBfGfOWU2jZfNvF5d9A9 eUGP8GgKGKYuTLPDFcLyZgSfo1EO9ZCpIRo3FBtp5s/5xmutpbB6cnl5fcczwmY5CZkvzd5IW ci1WKFCaYUNaTKF+7zWs37asLakwUMPzNlnlU9rwfQzQLW4Ylunvdpv2BudORDhGS+cbxQD/Q tR7zKTND/m8oGGGzVitt8dYAcgPcfhanRcnC/W21MlQtuaW/lRCGhHyJkQQB29Uo9aqf99+tm 5HpHsR7sEawrPiVkfmoTl9qLn+9Ly6iOu5bMJGD03NvH66+638LWPHnF/Yg9I5pRdjf9X8YAF ymu9ewEh/FD41C5bv0iTqptsYSAQEUEwa2DrCGc4NgcN1qr9EO33Z3KsuCvPdUr/cBno54tlo M7skkjEo0wZ3VZo0EKfXTguHKJdCZ9aFY1s1LnlRzTIjbWFIRxPmQeh1G6Mc9s5PhjAE= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170522_063904_547870_48799FD3 X-CRM114-Status: GOOD ( 10.55 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Martin Blumenstingl , Kevin Hilman , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Jiri Slaby , Carlo Caione , linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Heiner Kallweit MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The newly added meson_uart_enable_tx_engine function is only called from the console setup, not the runtime uart, which has an open-coded version of the same register access. This produces a harmless warning when the console code is disabled: drivers/tty/serial/meson_uart.c:127:13: error: 'meson_uart_enable_tx_engine' defined but not used [-Werror=unused-function] Let's move the function inside of the #ifdef to avoid the warning. Fixes: ba50f1df13c8 ("serial: meson: remove unneeded variable assignment in meson_serial_port_write") Signed-off-by: Arnd Bergmann --- drivers/tty/serial/meson_uart.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c index 082e038e67f8..c0e34dabadd8 100644 --- a/drivers/tty/serial/meson_uart.c +++ b/drivers/tty/serial/meson_uart.c @@ -124,15 +124,6 @@ static void meson_uart_stop_rx(struct uart_port *port) writel(val, port->membase + AML_UART_CONTROL); } -static void meson_uart_enable_tx_engine(struct uart_port *port) -{ - u32 val; - - val = readl(port->membase + AML_UART_CONTROL); - val |= AML_UART_TX_EN; - writel(val, port->membase + AML_UART_CONTROL); -} - static void meson_uart_shutdown(struct uart_port *port) { unsigned long flags; @@ -451,6 +442,14 @@ static struct uart_ops meson_uart_ops = { }; #ifdef CONFIG_SERIAL_MESON_CONSOLE +static void meson_uart_enable_tx_engine(struct uart_port *port) +{ + u32 val; + + val = readl(port->membase + AML_UART_CONTROL); + val |= AML_UART_TX_EN; + writel(val, port->membase + AML_UART_CONTROL); +} static void meson_console_putchar(struct uart_port *port, int ch) {