drm/amd/display: Fix old-style declaration
Subsystems (3)
PATCH 1/1 drm/amd/display: Fix old-style declaration
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]
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +1 -1
@@ -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
Signature · 1 line
2.7.4
Quoted 4 lines · 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]
[]
drivers/gpu/drm/amd/display/dc/core/dc.c
Quoted 1 line
drivers/gpu/drm/amd/display/dc/core/dc.c +0
-0
[]
drivers/gpu/drm/amd/display/dc/core/dc.c line 72
Quoted 6 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +1
-1@@ -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(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +1 -3
@@ -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" );
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 12 lines · Joe Perches
Quoted 4 lines · 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][]
drivers/gpu/drm/amd/display/dc/core/dc.c
Quoted 1 line
drivers/gpu/drm/amd/display/dc/core/dc.c +0
-0[]
Quoted 4 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +0
-0@@ -69,7 +69,7 @@#define DC_LOGGER \ dc->ctx->logger
Quoted 5 lines
drivers/gpu/drm/amd/display/dc/core/dc.c line 72
Quoted 2 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +1
-1-const static char DC_BUILD_ID [] ="production-build" ; +static const char DC_BUILD_ID [] ="production-build" ;
DC_BUILD_IDis used exactly once.
Maybe just use it directly and removeDC_BUILD_IDinstead?
commit be61df574256ae8c0dbd45ac148ca7260a0483c0
Author: Jun Lei <[email protected]> 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.
Quoted 32 lines
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/gpu/drm/amd/display/dc/core/dc.c +1
-3@@ -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" );.
Quoted 30 lines · Yuehaibing
Quoted 12 lines · Joe Perches
Quoted 4 lines · 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][]
drivers/gpu/drm/amd/display/dc/core/dc.c
Quoted 1 line
drivers/gpu/drm/amd/display/dc/core/dc.c +0
-0[]
Quoted 4 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +0
-0@@ -69,7 +69,7 @@#define DC_LOGGER \ dc->ctx->loggerQuoted 5 lines
drivers/gpu/drm/amd/display/dc/core/dc.c line 72
Quoted 2 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +1
-1-const static char DC_BUILD_ID [] ="production-build" ; +static const char DC_BUILD_ID [] ="production-build" ;
DC_BUILD_IDis used exactly once.
Maybe just use it directly and removeDC_BUILD_IDinstead?commit
be61df574256ae8c0dbd45ac148ca7260a0483c0Author: Jun Lei <[email protected]> Date: Thu Sep 13 09:32:26 2018 -0400drm/amd/display: Add DC
build_idto 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.
Quoted 6 lines
[how]
dc.cwill 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_IDis used by the build server, so maybe we should keep it.
Thanks, Haibing. Yes, we'll want to keep it for build purposes.
Harry
Quoted 26 lines
Quoted 26 lines
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/gpu/drm/amd/display/dc/core/dc.c +1
-3@@ -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" ;
Quoted 8 lines
Quoted 7 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +0
-0DC_LOG_DC ("Display Core initialized\n" );.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 6 lines · 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 <[email protected]>
Harry
Quoted 18 lines
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/display/dc/core/dc.c +1
-1@@ -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