ACPI / CPPC: Make some symbols static
PATCH 1/1 ACPI / CPPC: Make some symbols static
Fix the following sparse warnings:
drivers/acpi/cppc_acpi.c:353:20: warning: symbol 'cppc_mbox_cl' was not declared. Should it be static? drivers/acpi/cppc_acpi.c:600:5: warning: symbol 'pcc_data_alloc' was not declared. Should it be static?
Reported-by Hulk Robot <[email protected]>
Signed-off-by Zou Wei <[email protected]>
--- drivers/acpi/cppc_acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/acpi/cppc_acpi.c +2 -2
@@ -350,7 +350,7 @@ static void cppc_chan_tx_done(struct mbox_client *cl, void *msg, int ret) *(u16 *)msg, ret); } -struct mbox_client cppc_mbox_cl = { +static struct mbox_client cppc_mbox_cl = { .tx_done = cppc_chan_tx_done, .knows_txdone = true, };
@@ -597,7 +597,7 @@ bool __weak cpc_ffh_supported(void)* * Return: 0 for success, errno for failure */ -int pcc_data_alloc (int pcc_ss_id) +static int pcc_data_alloc (int pcc_ss_id) {if (pcc_ss_id <0 || pcc_ss_id >=MAX_PCC_SUBSPACES )return -EINVAL ;
Signature · 1 line
2.6.2
Rafael J. Wysocki
AppliedQuoted 26 lines · CEST Zou Wei
Fix the following sparse warnings:
drivers/acpi/cppc_acpi.c:353:20: warning: symbol 'cppc_mbox_cl' was not declared. Should it be static?drivers/acpi/cppc_acpi.c:600:5: warning: symbol 'pcc_data_alloc' was not declared. Should it be static?Reported-by Hulk Robot <[email protected]>Signed-off-by Zou Wei <[email protected]>--- drivers/acpi/cppc_acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/acpi/cppc_acpi.c +1
-1@@ -350,7 +350,7 @@ static void cppc_chan_tx_done(struct mbox_client *cl, void *msg, int ret) *(u16 *)msg, ret); } -struct mbox_client cppc_mbox_cl = { +static struct mbox_client cppc_mbox_cl = { .tx_done = cppc_chan_tx_done, .knows_txdone = true, };
drivers/acpi/cppc_acpi.c bool __weak cpc_ffh_supported(void) · line 603
Quoted 8 lines
drivers/acpi/cppc_acpi.c +1
-1@@ -597,7 +597,7 @@ bool __weak cpc_ffh_supported(void)* * Return: 0 for success, errno for failure */ -int pcc_data_alloc (int pcc_ss_id) +static int pcc_data_alloc (int pcc_ss_id) {if (pcc_ss_id <0 || pcc_ss_id >=MAX_PCC_SUBSPACES )return -EINVAL ;
Applied as 5.8-candidate material, thanks!