All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm/drv: Remove initialization of static variables
@ 2021-08-06  2:30 zhaoxiao
  2021-08-10  9:59 ` Daniel Vetter
  0 siblings, 1 reply; 3+ messages in thread
From: zhaoxiao @ 2021-08-06  2:30 UTC (permalink / raw)
  To: robdclark, sean, airlied, daniel
  Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, zhaoxiao

Address the following checkpatch errors:
ERROR: do not initialise statics to false

FILE: :drivers/gpu/drm/msm/msm_drv.c:21:
-static bool reglog = false;

FILE: :drivers/gpu/drm/msm/msm_drv.c:31:
-bool dumpstate = false;

Signed-off-by: zhaoxiao <zhaoxiao@uniontech.com>
---
v2: change the patch description 
 drivers/gpu/drm/msm/msm_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index 9b8fa2ad0d84..d9ca4bc9620b 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -59,7 +59,7 @@ static const struct drm_mode_config_helper_funcs mode_config_helper_funcs = {
 };
 
 #ifdef CONFIG_DRM_MSM_REGISTER_LOGGING
-static bool reglog = false;
+static bool reglog;
 MODULE_PARM_DESC(reglog, "Enable register read/write logging");
 module_param(reglog, bool, 0600);
 #else
@@ -76,7 +76,7 @@ static char *vram = "16m";
 MODULE_PARM_DESC(vram, "Configure VRAM size (for devices without IOMMU/GPUMMU)");
 module_param(vram, charp, 0);
 
-bool dumpstate = false;
+bool dumpstate;
 MODULE_PARM_DESC(dumpstate, "Dump KMS state on errors");
 module_param(dumpstate, bool, 0600);
 
-- 
2.20.1




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] drm/drv: Remove initialization of static variables
  2021-08-06  2:30 [PATCH v2] drm/drv: Remove initialization of static variables zhaoxiao
@ 2021-08-10  9:59 ` Daniel Vetter
  2021-08-10 11:25   ` zhaoxiao
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Vetter @ 2021-08-10  9:59 UTC (permalink / raw)
  To: zhaoxiao
  Cc: robdclark, sean, airlied, daniel, linux-arm-msm, dri-devel,
	freedreno, linux-kernel

On Fri, Aug 06, 2021 at 10:30:47AM +0800, zhaoxiao wrote:
> Address the following checkpatch errors:
> ERROR: do not initialise statics to false
> 
> FILE: :drivers/gpu/drm/msm/msm_drv.c:21:
> -static bool reglog = false;
> 
> FILE: :drivers/gpu/drm/msm/msm_drv.c:31:
> -bool dumpstate = false;
> 
> Signed-off-by: zhaoxiao <zhaoxiao@uniontech.com>

Subject should start out with drm/msm, not drm/drv - that would indicate a
patch touching the drm_drv.c core files, or things related to that.
-Daniel

> ---
> v2: change the patch description 
>  drivers/gpu/drm/msm/msm_drv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
> index 9b8fa2ad0d84..d9ca4bc9620b 100644
> --- a/drivers/gpu/drm/msm/msm_drv.c
> +++ b/drivers/gpu/drm/msm/msm_drv.c
> @@ -59,7 +59,7 @@ static const struct drm_mode_config_helper_funcs mode_config_helper_funcs = {
>  };
>  
>  #ifdef CONFIG_DRM_MSM_REGISTER_LOGGING
> -static bool reglog = false;
> +static bool reglog;
>  MODULE_PARM_DESC(reglog, "Enable register read/write logging");
>  module_param(reglog, bool, 0600);
>  #else
> @@ -76,7 +76,7 @@ static char *vram = "16m";
>  MODULE_PARM_DESC(vram, "Configure VRAM size (for devices without IOMMU/GPUMMU)");
>  module_param(vram, charp, 0);
>  
> -bool dumpstate = false;
> +bool dumpstate;
>  MODULE_PARM_DESC(dumpstate, "Dump KMS state on errors");
>  module_param(dumpstate, bool, 0600);
>  
> -- 
> 2.20.1
> 
> 
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] drm/drv: Remove initialization of static variables
  2021-08-10  9:59 ` Daniel Vetter
@ 2021-08-10 11:25   ` zhaoxiao
  0 siblings, 0 replies; 3+ messages in thread
From: zhaoxiao @ 2021-08-10 11:25 UTC (permalink / raw)
  To: robdclark, sean, airlied, linux-arm-msm, dri-devel, freedreno,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1677 bytes --]

Thanks for you advice, and I modify the patch according to your suggestions.

在 2021/8/10 下午5:59, Daniel Vetter 写道:
> On Fri, Aug 06, 2021 at 10:30:47AM +0800, zhaoxiao wrote:
>> Address the following checkpatch errors:
>> ERROR: do not initialise statics to false
>>
>> FILE: :drivers/gpu/drm/msm/msm_drv.c:21:
>> -static bool reglog = false;
>>
>> FILE: :drivers/gpu/drm/msm/msm_drv.c:31:
>> -bool dumpstate = false;
>>
>> Signed-off-by: zhaoxiao <zhaoxiao@uniontech.com>
> Subject should start out with drm/msm, not drm/drv - that would indicate a
> patch touching the drm_drv.c core files, or things related to that.
> -Daniel
>
>> ---
>> v2: change the patch description
>>   drivers/gpu/drm/msm/msm_drv.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
>> index 9b8fa2ad0d84..d9ca4bc9620b 100644
>> --- a/drivers/gpu/drm/msm/msm_drv.c
>> +++ b/drivers/gpu/drm/msm/msm_drv.c
>> @@ -59,7 +59,7 @@ static const struct drm_mode_config_helper_funcs mode_config_helper_funcs = {
>>   };
>>   
>>   #ifdef CONFIG_DRM_MSM_REGISTER_LOGGING
>> -static bool reglog = false;
>> +static bool reglog;
>>   MODULE_PARM_DESC(reglog, "Enable register read/write logging");
>>   module_param(reglog, bool, 0600);
>>   #else
>> @@ -76,7 +76,7 @@ static char *vram = "16m";
>>   MODULE_PARM_DESC(vram, "Configure VRAM size (for devices without IOMMU/GPUMMU)");
>>   module_param(vram, charp, 0);
>>   
>> -bool dumpstate = false;
>> +bool dumpstate;
>>   MODULE_PARM_DESC(dumpstate, "Dump KMS state on errors");
>>   module_param(dumpstate, bool, 0600);
>>   
>> -- 
>> 2.20.1
>>
>>
>>

[-- Attachment #2: Type: text/html, Size: 2306 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-10 11:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-06  2:30 [PATCH v2] drm/drv: Remove initialization of static variables zhaoxiao
2021-08-10  9:59 ` Daniel Vetter
2021-08-10 11:25   ` zhaoxiao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.