From patchwork Thu Jun 22 07:48:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 106178 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp2329600qgd; Thu, 22 Jun 2017 00:49:31 -0700 (PDT) X-Received: by 10.80.218.135 with SMTP id q7mr1616605edj.85.1498117771333; Thu, 22 Jun 2017 00:49:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498117771; cv=none; d=google.com; s=arc-20160816; b=POqWWYMRpgm0WRwVvsFh4pbyvEAhkLA8smwm1JY8AFtcOf3vvKbZ1SwQfqQWuw/7rd UT8MbcMh8cyqYvkrmeNSk16IxIVPTVU7xTF2Fl8q1BUEB8EmVEFnfd3a1xTs7iQAAyVL ADiGd+DMjp3NDptoVUFgYtOMuPonUpm/OA/E15iHe0ndryz9yRfmSSDIaISDpDRKL8Tx fdT/jNSc5qQkNdIFpnRHxUhzH+pXKYIqM7FNnL4m1v0bLUKkpJBvPPsgzmVcZj9chSvQ M/ssje8nr/wICGgSy5m5pLXx2CCR7WEqO3GYtG/dNl+YU4G/DfnSZLPznuYmKKtr6Pbb gYpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:message-id:date:to:from :dkim-signature:dkim-filter:arc-authentication-results; bh=Jwt0ntPM7AayE/sGHM94jjngj594Rfs++/11am37ZSc=; b=EI2slJ3OrmAXmrDx6DFw6COBgrV21rBEMgzioZeei2BCTZZaswa9zarJymk8jfoRoj mApSz+6YicLnL2JC1Qg+by7hdd1aEA2ql1Iw+qBcpkT6Grn0C7Q/A94JD5qmqZN8XPuc cBx5lAYjDMJRJoykIU4rcVnlhb6MKDapEV+ZWSDQSGe6isH/jJFagSy5YRS8psmmC2dP yGyO44mBsL2tILd6Zf00Js880JbvRTTTVfHTYTyTtxm4wLvzOOauW2qvvbb+9kASE1lI Bxjo+i7wNgKCC3mL4d7ow0HaOUVrA7stAkna9XSyJzneLfPpoONJJpYVBLL0WSw/pspv fenw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.b=UX6SMiSB; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id x64si939457ede.333.2017.06.22.00.49.31; Thu, 22 Jun 2017 00:49:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.b=UX6SMiSB; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id DC308C21C87; Thu, 22 Jun 2017 07:49:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 13D76C21C4E; Thu, 22 Jun 2017 07:49:21 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 9D4F4C21C4E; Thu, 22 Jun 2017 07:49:19 +0000 (UTC) Received: from conuserg-11.nifty.com (conuserg-11.nifty.com [210.131.2.78]) by lists.denx.de (Postfix) with ESMTPS id C4EAAC21C3E for ; Thu, 22 Jun 2017 07:49:18 +0000 (UTC) Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id v5M7mp91022359; Thu, 22 Jun 2017 16:48:51 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com v5M7mp91022359 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1498117731; bh=S1M3KLWHtI5ad7VaVuhgIXzfEp4qsLLNSAvg0rceh8Q=; h=From:To:Cc:Subject:Date:From; b=UX6SMiSBWyhMsMXEFrEFfM/JzdoIHD5p/LdNyryG5q0BXtvQ6eJYsE8t5m90LoFNN D6fzlBTfYAfTgouJK3DPyibCYDsxdr0EYYG3bs5PdA1A83tewQHUiRkkFJ/Ce8DBXF aepF1DZT2vB3xeauNBC1LxWEqh0AVXDTWTwX9VOOg4BedabqN0Y3VJqR+8bXiuBXiQ zThGzq/kO9CCwtZSZFP3m5hpyql8BV8k3fyPrBIxKkJa4HEzZ3YOBTJupuQK4ywYUm UubFyUh67QxUXMeN8/qX2pCPSHKjfq4j+Law2mt742QdBCKSiGIgZs3hNtAYJmLjA2 q4BT72iPg+Oww== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Thu, 22 Jun 2017 16:48:49 +0900 Message-Id: <1498117729-10157-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Cc: Stefan Roese , Andre Przywara Subject: [U-Boot] [PATCH] serial: make serial_stub_* to static functions X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add missing static to serial_stub_puts(). Unexport serial_stub_{getc,tstc} because they are used locally. Signed-off-by: Masahiro Yamada Reviewed-by: Bin Meng Reviewed-by: Simon Glass --- drivers/serial/serial-uclass.c | 11 +++++++---- drivers/serial/serial.c | 4 ++-- include/common.h | 5 ----- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c index a9c4f89e1a09..200f4b9fd720 100644 --- a/drivers/serial/serial-uclass.c +++ b/drivers/serial/serial-uclass.c @@ -212,27 +212,30 @@ void serial_stdio_init(void) { } -#if defined(CONFIG_DM_STDIO) && CONFIG_IS_ENABLED(SERIAL_PRESENT) +#if defined(CONFIG_DM_STDIO) + +#if CONFIG_IS_ENABLED(SERIAL_PRESENT) static void serial_stub_putc(struct stdio_dev *sdev, const char ch) { _serial_putc(sdev->priv, ch); } #endif -void serial_stub_puts(struct stdio_dev *sdev, const char *str) +static void serial_stub_puts(struct stdio_dev *sdev, const char *str) { _serial_puts(sdev->priv, str); } -int serial_stub_getc(struct stdio_dev *sdev) +static int serial_stub_getc(struct stdio_dev *sdev) { return _serial_getc(sdev->priv); } -int serial_stub_tstc(struct stdio_dev *sdev) +static int serial_stub_tstc(struct stdio_dev *sdev) { return _serial_tstc(sdev->priv); } +#endif /** * on_baudrate() - Update the actual baudrate when the env var changes diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c index f2bd0e404c73..87542f92dfd9 100644 --- a/drivers/serial/serial.c +++ b/drivers/serial/serial.c @@ -273,14 +273,14 @@ static void serial_stub_puts(struct stdio_dev *sdev, const char *str) dev->puts(str); } -int serial_stub_getc(struct stdio_dev *sdev) +static int serial_stub_getc(struct stdio_dev *sdev) { struct serial_device *dev = sdev->priv; return dev->getc(); } -int serial_stub_tstc(struct stdio_dev *sdev) +static int serial_stub_tstc(struct stdio_dev *sdev) { struct serial_device *dev = sdev->priv; diff --git a/include/common.h b/include/common.h index 638c45b954d2..1a98512ab618 100644 --- a/include/common.h +++ b/include/common.h @@ -490,11 +490,6 @@ void serial_puts (const char *); int serial_getc (void); int serial_tstc (void); -/* These versions take a stdio_dev pointer */ -struct stdio_dev; -int serial_stub_getc(struct stdio_dev *sdev); -int serial_stub_tstc(struct stdio_dev *sdev); - /* $(CPU)/speed.c */ int get_clocks (void); ulong get_bus_freq (ulong);