]>
Commit | Line | Data |
---|---|---|
9547e94c SL |
1 | From d81faeaca54ee0a30246db002524edc05fcad84f Mon Sep 17 00:00:00 2001 |
2 | From: Eric Long <eric.long@linaro.org> | |
3 | Date: Wed, 17 Feb 2016 17:51:43 -0700 | |
4 | Subject: coresight: "DEVICE_ATTR_RO" should defined as static. | |
5 | ||
6 | [ Upstream commit bf16e5b8cdeabc1fe6565af0be475bb2084dc388 ] | |
7 | ||
8 | "DEVICE_ATTR_RO(name)" should be defined as static. And | |
9 | there is an unnecessary space at the front of the code. | |
10 | ||
11 | The sparse tool output logs as the following: | |
12 | coresight-etm4x.c:2224:1: warning: symbol 'dev_attr_trcoslsr' was | |
13 | not declared. Should it be static? | |
14 | coresight-etm4x.c:2225:1: warning: symbol 'dev_attr_trcpdcr' was | |
15 | not declared. Should it be static? | |
16 | coresight-etm4x.c:2226:1: warning: symbol 'dev_attr_trcpdsr' was | |
17 | not declared. Should it be static? | |
18 | And the smatch tool output logs as the following: | |
19 | of_coresight.c:89 of_coresight_alloc_memory() warn: | |
20 | inconsistent indenting | |
21 | ||
22 | Signed-off-by: Eric Long <eric.long@linaro.org> | |
23 | Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> | |
24 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
25 | Signed-off-by: Sasha Levin <sashal@kernel.org> | |
26 | --- | |
27 | drivers/hwtracing/coresight/coresight-etm4x.c | 2 +- | |
28 | drivers/hwtracing/coresight/of_coresight.c | 2 +- | |
29 | 2 files changed, 2 insertions(+), 2 deletions(-) | |
30 | ||
31 | diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c | |
32 | index a6707642bb23..1ec6798b21e8 100644 | |
33 | --- a/drivers/hwtracing/coresight/coresight-etm4x.c | |
34 | +++ b/drivers/hwtracing/coresight/coresight-etm4x.c | |
35 | @@ -2219,7 +2219,7 @@ static ssize_t name##_show(struct device *_dev, \ | |
36 | return scnprintf(buf, PAGE_SIZE, "0x%x\n", \ | |
37 | readl_relaxed(drvdata->base + offset)); \ | |
38 | } \ | |
39 | -DEVICE_ATTR_RO(name) | |
40 | +static DEVICE_ATTR_RO(name) | |
41 | ||
42 | coresight_simple_func(trcoslsr, TRCOSLSR); | |
43 | coresight_simple_func(trcpdcr, TRCPDCR); | |
44 | diff --git a/drivers/hwtracing/coresight/of_coresight.c b/drivers/hwtracing/coresight/of_coresight.c | |
45 | index 7d2bb1549608..fb7597b1c66f 100644 | |
46 | --- a/drivers/hwtracing/coresight/of_coresight.c | |
47 | +++ b/drivers/hwtracing/coresight/of_coresight.c | |
48 | @@ -86,7 +86,7 @@ static int of_coresight_alloc_memory(struct device *dev, | |
49 | return -ENOMEM; | |
50 | ||
51 | /* Children connected to this component via @outports */ | |
52 | - pdata->child_names = devm_kzalloc(dev, pdata->nr_outport * | |
53 | + pdata->child_names = devm_kzalloc(dev, pdata->nr_outport * | |
54 | sizeof(*pdata->child_names), | |
55 | GFP_KERNEL); | |
56 | if (!pdata->child_names) | |
57 | -- | |
58 | 2.19.1 | |
59 |