2021-03-04 15:11:55

by Wei Yongjun

[permalink] [raw]
Subject: [PATCH -next] mtd: parsers: ofpart: make symbol 'bcm4908_partitions_quirks' static

From: Wei Yongjun <[email protected]>

The sparse tool complains as follows:

drivers/mtd/parsers/ofpart_core.c:25:32: warning:
symbol 'bcm4908_partitions_quirks' was not declared. Should it be static?

This symbol is not used outside of ofpart_core.c, so this
commit marks it static.

Fixes: 457da931b608 ("mtd: parsers: ofpart: support BCM4908 fixed partitions")
Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Wei Yongjun <[email protected]>
---
drivers/mtd/parsers/ofpart_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/parsers/ofpart_core.c b/drivers/mtd/parsers/ofpart_core.c
index 258c06a42283..e9cb9ca28813 100644
--- a/drivers/mtd/parsers/ofpart_core.c
+++ b/drivers/mtd/parsers/ofpart_core.c
@@ -22,7 +22,7 @@ struct fixed_partitions_quirks {
int (*post_parse)(struct mtd_info *mtd, struct mtd_partition *parts, int nr_parts);
};

-struct fixed_partitions_quirks bcm4908_partitions_quirks = {
+static struct fixed_partitions_quirks bcm4908_partitions_quirks = {
.post_parse = bcm4908_partitions_post_parse,
};



2021-03-05 07:17:36

by Rafał Miłecki

[permalink] [raw]
Subject: Re: [PATCH -next] mtd: parsers: ofpart: make symbol 'bcm4908_partitions_quirks' static

On 04.03.2021 07:46, 'Wei Yongjun wrote:
> From: Wei Yongjun <[email protected]>
>
> The sparse tool complains as follows:
>
> drivers/mtd/parsers/ofpart_core.c:25:32: warning:
> symbol 'bcm4908_partitions_quirks' was not declared. Should it be static?
>
> This symbol is not used outside of ofpart_core.c, so this
> commit marks it static.
>
> Fixes: 457da931b608 ("mtd: parsers: ofpart: support BCM4908 fixed partitions")
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: Wei Yongjun <[email protected]>

Looks good ofc, thanks.

2021-03-11 11:41:20

by Miquel Raynal

[permalink] [raw]
Subject: Re: [PATCH -next] mtd: parsers: ofpart: make symbol 'bcm4908_partitions_quirks' static

On Thu, 2021-03-04 at 06:46:00 UTC, 'Wei Yongjun wrote:
> From: Wei Yongjun <[email protected]>
>
> The sparse tool complains as follows:
>
> drivers/mtd/parsers/ofpart_core.c:25:32: warning:
> symbol 'bcm4908_partitions_quirks' was not declared. Should it be static?
>
> This symbol is not used outside of ofpart_core.c, so this
> commit marks it static.
>
> Fixes: 457da931b608 ("mtd: parsers: ofpart: support BCM4908 fixed partitions")
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: Wei Yongjun <[email protected]>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.

Miquel