linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] drm/amd/display: Fix old-style declaration
@ 2019-11-11 12:28 YueHaibing
  2019-11-12  2:39 ` Joe Perches
  2019-11-12 20:18 ` Harry Wentland
  0 siblings, 2 replies; 5+ messages in thread
From: YueHaibing @ 2019-11-11 12:28 UTC (permalink / raw)
  To: harry.wentland, sunpeng.li, alexander.deucher, christian.koenig,
	David1.Zhou, airlied, daniel, Bhawanpreet.Lakha, Jun.Lei,
	David.Francis, Dmytro.Laktyushkin, nicholas.kazlauskas,
	martin.leung, Chris.Park
  Cc: amd-gfx, dri-devel, linux-kernel, YueHaibing

Fix a build warning:

drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:75:1:
 warning: 'static' is not at beginning of declaration [-Wold-style-declaration]

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 1fdba13..0d8c663 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -69,7 +69,7 @@
 #define DC_LOGGER \
 	dc->ctx->logger
 
-const static char DC_BUILD_ID[] = "production-build";
+static const char DC_BUILD_ID[] = "production-build";
 
 /**
  * DOC: Overview
-- 
2.7.4



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

* Re: [PATCH -next] drm/amd/display: Fix old-style declaration
  2019-11-11 12:28 [PATCH -next] drm/amd/display: Fix old-style declaration YueHaibing
@ 2019-11-12  2:39 ` Joe Perches
  2019-11-12  7:51   ` Yuehaibing
  2019-11-12 20:18 ` Harry Wentland
  1 sibling, 1 reply; 5+ messages in thread
From: Joe Perches @ 2019-11-12  2:39 UTC (permalink / raw)
  To: YueHaibing, harry.wentland, sunpeng.li, alexander.deucher,
	christian.koenig, David1.Zhou, airlied, daniel,
	Bhawanpreet.Lakha, Jun.Lei, David.Francis, Dmytro.Laktyushkin,
	nicholas.kazlauskas, martin.leung, Chris.Park
  Cc: amd-gfx, dri-devel, linux-kernel

On Mon, 2019-11-11 at 20:28 +0800, YueHaibing wrote:
> Fix a build warning:
> 
> drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:75:1:
>  warning: 'static' is not at beginning of declaration [-Wold-style-declaration]
[]
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
[]
> @@ -69,7 +69,7 @@
>  #define DC_LOGGER \
>  	dc->ctx->logger
>  
> -const static char DC_BUILD_ID[] = "production-build";
> +static const char DC_BUILD_ID[] = "production-build";

DC_BUILD_ID is used exactly once.
Maybe just use it directly and remove DC_BUILD_ID instead?

---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 1fdba13..803dc14 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -69,8 +69,6 @@
 #define DC_LOGGER \
 	dc->ctx->logger
 
-const static char DC_BUILD_ID[] = "production-build";
-
 /**
  * DOC: Overview
  *
@@ -815,7 +813,7 @@ struct dc *dc_create(const struct dc_init_data *init_params)
 	if (dc->res_pool->dmcu != NULL)
 		dc->versions.dmcu_version = dc->res_pool->dmcu->dmcu_version;
 
-	dc->build_id = DC_BUILD_ID;
+	dc->build_id = "production-build";
 
 	DC_LOG_DC("Display Core initialized\n");
 



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

* Re: [PATCH -next] drm/amd/display: Fix old-style declaration
  2019-11-12  2:39 ` Joe Perches
@ 2019-11-12  7:51   ` Yuehaibing
  2019-11-12 20:19     ` Harry Wentland
  0 siblings, 1 reply; 5+ messages in thread
From: Yuehaibing @ 2019-11-12  7:51 UTC (permalink / raw)
  To: Joe Perches, harry.wentland, sunpeng.li, alexander.deucher,
	christian.koenig, David1.Zhou, airlied, daniel,
	Bhawanpreet.Lakha, Jun.Lei, David.Francis, Dmytro.Laktyushkin,
	nicholas.kazlauskas, martin.leung, Chris.Park
  Cc: amd-gfx, dri-devel, linux-kernel

On 2019/11/12 10:39, Joe Perches wrote:
> On Mon, 2019-11-11 at 20:28 +0800, YueHaibing wrote:
>> Fix a build warning:
>>
>> drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:75:1:
>>  warning: 'static' is not at beginning of declaration [-Wold-style-declaration]
> []
>> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
> []
>> @@ -69,7 +69,7 @@
>>  #define DC_LOGGER \
>>  	dc->ctx->logger
>>  
>> -const static char DC_BUILD_ID[] = "production-build";
>> +static const char DC_BUILD_ID[] = "production-build";
> 
> DC_BUILD_ID is used exactly once.
> Maybe just use it directly and remove DC_BUILD_ID instead?

commit be61df574256ae8c0dbd45ac148ca7260a0483c0
Author: Jun Lei <Jun.Lei@amd.com>
Date:   Thu Sep 13 09:32:26 2018 -0400

    drm/amd/display: Add DC build_id to determine build type

    [why]
    Sometimes there are indications that the incorrect driver is being
    loaded in automated tests. This change adds the ability for builds to
    be tagged with a string, and picked up by the test infrastructure.

    [how]
    dc.c will allocate const for build id, which is init-ed with default
    value, indicating production build. For test builds, build server will
    find/replace this value. The test machine will then verify this value.

It seems DC_BUILD_ID is used by the build server, so maybe we should keep it.

> 
> ---
>  drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
> index 1fdba13..803dc14 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
> @@ -69,8 +69,6 @@
>  #define DC_LOGGER \
>  	dc->ctx->logger
>  
> -const static char DC_BUILD_ID[] = "production-build";
> -
>  /**
>   * DOC: Overview
>   *
> @@ -815,7 +813,7 @@ struct dc *dc_create(const struct dc_init_data *init_params)
>  	if (dc->res_pool->dmcu != NULL)
>  		dc->versions.dmcu_version = dc->res_pool->dmcu->dmcu_version;
>  
> -	dc->build_id = DC_BUILD_ID;
> +	dc->build_id = "production-build";
>  
>  	DC_LOG_DC("Display Core initialized\n");
>  
> 
> 
> 
> .
> 


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

* Re: [PATCH -next] drm/amd/display: Fix old-style declaration
  2019-11-11 12:28 [PATCH -next] drm/amd/display: Fix old-style declaration YueHaibing
  2019-11-12  2:39 ` Joe Perches
@ 2019-11-12 20:18 ` Harry Wentland
  1 sibling, 0 replies; 5+ messages in thread
From: Harry Wentland @ 2019-11-12 20:18 UTC (permalink / raw)
  To: YueHaibing, harry.wentland, sunpeng.li, alexander.deucher,
	christian.koenig, David1.Zhou, airlied, daniel,
	Bhawanpreet.Lakha, Jun.Lei, David.Francis, Dmytro.Laktyushkin,
	nicholas.kazlauskas, martin.leung, Chris.Park
  Cc: amd-gfx, dri-devel, linux-kernel

On 2019-11-11 7:28 a.m., YueHaibing wrote:
> Fix a build warning:
> 
> drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:75:1:
>  warning: 'static' is not at beginning of declaration [-Wold-style-declaration]
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Reviewed-by: Harry Wentland <harry.wentland@amd.com>

Harry

> ---
>  drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
> index 1fdba13..0d8c663 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
> @@ -69,7 +69,7 @@
>  #define DC_LOGGER \
>  	dc->ctx->logger
>  
> -const static char DC_BUILD_ID[] = "production-build";
> +static const char DC_BUILD_ID[] = "production-build";
>  
>  /**
>   * DOC: Overview
> 

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

* Re: [PATCH -next] drm/amd/display: Fix old-style declaration
  2019-11-12  7:51   ` Yuehaibing
@ 2019-11-12 20:19     ` Harry Wentland
  0 siblings, 0 replies; 5+ messages in thread
From: Harry Wentland @ 2019-11-12 20:19 UTC (permalink / raw)
  To: Yuehaibing, Joe Perches, harry.wentland, sunpeng.li,
	alexander.deucher, christian.koenig, David1.Zhou, airlied,
	daniel, Bhawanpreet.Lakha, Jun.Lei, David.Francis,
	Dmytro.Laktyushkin, nicholas.kazlauskas, martin.leung,
	Chris.Park
  Cc: amd-gfx, dri-devel, linux-kernel

On 2019-11-12 2:51 a.m., Yuehaibing wrote:
> On 2019/11/12 10:39, Joe Perches wrote:
>> On Mon, 2019-11-11 at 20:28 +0800, YueHaibing wrote:
>>> Fix a build warning:
>>>
>>> drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:75:1:
>>>  warning: 'static' is not at beginning of declaration [-Wold-style-declaration]
>> []
>>> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
>> []
>>> @@ -69,7 +69,7 @@
>>>  #define DC_LOGGER \
>>>  	dc->ctx->logger
>>>  
>>> -const static char DC_BUILD_ID[] = "production-build";
>>> +static const char DC_BUILD_ID[] = "production-build";
>>
>> DC_BUILD_ID is used exactly once.
>> Maybe just use it directly and remove DC_BUILD_ID instead?
> 
> commit be61df574256ae8c0dbd45ac148ca7260a0483c0
> Author: Jun Lei <Jun.Lei@amd.com>
> Date:   Thu Sep 13 09:32:26 2018 -0400
> 
>     drm/amd/display: Add DC build_id to determine build type
> 
>     [why]
>     Sometimes there are indications that the incorrect driver is being
>     loaded in automated tests. This change adds the ability for builds to
>     be tagged with a string, and picked up by the test infrastructure.
> 
>     [how]
>     dc.c will allocate const for build id, which is init-ed with default
>     value, indicating production build. For test builds, build server will
>     find/replace this value. The test machine will then verify this value.
> 
> It seems DC_BUILD_ID is used by the build server, so maybe we should keep it.

Thanks, Haibing. Yes, we'll want to keep it for build purposes.

Harry

> 
>>
>> ---
>>  drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +---
>>  1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
>> index 1fdba13..803dc14 100644
>> --- a/drivers/gpu/drm/amd/display/dc/core/dc.c
>> +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
>> @@ -69,8 +69,6 @@
>>  #define DC_LOGGER \
>>  	dc->ctx->logger
>>  
>> -const static char DC_BUILD_ID[] = "production-build";
>> -
>>  /**
>>   * DOC: Overview
>>   *
>> @@ -815,7 +813,7 @@ struct dc *dc_create(const struct dc_init_data *init_params)
>>  	if (dc->res_pool->dmcu != NULL)
>>  		dc->versions.dmcu_version = dc->res_pool->dmcu->dmcu_version;
>>  
>> -	dc->build_id = DC_BUILD_ID;
>> +	dc->build_id = "production-build";
>>  
>>  	DC_LOG_DC("Display Core initialized\n");
>>  
>>
>>
>>
>> .
>>
> 

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

end of thread, other threads:[~2019-11-12 20:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-11 12:28 [PATCH -next] drm/amd/display: Fix old-style declaration YueHaibing
2019-11-12  2:39 ` Joe Perches
2019-11-12  7:51   ` Yuehaibing
2019-11-12 20:19     ` Harry Wentland
2019-11-12 20:18 ` Harry Wentland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).