* [PATCH][drm-next] drm/amdgpu: make arrays pctl0_data and pctl1_data static
@ 2017-07-06 9:58 Colin King
2017-07-06 14:16 ` Alex Deucher
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-07-06 9:58 UTC (permalink / raw)
To: Alex Deucher, Christian König, David Airlie, Huang Rui,
Hawking Zhang, Jerry.Zhang, Alex Xie, amd-gfx, dri-devel
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The arrays pctl0_data and pctl1_data do not need to be in global scope,
so them both static.
Cleans up sparse warnings:
symbol 'pctl0_data' was not declared. Should it be static?
symbol 'pctl1_data' was not declared. Should it be static?
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c
index 9804318f3488..4c079207d699 100644
--- a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c
@@ -249,7 +249,7 @@ struct pctl_data {
uint32_t data;
};
-const struct pctl_data pctl0_data[] = {
+static const struct pctl_data pctl0_data[] = {
{0x0, 0x7a640},
{0x9, 0x2a64a},
{0xd, 0x2a680},
@@ -274,7 +274,7 @@ const struct pctl_data pctl0_data[] = {
#define PCTL0_STCTRL_REG_SAVE_RANGE0_BASE 0xa640
#define PCTL0_STCTRL_REG_SAVE_RANGE0_LIMIT 0xa833
-const struct pctl_data pctl1_data[] = {
+static const struct pctl_data pctl1_data[] = {
{0x0, 0x39a000},
{0x3b, 0x44a040},
{0x81, 0x2a08d},
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][drm-next] drm/amdgpu: make arrays pctl0_data and pctl1_data static
2017-07-06 9:58 [PATCH][drm-next] drm/amdgpu: make arrays pctl0_data and pctl1_data static Colin King
@ 2017-07-06 14:16 ` Alex Deucher
0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2017-07-06 14:16 UTC (permalink / raw)
To: Colin King
Cc: Alex Deucher, Christian König, David Airlie, Huang Rui,
Hawking Zhang, Junwei Zhang, Alex Xie, amd-gfx list,
Maling list - DRI developers, kernel-janitors, LKML
On Thu, Jul 6, 2017 at 5:58 AM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The arrays pctl0_data and pctl1_data do not need to be in global scope,
> so them both static.
>
> Cleans up sparse warnings:
> symbol 'pctl0_data' was not declared. Should it be static?
> symbol 'pctl1_data' was not declared. Should it be static?
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Applied. thanks!
Alex
> ---
> drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c
> index 9804318f3488..4c079207d699 100644
> --- a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c
> @@ -249,7 +249,7 @@ struct pctl_data {
> uint32_t data;
> };
>
> -const struct pctl_data pctl0_data[] = {
> +static const struct pctl_data pctl0_data[] = {
> {0x0, 0x7a640},
> {0x9, 0x2a64a},
> {0xd, 0x2a680},
> @@ -274,7 +274,7 @@ const struct pctl_data pctl0_data[] = {
> #define PCTL0_STCTRL_REG_SAVE_RANGE0_BASE 0xa640
> #define PCTL0_STCTRL_REG_SAVE_RANGE0_LIMIT 0xa833
>
> -const struct pctl_data pctl1_data[] = {
> +static const struct pctl_data pctl1_data[] = {
> {0x0, 0x39a000},
> {0x3b, 0x44a040},
> {0x81, 0x2a08d},
> --
> 2.11.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-06 14:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-06 9:58 [PATCH][drm-next] drm/amdgpu: make arrays pctl0_data and pctl1_data static Colin King
2017-07-06 14:16 ` Alex Deucher
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).