From patchwork Tue Sep 6 08:03:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 75477 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp419806qgf; Tue, 6 Sep 2016 01:04:32 -0700 (PDT) X-Received: by 10.66.5.5 with SMTP id o5mr14022430pao.38.1473149072278; Tue, 06 Sep 2016 01:04:32 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v70si34176084pfa.220.2016.09.06.01.04.27; Tue, 06 Sep 2016 01:04:32 -0700 (PDT) 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; dkim=pass header.i=@linaro.org; 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; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755526AbcIFIEV (ORCPT + 27 others); Tue, 6 Sep 2016 04:04:21 -0400 Received: from mail-pf0-f177.google.com ([209.85.192.177]:33376 "EHLO mail-pf0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755179AbcIFIEP (ORCPT ); Tue, 6 Sep 2016 04:04:15 -0400 Received: by mail-pf0-f177.google.com with SMTP id g202so48945294pfb.0 for ; Tue, 06 Sep 2016 01:04:14 -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=MCyCgKLLiI8XGsOmU/HSQT+4BMHM8m50oVxBM7Bg8v0=; b=VAcWSy5lk6DlVoDiT0WRIwJ7yULwES7z7YQ5ipnFkEb7IpoMJUvFTJng9Ia6nH9vqo 0zB2XDYbPuAQU5S1iaHg3DB0l+Tvq8Q1KJOUgHMIpsLk1c1jqwSc7Cy5bsoQFU71Xz46 FEU5h5knqZyfeoYD3xQ7E1811MRonWZboFkag= 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=MCyCgKLLiI8XGsOmU/HSQT+4BMHM8m50oVxBM7Bg8v0=; b=fCU4v8rsT3UIsloMQ5CnBURchw+rK/vmIaLqoY01VfYROq+qlr1WvHui+qD3nhH6ws +JqelXxFHJ5Uu8tThklKZInfqrtapmuc6tZhvL6i7/rER9knj9AHm9RpWYN0nzo277BH FF/31130SAJq24XqZPqjIsbaALLsaEF3zLth20Mbv02kNF8u/v3b8Dd8pmgl160rJGIa JFgFKOxiF6Sv+AqFkxrkUtdHp9s4xVvd39FgdicgcKqxa5LF9cktRzTW/IUdoQ+jNUOU HvzhMu28d4FUk2tfQuPfVpeWpI6PbVv+nvmFwKvnwBsdqAgtSxZWYf7tSS6nF5lo108m fKjQ== X-Gm-Message-State: AE9vXwP3ADHIjLQa5YIxK5JMg+KmkyumcNo4LlDBf3SOS/zR4VmILpIjo4kucJ3YSLrZpURK X-Received: by 10.98.17.83 with SMTP id z80mr70827123pfi.38.1473149054335; Tue, 06 Sep 2016 01:04:14 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.17]) by smtp.gmail.com with ESMTPSA id y2sm38671707pan.31.2016.09.06.01.04.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 06 Sep 2016 01:04:13 -0700 (PDT) From: Baoyou Xie To: mathieu.poirier@linaro.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, arnd@arndb.de, baoyou.xie@linaro.org, xie.baoyou@zte.com.cn Subject: [PATCH] coresight: tmc: mark symbols static where possible Date: Tue, 6 Sep 2016 16:03:50 +0800 Message-Id: <1473149030-25576-1-git-send-email-baoyou.xie@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We get a few warnings when building kernel with W=1: drivers/hwtracing/coresight/coresight-tmc-etr.c:23:6: warning: no previous prototype for 'tmc_etr_enable_hw' [-Wmissing-prototypes] drivers/hwtracing/coresight/coresight-tmc-etf.c:25:6: warning: no previous prototype for 'tmc_etb_enable_hw' [-Wmissing-prototypes] ... In fact, these 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/hwtracing/coresight/coresight-tmc-etf.c | 2 +- drivers/hwtracing/coresight/coresight-tmc-etr.c | 2 +- drivers/hwtracing/coresight/coresight-tmc.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) -- 2.7.4 diff --git a/drivers/hwtracing/coresight/coresight-tmc-etf.c b/drivers/hwtracing/coresight/coresight-tmc-etf.c index 466af86..a9a525f 100644 --- a/drivers/hwtracing/coresight/coresight-tmc-etf.c +++ b/drivers/hwtracing/coresight/coresight-tmc-etf.c @@ -22,7 +22,7 @@ #include "coresight-priv.h" #include "coresight-tmc.h" -void tmc_etb_enable_hw(struct tmc_drvdata *drvdata) +static void tmc_etb_enable_hw(struct tmc_drvdata *drvdata) { CS_UNLOCK(drvdata->base); diff --git a/drivers/hwtracing/coresight/coresight-tmc-etr.c b/drivers/hwtracing/coresight/coresight-tmc-etr.c index 688be9e..1ff5451 100644 --- a/drivers/hwtracing/coresight/coresight-tmc-etr.c +++ b/drivers/hwtracing/coresight/coresight-tmc-etr.c @@ -20,7 +20,7 @@ #include "coresight-priv.h" #include "coresight-tmc.h" -void tmc_etr_enable_hw(struct tmc_drvdata *drvdata) +static void tmc_etr_enable_hw(struct tmc_drvdata *drvdata) { u32 axictl; diff --git a/drivers/hwtracing/coresight/coresight-tmc.c b/drivers/hwtracing/coresight/coresight-tmc.c index 9e02ac9..45947f3 100644 --- a/drivers/hwtracing/coresight/coresight-tmc.c +++ b/drivers/hwtracing/coresight/coresight-tmc.c @@ -249,8 +249,8 @@ static struct attribute *coresight_tmc_mgmt_attrs[] = { NULL, }; -ssize_t trigger_cntr_show(struct device *dev, - struct device_attribute *attr, char *buf) +static ssize_t trigger_cntr_show(struct device *dev, + struct device_attribute *attr, char *buf) { struct tmc_drvdata *drvdata = dev_get_drvdata(dev->parent); unsigned long val = drvdata->trigger_cntr;