drm/mgag200: set variable mgag200_modeset storage-class-specifier to static

Message ID 20230517134140.874179-1-trix@redhat.com
State New
Headers
Series drm/mgag200: set variable mgag200_modeset storage-class-specifier to static |

Commit Message

Tom Rix May 17, 2023, 1:41 p.m. UTC
  smatch reports
drivers/gpu/drm/mgag200/mgag200_drv.c:23:5: warning: symbol
  'mgag200_modeset' was not declared. Should it be static?

This variable is only used in its defining file, so it should be static

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/gpu/drm/mgag200/mgag200_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Jocelyn Falempe May 23, 2023, 6:44 a.m. UTC | #1
On 17/05/2023 15:41, Tom Rix wrote:
> smatch reports
> drivers/gpu/drm/mgag200/mgag200_drv.c:23:5: warning: symbol
>    'mgag200_modeset' was not declared. Should it be static?
> 
> This variable is only used in its defining file, so it should be static
> 
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
>   drivers/gpu/drm/mgag200/mgag200_drv.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.c b/drivers/gpu/drm/mgag200/mgag200_drv.c
> index 976f0ab2006b..abddf37f0ea1 100644
> --- a/drivers/gpu/drm/mgag200/mgag200_drv.c
> +++ b/drivers/gpu/drm/mgag200/mgag200_drv.c
> @@ -20,7 +20,7 @@
>   
>   #include "mgag200_drv.h"
>   
> -int mgag200_modeset = -1;
> +static int mgag200_modeset = -1;
>   MODULE_PARM_DESC(modeset, "Disable/Enable modesetting");
>   module_param_named(modeset, mgag200_modeset, int, 0400);
>   

It looks good to me,

Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
  
Thomas Zimmermann June 23, 2023, 8:28 a.m. UTC | #2
Am 17.05.23 um 15:41 schrieb Tom Rix:
> smatch reports
> drivers/gpu/drm/mgag200/mgag200_drv.c:23:5: warning: symbol
>    'mgag200_modeset' was not declared. Should it be static?
> 
> This variable is only used in its defining file, so it should be static
> 
> Signed-off-by: Tom Rix <trix@redhat.com>

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>

> ---
>   drivers/gpu/drm/mgag200/mgag200_drv.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.c b/drivers/gpu/drm/mgag200/mgag200_drv.c
> index 976f0ab2006b..abddf37f0ea1 100644
> --- a/drivers/gpu/drm/mgag200/mgag200_drv.c
> +++ b/drivers/gpu/drm/mgag200/mgag200_drv.c
> @@ -20,7 +20,7 @@
>   
>   #include "mgag200_drv.h"
>   
> -int mgag200_modeset = -1;
> +static int mgag200_modeset = -1;
>   MODULE_PARM_DESC(modeset, "Disable/Enable modesetting");
>   module_param_named(modeset, mgag200_modeset, int, 0400);
>   

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
  
Jocelyn Falempe June 23, 2023, 9:05 a.m. UTC | #3
On 23/06/2023 10:28, Thomas Zimmermann wrote:
> 
> 
> Am 17.05.23 um 15:41 schrieb Tom Rix:
>> smatch reports
>> drivers/gpu/drm/mgag200/mgag200_drv.c:23:5: warning: symbol
>>    'mgag200_modeset' was not declared. Should it be static?
>>
>> This variable is only used in its defining file, so it should be static
>>
>> Signed-off-by: Tom Rix <trix@redhat.com>
> 
> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
> 
>> ---
>>   drivers/gpu/drm/mgag200/mgag200_drv.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.c 
>> b/drivers/gpu/drm/mgag200/mgag200_drv.c
>> index 976f0ab2006b..abddf37f0ea1 100644
>> --- a/drivers/gpu/drm/mgag200/mgag200_drv.c
>> +++ b/drivers/gpu/drm/mgag200/mgag200_drv.c
>> @@ -20,7 +20,7 @@
>>   #include "mgag200_drv.h"
>> -int mgag200_modeset = -1;
>> +static int mgag200_modeset = -1;
>>   MODULE_PARM_DESC(modeset, "Disable/Enable modesetting");
>>   module_param_named(modeset, mgag200_modeset, int, 0400);
> 

applied to drm-misc-next

Thanks for your contribution.
  

Patch

diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.c b/drivers/gpu/drm/mgag200/mgag200_drv.c
index 976f0ab2006b..abddf37f0ea1 100644
--- a/drivers/gpu/drm/mgag200/mgag200_drv.c
+++ b/drivers/gpu/drm/mgag200/mgag200_drv.c
@@ -20,7 +20,7 @@ 
 
 #include "mgag200_drv.h"
 
-int mgag200_modeset = -1;
+static int mgag200_modeset = -1;
 MODULE_PARM_DESC(modeset, "Disable/Enable modesetting");
 module_param_named(modeset, mgag200_modeset, int, 0400);