From patchwork Mon Sep 26 11:58:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 77020 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp1134730qgf; Mon, 26 Sep 2016 04:59:17 -0700 (PDT) X-Received: by 10.98.31.133 with SMTP id l5mr37716953pfj.178.1474891157617; Mon, 26 Sep 2016 04:59:17 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id lm5si24982952pab.26.2016.09.26.04.59.17; Mon, 26 Sep 2016 04:59:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-serial-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1034085AbcIZL7Q (ORCPT + 2 others); Mon, 26 Sep 2016 07:59:16 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:36320 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030220AbcIZL7P (ORCPT ); Mon, 26 Sep 2016 07:59:15 -0400 Received: by mail-pa0-f44.google.com with SMTP id qn7so45013016pac.3 for ; Mon, 26 Sep 2016 04:59:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=IUUf3glErGFmWlOC+apFlR3mC6gRPntR/PLbmZEK3F0=; b=ZPTDjm8kxxH/maXl7mysA8Aq0z96YeTasFN4q51RMBduM9DPlhgIYw8GWmORETKEzH Blcq59Sp4+kYrvFnpKdztlQb764KoOmIKupqNQlX/Mjlh1JCStTaLV/mnPxJQ5+H57Fa yclvrVFUk3h+Pm8dASRSbZDt9MnFxlnT6MuHM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=IUUf3glErGFmWlOC+apFlR3mC6gRPntR/PLbmZEK3F0=; b=FFoygDfny+ZAJ5J9Y1zVtj/NEbHCR4sBF+tW5fq/JzVjVergv4PF2MlP8IxlRdMgDD eSSFNhQfR23ohZ1FxNJMH/aQuOUit1yBcllLi6iZ2knKUNXV++eKkfrp4rx61W5a7pTh SyNy+Sp4nmaFxG0cl2F8pMxy1D+2IO7xFMZXu+B3SafxwmHBVUPJBQIEzAof+5opZqpU AACK6H40cWo9oOB9Ko6RqW4WYDZo1LjZjAcD8t6k72xPDietp14d2QPVUt9m7L2/v2xo wLy06e0s6AZeWQRv8u4OCEvgpJ/i0hTFJvcFEQ0nKhu2yR2AWJj7dpvwJ9FI9/OHda5e GyrA== X-Gm-Message-State: AE9vXwM4aqxw/ugpTpNx7nXBaVaU+1jftVelqGru8yM8fc3wHhuPOYdPDZGqPBdPanrKGjBJ X-Received: by 10.66.10.102 with SMTP id h6mr37985323pab.112.1474891154662; Mon, 26 Sep 2016 04:59:14 -0700 (PDT) Received: from localhost.localdomain ([45.56.152.34]) by smtp.gmail.com with ESMTPSA id r29sm25197595pfd.37.2016.09.26.04.59.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 26 Sep 2016 04:59:14 -0700 (PDT) From: Baoyou Xie To: gregkh@linuxfoundation.org, jslaby@suse.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com Cc: linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, arnd@arndb.de, baoyou.xie@linaro.org, xie.baoyou@zte.com.cn, han.fei@zte.com.cn, tang.qiang007@zte.com.cn Subject: [PATCH] serial: stm32: mark symbols static where possible Date: Mon, 26 Sep 2016 19:58:56 +0800 Message-Id: <1474891136-16602-1-git-send-email-baoyou.xie@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-serial-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org We get 2 warnings when building kernel with W=1: drivers/tty/serial/stm32-usart.c:63:5: warning: no previous prototype for 'stm32_pending_rx' [-Wmissing-prototypes] drivers/tty/serial/stm32-usart.c:88:15: warning: no previous prototype for 'stm32_get_char' [-Wmissing-prototypes] In fact, these two functions are only used in the file in which they are declared and don't need a declaration, but can be made static. So this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie --- drivers/tty/serial/stm32-usart.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index 4d3001b..bb9b5e9 100644 --- a/drivers/tty/serial/stm32-usart.c +++ b/drivers/tty/serial/stm32-usart.c @@ -60,8 +60,8 @@ static void stm32_clr_bits(struct uart_port *port, u32 reg, u32 bits) writel_relaxed(val, port->membase + reg); } -int stm32_pending_rx(struct uart_port *port, u32 *sr, int *last_res, - bool threaded) +static int stm32_pending_rx(struct uart_port *port, u32 *sr, int *last_res, + bool threaded) { struct stm32_port *stm32_port = to_stm32_port(port); struct stm32_usart_offsets *ofs = &stm32_port->info->ofs; @@ -85,7 +85,8 @@ int stm32_pending_rx(struct uart_port *port, u32 *sr, int *last_res, return 0; } -unsigned long stm32_get_char(struct uart_port *port, u32 *sr, int *last_res) +static unsigned long +stm32_get_char(struct uart_port *port, u32 *sr, int *last_res) { struct stm32_port *stm32_port = to_stm32_port(port); struct stm32_usart_offsets *ofs = &stm32_port->info->ofs;