From: Joe Perches <joe@perches.com>
To: YueHaibing <yuehaibing@huawei.com>,
harry.wentland@amd.com, sunpeng.li@amd.com,
alexander.deucher@amd.com, christian.koenig@amd.com,
David1.Zhou@amd.com, airlied@linux.ie, daniel@ffwll.ch,
Bhawanpreet.Lakha@amd.com, Jun.Lei@amd.com,
David.Francis@amd.com, Dmytro.Laktyushkin@amd.com,
nicholas.kazlauskas@amd.com, martin.leung@amd.com,
Chris.Park@amd.com
Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] drm/amd/display: Fix old-style declaration
Date: Mon, 11 Nov 2019 18:39:15 -0800 [thread overview]
Message-ID: <01c630e6d4c58b3f6184603e158f53fb9aaeae7d.camel@perches.com> (raw)
In-Reply-To: <20191111122801.18584-1-yuehaibing@huawei.com>
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");
next prev parent reply other threads:[~2019-11-12 2:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-11 12:28 YueHaibing
2019-11-12 2:39 ` Joe Perches [this message]
2019-11-12 7:51 ` Yuehaibing
2019-11-12 20:19 ` Harry Wentland
2019-11-12 20:18 ` Harry Wentland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=01c630e6d4c58b3f6184603e158f53fb9aaeae7d.camel@perches.com \
--to=joe@perches.com \
--cc=Bhawanpreet.Lakha@amd.com \
--cc=Chris.Park@amd.com \
--cc=David.Francis@amd.com \
--cc=David1.Zhou@amd.com \
--cc=Dmytro.Laktyushkin@amd.com \
--cc=Jun.Lei@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.leung@amd.com \
--cc=nicholas.kazlauskas@amd.com \
--cc=sunpeng.li@amd.com \
--cc=yuehaibing@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®