2022-01-13 16:19:04

by Jiapeng Chong

[permalink] [raw]
Subject: [PATCH] ACPI: PCC: make pcc_ctx static

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

Fix the following sparse warning:

drivers/acpi/acpi_pcc.c:34:22: warning: symbol 'pcc_ctx' was not
declared. Should it be static?

Reported-by: Abaci Robot <[email protected]>
Signed-off-by: Jiapeng Chong <[email protected]>
---
drivers/acpi/acpi_pcc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/acpi_pcc.c b/drivers/acpi/acpi_pcc.c
index 41e3ebd204ff..a12b55d81209 100644
--- a/drivers/acpi/acpi_pcc.c
+++ b/drivers/acpi/acpi_pcc.c
@@ -31,7 +31,7 @@ struct pcc_data {
struct acpi_pcc_info ctx;
};

-struct acpi_pcc_info pcc_ctx;
+static struct acpi_pcc_info pcc_ctx;

static void pcc_rx_callback(struct mbox_client *cl, void *m)
{
--
2.20.1.7.g153144c



2022-01-14 10:31:07

by Sudeep Holla

[permalink] [raw]
Subject: Re: [PATCH] ACPI: PCC: make pcc_ctx static

On Fri, Jan 14, 2022 at 12:18:46AM +0800, Jiapeng Chong wrote:
> This symbol is not used outside of acpi_pcc.c, so marks it static.
>
> Fix the following sparse warning:
>
> drivers/acpi/acpi_pcc.c:34:22: warning: symbol 'pcc_ctx' was not
> declared. Should it be static?
>
> Reported-by: Abaci Robot <[email protected]>

The fix is now already applied [1]

--
Regards,
Sudeep

[1] https://lore.kernel.org/lkml/CAJZ5v0iG0-O1m2hS62yXMNW4p1JhWhxXZCDQc=mxKc50mU7GZw@mail.gmail.com