From: Wambui Karuga <wambui.karugax@gmail.com>
To: Harry Wentland <hwentlan@amd.com>
Cc: airlied@linux.ie, linux-kernel@vger.kernel.org,
amd-gfx@lists.freedesktop.org, outreachy-kernel@googlegroups.com,
Alexander.Deucher@amd.com, Christian.Koenig@amd.com
Subject: Re: [PATCH] drm/amd/amdgpu: make undeclared variables static
Date: Fri, 25 Oct 2019 06:37:58 +0300 [thread overview]
Message-ID: <20191025033758.GA3201@wambui> (raw)
In-Reply-To: <0f3fa30e-0392-054b-a81e-b9cb4475fe07@amd.com>
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;
> >
WARNING: multiple messages have this Message-ID (diff)
From: Wambui Karuga <wambui.karugax@gmail.com>
To: Harry Wentland <hwentlan@amd.com>
Cc: airlied@linux.ie, linux-kernel@vger.kernel.org,
amd-gfx@lists.freedesktop.org, outreachy-kernel@googlegroups.com,
Alexander.Deucher@amd.com, Christian.Koenig@amd.com
Subject: Re: [PATCH] drm/amd/amdgpu: make undeclared variables static
Date: Fri, 25 Oct 2019 06:37:58 +0300 [thread overview]
Message-ID: <20191025033758.GA3201@wambui> (raw)
Message-ID: <20191025033758.PWXYlRvggHK12NJZq58IO_FjxS8YwVI8O18T7dWmb2o@z> (raw)
In-Reply-To: <0f3fa30e-0392-054b-a81e-b9cb4475fe07@amd.com>
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
next prev parent reply other threads:[~2019-10-25 3:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2019-10-25 3:37 ` Wambui Karuga
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=20191025033758.GA3201@wambui \
--to=wambui.karugax@gmail.com \
--cc=0f3fa30e-0392-054b-a81e-b9cb4475fe07@amd.com \
--cc=Alexander.Deucher@amd.com \
--cc=Christian.Koenig@amd.com \
--cc=airlied@linux.ie \
--cc=amd-gfx@lists.freedesktop.org \
--cc=hwentlan@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=outreachy-kernel@googlegroups.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 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.