diff mbox series

[-next] platform/surface: aggregator_registry: Make symbol 'ssam_base_hub_group' static

Message ID 20210309131500.1885772-1-weiyongjun1@huawei.com (mailing list archive)
State Accepted, archived
Headers show
Series [-next] platform/surface: aggregator_registry: Make symbol 'ssam_base_hub_group' static | expand

Commit Message

Wei Yongjun March 9, 2021, 1:15 p.m. UTC
From: Wei Yongjun <weiyongjun1@huawei.com>

The sparse tool complains as follows:

drivers/platform/surface/surface_aggregator_registry.c:355:30: warning:
 symbol 'ssam_base_hub_group' was not declared. Should it be static?

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

Fixes: 797e78564634 ("platform/surface: aggregator_registry: Add base device hub")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 .../platform/surface/surface_aggregator_registry.c  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Maximilian Luz March 9, 2021, 1:24 p.m. UTC | #1
On 3/9/21 2:15 PM, 'Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> The sparse tool complains as follows:
> 
> drivers/platform/surface/surface_aggregator_registry.c:355:30: warning:
>   symbol 'ssam_base_hub_group' was not declared. Should it be static?
> 
> This symbol is not used outside of surface_aggregator_registry.c, so this
> commit marks it static.

Right, this should be static.

Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com>

Thanks,
Max

> 
> Fixes: 797e78564634 ("platform/surface: aggregator_registry: Add base device hub")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>   .../platform/surface/surface_aggregator_registry.c  | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c
> index cdb4a95af3e8..86cff5fce3cd 100644
> --- a/drivers/platform/surface/surface_aggregator_registry.c
> +++ b/drivers/platform/surface/surface_aggregator_registry.c
> @@ -352,7 +352,7 @@ static struct attribute *ssam_base_hub_attrs[] = {
>   	NULL,
>   };
>   
> -const struct attribute_group ssam_base_hub_group = {
> +static const struct attribute_group ssam_base_hub_group = {
>   	.attrs = ssam_base_hub_attrs,
>   };
>   
>
Hans de Goede March 17, 2021, 5:46 p.m. UTC | #2
Hi,

On 3/9/21 2:15 PM, 'Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> The sparse tool complains as follows:
> 
> drivers/platform/surface/surface_aggregator_registry.c:355:30: warning:
>  symbol 'ssam_base_hub_group' was not declared. Should it be static?
> 
> This symbol is not used outside of surface_aggregator_registry.c, so this
> commit marks it static.
> 
> Fixes: 797e78564634 ("platform/surface: aggregator_registry: Add base device hub")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Thank you for your patch, I've applied this patch to my review-hans 
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.

Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.

Regards,

Hans

> ---
>  .../platform/surface/surface_aggregator_registry.c  | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c
> index cdb4a95af3e8..86cff5fce3cd 100644
> --- a/drivers/platform/surface/surface_aggregator_registry.c
> +++ b/drivers/platform/surface/surface_aggregator_registry.c
> @@ -352,7 +352,7 @@ static struct attribute *ssam_base_hub_attrs[] = {
>  	NULL,
>  };
>  
> -const struct attribute_group ssam_base_hub_group = {
> +static const struct attribute_group ssam_base_hub_group = {
>  	.attrs = ssam_base_hub_attrs,
>  };
>  
>
diff mbox series

Patch

diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c
index cdb4a95af3e8..86cff5fce3cd 100644
--- a/drivers/platform/surface/surface_aggregator_registry.c
+++ b/drivers/platform/surface/surface_aggregator_registry.c
@@ -352,7 +352,7 @@  static struct attribute *ssam_base_hub_attrs[] = {
 	NULL,
 };
 
-const struct attribute_group ssam_base_hub_group = {
+static const struct attribute_group ssam_base_hub_group = {
 	.attrs = ssam_base_hub_attrs,
 };