]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
coresight: tmc: mark symbols static where possible
authorBaoyou Xie <baoyou.xie@linaro.org>
Thu, 8 Sep 2016 22:50:39 +0000 (16:50 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Sep 2016 11:53:00 +0000 (13:53 +0200)
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]
drivers/hwtracing/coresight/coresight-tmc.c:250:9: warning: no previous prototype for ‘trigger_cntr_show’ [-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 <baoyou.xie@linaro.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/coresight/coresight-tmc-etf.c
drivers/hwtracing/coresight/coresight-tmc-etr.c
drivers/hwtracing/coresight/coresight-tmc.c

index 5fa49c4252f648f49a65959827a4e9f165eac9c2..d6941ea24d8df1152baf39177e9ac9fea733f499 100644 (file)
@@ -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);
 
index 6d7de0309e9431dacf801a35dd81e26228a23305..886ea83c68e0cf2233398f46cb00edbe188c56b6 100644 (file)
@@ -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;
 
index a4748630f5d630e6df2fd13cf01af91f2f6da0e1..d8517d2a968caf8f97e1a2e5c89c9167a12bc58d 100644 (file)
@@ -247,8 +247,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;