diff mbox series

ACPI, APEI: make apei_resources_all static

Message ID 20200912033851.143311-1-yanaijie@huawei.com
State Accepted
Commit 8b62740472c4fe3cee64df4588033e1d8ff3b235
Headers show
Series ACPI, APEI: make apei_resources_all static | expand

Commit Message

Jason Yan Sept. 12, 2020, 3:38 a.m. UTC
This eliminates the following sparse warning:

drivers/acpi/apei/apei-base.c:290:23: warning: symbol
'apei_resources_all' was not declared. Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
 drivers/acpi/apei/apei-base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Borislav Petkov Sept. 15, 2020, 12:50 p.m. UTC | #1
On Sat, Sep 12, 2020 at 11:38:51AM +0800, Jason Yan wrote:
> This eliminates the following sparse warning:

> 

> drivers/acpi/apei/apei-base.c:290:23: warning: symbol

> 'apei_resources_all' was not declared. Should it be static?

> 

> Reported-by: Hulk Robot <hulkci@huawei.com>

> Signed-off-by: Jason Yan <yanaijie@huawei.com>

> ---

>  drivers/acpi/apei/apei-base.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/drivers/acpi/apei/apei-base.c b/drivers/acpi/apei/apei-base.c

> index e358d0046494..d3fbac58d91a 100644

> --- a/drivers/acpi/apei/apei-base.c

> +++ b/drivers/acpi/apei/apei-base.c

> @@ -287,7 +287,7 @@ struct apei_res {

>  };

>  

>  /* Collect all resources requested, to avoid conflict */

> -struct apei_resources apei_resources_all = {

> +static struct apei_resources apei_resources_all = {

>  	.iomem = LIST_HEAD_INIT(apei_resources_all.iomem),

>  	.ioport = LIST_HEAD_INIT(apei_resources_all.ioport),

>  };

> -- 


Reviewed-by: Borislav Petkov <bp@suse.de>


-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
Rafael J. Wysocki Sept. 25, 2020, 10:56 a.m. UTC | #2
On Sat, Sep 12, 2020 at 5:39 AM Jason Yan <yanaijie@huawei.com> wrote:
>
> This eliminates the following sparse warning:
>
> drivers/acpi/apei/apei-base.c:290:23: warning: symbol
> 'apei_resources_all' was not declared. Should it be static?
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
> ---
>  drivers/acpi/apei/apei-base.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/apei/apei-base.c b/drivers/acpi/apei/apei-base.c
> index e358d0046494..d3fbac58d91a 100644
> --- a/drivers/acpi/apei/apei-base.c
> +++ b/drivers/acpi/apei/apei-base.c
> @@ -287,7 +287,7 @@ struct apei_res {
>  };
>
>  /* Collect all resources requested, to avoid conflict */
> -struct apei_resources apei_resources_all = {
> +static struct apei_resources apei_resources_all = {
>         .iomem = LIST_HEAD_INIT(apei_resources_all.iomem),
>         .ioport = LIST_HEAD_INIT(apei_resources_all.ioport),
>  };
> --

Applied as 5.10 material with the Boris' R-by, thanks!
diff mbox series

Patch

diff --git a/drivers/acpi/apei/apei-base.c b/drivers/acpi/apei/apei-base.c
index e358d0046494..d3fbac58d91a 100644
--- a/drivers/acpi/apei/apei-base.c
+++ b/drivers/acpi/apei/apei-base.c
@@ -287,7 +287,7 @@  struct apei_res {
 };
 
 /* Collect all resources requested, to avoid conflict */
-struct apei_resources apei_resources_all = {
+static struct apei_resources apei_resources_all = {
 	.iomem = LIST_HEAD_INIT(apei_resources_all.iomem),
 	.ioport = LIST_HEAD_INIT(apei_resources_all.ioport),
 };