diff mbox series

[-next] ACPI: PRM: make symbol 'prm_module_list' static

Message ID 20210615172157.2841280-1-weiyongjun1@huawei.com
State Accepted
Commit d7a188bb87d8da78a1ef0dea53f1639f3daf0790
Headers show
Series [-next] ACPI: PRM: make symbol 'prm_module_list' static | expand

Commit Message

Wei Yongjun June 15, 2021, 5:21 p.m. UTC
The sparse tool complains as follows:

drivers/acpi/prmt.c:53:1: warning:
 symbol 'prm_module_list' was not declared. Should it be static?

This symbol is not used outside of prmt.c, so marks it static.

Fixes: cefc7ca46235 ("ACPI: PRM: implement OperationRegion handler for the PlatformRtMechanism subtype")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/acpi/prmt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rafael J. Wysocki June 17, 2021, 12:41 p.m. UTC | #1
On Tue, Jun 15, 2021 at 7:11 PM Wei Yongjun <weiyongjun1@huawei.com> wrote:
>

> The sparse tool complains as follows:

>

> drivers/acpi/prmt.c:53:1: warning:

>  symbol 'prm_module_list' was not declared. Should it be static?

>

> This symbol is not used outside of prmt.c, so marks it static.

>

> Fixes: cefc7ca46235 ("ACPI: PRM: implement OperationRegion handler for the PlatformRtMechanism subtype")

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

> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

> ---

>  drivers/acpi/prmt.c | 2 +-

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

>

> diff --git a/drivers/acpi/prmt.c b/drivers/acpi/prmt.c

> index 33c274698d07..31cf9aee5edd 100644

> --- a/drivers/acpi/prmt.c

> +++ b/drivers/acpi/prmt.c

> @@ -50,7 +50,7 @@ struct prm_context_buffer {

>  #pragma pack()

>

>

> -LIST_HEAD(prm_module_list);

> +static LIST_HEAD(prm_module_list);

>

>  struct prm_handler_info {

>         guid_t guid;

>


Applied, thanks!
diff mbox series

Patch

diff --git a/drivers/acpi/prmt.c b/drivers/acpi/prmt.c
index 33c274698d07..31cf9aee5edd 100644
--- a/drivers/acpi/prmt.c
+++ b/drivers/acpi/prmt.c
@@ -50,7 +50,7 @@  struct prm_context_buffer {
 #pragma pack()
 
 
-LIST_HEAD(prm_module_list);
+static LIST_HEAD(prm_module_list);
 
 struct prm_handler_info {
 	guid_t guid;