* [PATCH] drm/amd/amdgpu: make undeclared variables static
@ 2019-10-19 7:24 Wambui Karuga
2019-10-23 15:09 ` Harry Wentland
0 siblings, 1 reply; 6+ messages in thread
From: Wambui Karuga @ 2019-10-19 7:24 UTC (permalink / raw)
To: dri-devel
Cc: linux-kernel, alexander.deucher, christian.koenig, David1.Zhou,
airlied, daniel, amd-gfx, outreachy-kernel
Make the `amdgpu_lockup_timeout` and `amdgpu_exp_hw_support` variables
static to remove the following sparse warnings:
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:103:19: warning: symbol 'amdgpu_lockup_timeout' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:117:18: warning: symbol 'amdgpu_exp_hw_support' was not declared. Should it be static?
Signed-off-by: Wambui Karuga <wambui@karuga.xyz>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index 3fae1007143e..c5b3c0c9193b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -100,7 +100,7 @@ int amdgpu_disp_priority = 0;
int amdgpu_hw_i2c = 0;
int amdgpu_pcie_gen2 = -1;
int amdgpu_msi = -1;
-char amdgpu_lockup_timeout[AMDGPU_MAX_TIMEOUT_PARAM_LENTH];
+static char amdgpu_lockup_timeout[AMDGPU_MAX_TIMEOUT_PARAM_LENTH];
int amdgpu_dpm = -1;
int amdgpu_fw_load_type = -1;
int amdgpu_aspm = -1;
@@ -114,7 +114,7 @@ int amdgpu_vm_block_size = -1;
int amdgpu_vm_fault_stop = 0;
int amdgpu_vm_debug = 0;
int amdgpu_vm_update_mode = -1;
-int amdgpu_exp_hw_support = 0;
+static int amdgpu_exp_hw_support;
int amdgpu_dc = -1;
int amdgpu_sched_jobs = 32;
int amdgpu_sched_hw_submission = 2;
--
2.23.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amd/amdgpu: make undeclared variables static
@ 2019-10-23 15:09 ` Harry Wentland
0 siblings, 0 replies; 6+ messages in thread
From: Harry Wentland @ 2019-10-23 15:09 UTC (permalink / raw)
To: Wambui Karuga, dri-devel@lists.freedesktop.org
Cc: airlied@linux.ie, linux-kernel@vger.kernel.org,
amd-gfx@lists.freedesktop.org, outreachy-kernel@googlegroups.com,
Deucher, Alexander, Koenig, Christian
On 2019-10-19 3:24 a.m., Wambui Karuga wrote:
> Make the `amdgpu_lockup_timeout` and `amdgpu_exp_hw_support` variables
> static to remove the following sparse warnings:
> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:103:19: warning: symbol 'amdgpu_lockup_timeout' was not declared. Should it be static?
This should be declared in amdgpu.h. amdgpu is maintained on the
amd-staging-drm-next branch from
https://cgit.freedesktop.org/~agd5f/linux/?h=amd-staging-drm-next. Can
you check there?
> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:117:18: warning: symbol 'amdgpu_exp_hw_support' was not declared. Should it be static?
>
> Signed-off-by: Wambui Karuga <wambui@karuga.xyz>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index 3fae1007143e..c5b3c0c9193b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -100,7 +100,7 @@ int amdgpu_disp_priority = 0;
> int amdgpu_hw_i2c = 0;
> int amdgpu_pcie_gen2 = -1;
> int amdgpu_msi = -1;
> -char amdgpu_lockup_timeout[AMDGPU_MAX_TIMEOUT_PARAM_LENTH];
> +static char amdgpu_lockup_timeout[AMDGPU_MAX_TIMEOUT_PARAM_LENTH];
> int amdgpu_dpm = -1;
> int amdgpu_fw_load_type = -1;
> int amdgpu_aspm = -1;
> @@ -114,7 +114,7 @@ int amdgpu_vm_block_size = -1;
> int amdgpu_vm_fault_stop = 0;
> int amdgpu_vm_debug = 0;
> int amdgpu_vm_update_mode = -1;
> -int amdgpu_exp_hw_support = 0;
> +static int amdgpu_exp_hw_support;
This is indeed only used in this file but for consistency's sake it's
probably better to also declare it in amdgpu.h rather than make it
static here.
Harry
> int amdgpu_dc = -1;
> int amdgpu_sched_jobs = 32;
> int amdgpu_sched_hw_submission = 2;
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amd/amdgpu: make undeclared variables static
@ 2019-10-23 15:09 ` Harry Wentland
0 siblings, 0 replies; 6+ messages in thread
From: Harry Wentland @ 2019-10-23 15:09 UTC (permalink / raw)
To: Wambui Karuga, dri-devel@lists.freedesktop.org
Cc: airlied@linux.ie, linux-kernel@vger.kernel.org,
amd-gfx@lists.freedesktop.org, outreachy-kernel@googlegroups.com,
Deucher, Alexander, Koenig, Christian
On 2019-10-19 3:24 a.m., Wambui Karuga wrote:
> Make the `amdgpu_lockup_timeout` and `amdgpu_exp_hw_support` variables
> static to remove the following sparse warnings:
> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:103:19: warning: symbol 'amdgpu_lockup_timeout' was not declared. Should it be static?
This should be declared in amdgpu.h. amdgpu is maintained on the
amd-staging-drm-next branch from
https://cgit.freedesktop.org/~agd5f/linux/?h=amd-staging-drm-next. Can
you check there?
> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:117:18: warning: symbol 'amdgpu_exp_hw_support' was not declared. Should it be static?
>
> Signed-off-by: Wambui Karuga <wambui@karuga.xyz>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index 3fae1007143e..c5b3c0c9193b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -100,7 +100,7 @@ int amdgpu_disp_priority = 0;
> int amdgpu_hw_i2c = 0;
> int amdgpu_pcie_gen2 = -1;
> int amdgpu_msi = -1;
> -char amdgpu_lockup_timeout[AMDGPU_MAX_TIMEOUT_PARAM_LENTH];
> +static char amdgpu_lockup_timeout[AMDGPU_MAX_TIMEOUT_PARAM_LENTH];
> int amdgpu_dpm = -1;
> int amdgpu_fw_load_type = -1;
> int amdgpu_aspm = -1;
> @@ -114,7 +114,7 @@ int amdgpu_vm_block_size = -1;
> int amdgpu_vm_fault_stop = 0;
> int amdgpu_vm_debug = 0;
> int amdgpu_vm_update_mode = -1;
> -int amdgpu_exp_hw_support = 0;
> +static int amdgpu_exp_hw_support;
This is indeed only used in this file but for consistency's sake it's
probably better to also declare it in amdgpu.h rather than make it
static here.
Harry
> int amdgpu_dc = -1;
> int amdgpu_sched_jobs = 32;
> int amdgpu_sched_hw_submission = 2;
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amd/amdgpu: make undeclared variables static
@ 2019-10-23 15:09 ` Harry Wentland
0 siblings, 0 replies; 6+ messages in thread
From: Harry Wentland @ 2019-10-23 15:09 UTC (permalink / raw)
To: Wambui Karuga, dri-devel@lists.freedesktop.org
Cc: airlied@linux.ie, linux-kernel@vger.kernel.org,
amd-gfx@lists.freedesktop.org, outreachy-kernel@googlegroups.com,
Deucher, Alexander, Koenig, Christian
On 2019-10-19 3:24 a.m., Wambui Karuga wrote:
> Make the `amdgpu_lockup_timeout` and `amdgpu_exp_hw_support` variables
> static to remove the following sparse warnings:
> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:103:19: warning: symbol 'amdgpu_lockup_timeout' was not declared. Should it be static?
This should be declared in amdgpu.h. amdgpu is maintained on the
amd-staging-drm-next branch from
https://cgit.freedesktop.org/~agd5f/linux/?h=amd-staging-drm-next. Can
you check there?
> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:117:18: warning: symbol 'amdgpu_exp_hw_support' was not declared. Should it be static?
>
> Signed-off-by: Wambui Karuga <wambui@karuga.xyz>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index 3fae1007143e..c5b3c0c9193b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -100,7 +100,7 @@ int amdgpu_disp_priority = 0;
> int amdgpu_hw_i2c = 0;
> int amdgpu_pcie_gen2 = -1;
> int amdgpu_msi = -1;
> -char amdgpu_lockup_timeout[AMDGPU_MAX_TIMEOUT_PARAM_LENTH];
> +static char amdgpu_lockup_timeout[AMDGPU_MAX_TIMEOUT_PARAM_LENTH];
> int amdgpu_dpm = -1;
> int amdgpu_fw_load_type = -1;
> int amdgpu_aspm = -1;
> @@ -114,7 +114,7 @@ int amdgpu_vm_block_size = -1;
> int amdgpu_vm_fault_stop = 0;
> int amdgpu_vm_debug = 0;
> int amdgpu_vm_update_mode = -1;
> -int amdgpu_exp_hw_support = 0;
> +static int amdgpu_exp_hw_support;
This is indeed only used in this file but for consistency's sake it's
probably better to also declare it in amdgpu.h rather than make it
static here.
Harry
> int amdgpu_dc = -1;
> int amdgpu_sched_jobs = 32;
> int amdgpu_sched_hw_submission = 2;
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amd/amdgpu: make undeclared variables static
@ 2019-10-25 3:37 ` Wambui Karuga
0 siblings, 0 replies; 6+ messages in thread
From: Wambui Karuga @ 2019-10-25 3:37 UTC (permalink / raw)
To: Harry Wentland
Cc: airlied, linux-kernel, amd-gfx, outreachy-kernel,
Alexander.Deucher, Christian.Koenig
On Wed, Oct 23, 2019 at 03:09:34PM +0000, Harry Wentland wrote:
> On 2019-10-19 3:24 a.m., Wambui Karuga wrote:
> > Make the `amdgpu_lockup_timeout` and `amdgpu_exp_hw_support` variables
> > static to remove the following sparse warnings:
> > drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:103:19: warning: symbol 'amdgpu_lockup_timeout' was not declared. Should it be static?
>
> This should be declared in amdgpu.h. amdgpu is maintained on the
> amd-staging-drm-next branch from
> https://cgit.freedesktop.org/~agd5f/linux/?h=amd-staging-drm-next. Can
> you check there?
>
Hey Harry,
I checked the amd-staging-drm-next branch, and 'amdgpu_lockup_timeout'
is already declared as extern in amdgpu.h, so sparse only warns about
'amdgpu_exp_hw_support'.
I'll do the same for 'amdgpu_exp_hw_support' and send an update patch
series for this and the "_LENTH" mispelling.
Thanks,
wambui karuga
> > drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:117:18: warning: symbol 'amdgpu_exp_hw_support' was not declared. Should it be static?
> >
> > Signed-off-by: Wambui Karuga <wambui@karuga.xyz>
> > ---
> > drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> > index 3fae1007143e..c5b3c0c9193b 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> > @@ -100,7 +100,7 @@ int amdgpu_disp_priority = 0;
> > int amdgpu_hw_i2c = 0;
> > int amdgpu_pcie_gen2 = -1;
> > int amdgpu_msi = -1;
> > -char amdgpu_lockup_timeout[AMDGPU_MAX_TIMEOUT_PARAM_LENTH];
> > +static char amdgpu_lockup_timeout[AMDGPU_MAX_TIMEOUT_PARAM_LENTH];
> > int amdgpu_dpm = -1;
> > int amdgpu_fw_load_type = -1;
> > int amdgpu_aspm = -1;
> > @@ -114,7 +114,7 @@ int amdgpu_vm_block_size = -1;
> > int amdgpu_vm_fault_stop = 0;
> > int amdgpu_vm_debug = 0;
> > int amdgpu_vm_update_mode = -1;
> > -int amdgpu_exp_hw_support = 0;
> > +static int amdgpu_exp_hw_support;
>
> This is indeed only used in this file but for consistency's sake it's
> probably better to also declare it in amdgpu.h rather than make it
> static here.
>
> Harry
>
> > int amdgpu_dc = -1;
> > int amdgpu_sched_jobs = 32;
> > int amdgpu_sched_hw_submission = 2;
> >
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amd/amdgpu: make undeclared variables static
@ 2019-10-25 3:37 ` Wambui Karuga
0 siblings, 0 replies; 6+ messages in thread
From: Wambui Karuga @ 2019-10-25 3:37 UTC (permalink / raw)
To: Harry Wentland
Cc: airlied, linux-kernel, amd-gfx, outreachy-kernel,
Alexander.Deucher, Christian.Koenig
On Wed, Oct 23, 2019 at 03:09:34PM +0000, Harry Wentland wrote:
> On 2019-10-19 3:24 a.m., Wambui Karuga wrote:
> > Make the `amdgpu_lockup_timeout` and `amdgpu_exp_hw_support` variables
> > static to remove the following sparse warnings:
> > drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:103:19: warning: symbol 'amdgpu_lockup_timeout' was not declared. Should it be static?
>
> This should be declared in amdgpu.h. amdgpu is maintained on the
> amd-staging-drm-next branch from
> https://cgit.freedesktop.org/~agd5f/linux/?h=amd-staging-drm-next. Can
> you check there?
>
Hey Harry,
I checked the amd-staging-drm-next branch, and 'amdgpu_lockup_timeout'
is already declared as extern in amdgpu.h, so sparse only warns about
'amdgpu_exp_hw_support'.
I'll do the same for 'amdgpu_exp_hw_support' and send an update patch
series for this and the "_LENTH" mispelling.
Thanks,
wambui karuga
> > drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:117:18: warning: symbol 'amdgpu_exp_hw_support' was not declared. Should it be static?
> >
> > Signed-off-by: Wambui Karuga <wambui@karuga.xyz>
> > ---
> > drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> > index 3fae1007143e..c5b3c0c9193b 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> > @@ -100,7 +100,7 @@ int amdgpu_disp_priority = 0;
> > int amdgpu_hw_i2c = 0;
> > int amdgpu_pcie_gen2 = -1;
> > int amdgpu_msi = -1;
> > -char amdgpu_lockup_timeout[AMDGPU_MAX_TIMEOUT_PARAM_LENTH];
> > +static char amdgpu_lockup_timeout[AMDGPU_MAX_TIMEOUT_PARAM_LENTH];
> > int amdgpu_dpm = -1;
> > int amdgpu_fw_load_type = -1;
> > int amdgpu_aspm = -1;
> > @@ -114,7 +114,7 @@ int amdgpu_vm_block_size = -1;
> > int amdgpu_vm_fault_stop = 0;
> > int amdgpu_vm_debug = 0;
> > int amdgpu_vm_update_mode = -1;
> > -int amdgpu_exp_hw_support = 0;
> > +static int amdgpu_exp_hw_support;
>
> This is indeed only used in this file but for consistency's sake it's
> probably better to also declare it in amdgpu.h rather than make it
> static here.
>
> Harry
>
> > int amdgpu_dc = -1;
> > int amdgpu_sched_jobs = 32;
> > int amdgpu_sched_hw_submission = 2;
> >
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-10-25 8:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-19 7:24 [PATCH] drm/amd/amdgpu: make undeclared variables static Wambui Karuga
2019-10-23 15:09 ` Harry Wentland
2019-10-23 15:09 ` Harry Wentland
2019-10-23 15:09 ` Harry Wentland
2019-10-25 3:37 ` Wambui Karuga
2019-10-25 3:37 ` Wambui Karuga
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.