Path: csiph.com!news.mixmin.net!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod From: Mathieu Poirier Newsgroups: linux.kernel Subject: Re: [PATCH] coresight: tmc: mark symbols static where possible Date: Tue, 06 Sep 2016 17:30:02 +0200 Message-ID: References: X-Original-To: Baoyou Xie Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=81qnl+J1sc1+3e0r4ZjHabDzD5Q2l3WgFPvmCQ5GkyU=; b=dclwxPTNm/AnvC8eL5S/4jO8n+QZVdncjiNBWY8KQORxcUxked1sk6FUJ6aCBcVlez coAZRiE6OI13NCwOQlymA32pWIHE61HprkybNH7OcV6hiDHx3GKtIFidiKO+7MswgLT5 K928SRy5GummzhcGhkUGytOJYp4qXQqY50mTc= X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=81qnl+J1sc1+3e0r4ZjHabDzD5Q2l3WgFPvmCQ5GkyU=; b=H8L0lt2iU/M1kLTq7AziHWKx8Z7EAMv893Aj3nVt9kn5mMAUN3eeCL1U+eXkpGVKDN N5jkOFUgKVE2/62RHAm5Kc3vHy1yZFA++xLTv1uOwNgow8g5fk1sS/fx69VyBhTCrg1C YQZAlGWNuKghi9d2YVKLpuK9Be+hjft4lxN8QB4HnyP8h3WXg1XZ1VFwI1/G/2KakcQT cE27W45WI1N83zoCKccLo5Xb/MZL88Hga/wy4+ryc2GP3xjXYmbVx5jWuRpgxR9BQOsC T0vYg855KulMryFpQmEH2aNflgg/he3Zr25m637kanYansiGBkhb+q2Kv2VkfpNaXj3u Cdvw== X-Gm-Message-State: AE9vXwMgXFQ+2us6lE+sm5o41SGM/qv7yteBPAARETzv+cKd4gjs90cEUrfRItuECyadVn2bcEMGmoCD0k3WCgvt X-Received: by 10.194.20.65 with SMTP id l1mr42089857wje.71.1473175738270; Tue, 06 Sep 2016 08:28:58 -0700 (PDT) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: robomod@news.nic.it List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Approved: robomod@news.nic.it Lines: 67 Organization: linux.* mail to news gateway X-Original-Cc: "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Arnd Bergmann , xie.baoyou@zte.com.cn X-Original-Date: Tue, 6 Sep 2016 09:28:57 -0600 X-Original-Message-ID: X-Original-References: <1473149030-25576-1-git-send-email-baoyou.xie@linaro.org> X-Original-Sender: linux-kernel-owner@vger.kernel.org Xref: csiph.com linux.kernel:1477522 On 6 September 2016 at 02:03, Baoyou Xie wrote: > 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(-) > > 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; > -- > 2.7.4 > I have applied this patch but modified the commit log to include the warning triggered by the last snipped. Thanks, Mathieu