* [PATCH] drm/amd/display: hide an unused variable
@ 2019-09-18 19:53 Arnd Bergmann
2019-09-19 13:45 ` Harry Wentland
0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2019-09-18 19:53 UTC (permalink / raw)
To: Harry Wentland, Leo Li, Alex Deucher, Christian König,
David (ChunMing) Zhou, David Airlie, Daniel Vetter
Cc: Arnd Bergmann, Dingchen Zhang, Harry Wentland,
Nicholas Kazlauskas, David Francis, Mario Kleiner, amd-gfx,
dri-devel, linux-kernel
Without CONFIG_DEBUG_FS, we get a warning for an unused
variable:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6020:33: error: unused variable 'source' [-Werror,-Wunused-variable]
Hide the variable in an #ifdef like its only users.
Fixes: 14b2584636c6 ("drm/amd/display: add functionality to grab DPRX CRC entries.")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index e1b09bb432bd..74252f57bafb 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -6017,7 +6017,9 @@ static void amdgpu_dm_enable_crtc_interrupts(struct drm_device *dev,
struct drm_crtc *crtc;
struct drm_crtc_state *old_crtc_state, *new_crtc_state;
int i;
+#ifdef CONFIG_DEBUG_FS
enum amdgpu_dm_pipe_crc_source source;
+#endif
for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state,
new_crtc_state, i) {
--
2.20.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amd/display: hide an unused variable
2019-09-18 19:53 [PATCH] drm/amd/display: hide an unused variable Arnd Bergmann
@ 2019-09-19 13:45 ` Harry Wentland
2019-09-19 16:49 ` Alex Deucher
0 siblings, 1 reply; 3+ messages in thread
From: Harry Wentland @ 2019-09-19 13:45 UTC (permalink / raw)
To: Arnd Bergmann, Wentland, Harry, Li, Sun peng (Leo),
Deucher, Alexander, Koenig, Christian, Zhou, David(ChunMing),
David Airlie, Daniel Vetter
Cc: Zhang, Dingchen (David),
Kazlauskas, Nicholas, Francis, David, Mario Kleiner, amd-gfx,
dri-devel, linux-kernel
On 2019-09-18 3:53 p.m., Arnd Bergmann wrote:
> Without CONFIG_DEBUG_FS, we get a warning for an unused
> variable:
>
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6020:33: error: unused variable 'source' [-Werror,-Wunused-variable]
>
> Hide the variable in an #ifdef like its only users.
>
> Fixes: 14b2584636c6 ("drm/amd/display: add functionality to grab DPRX CRC entries.")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Harry
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index e1b09bb432bd..74252f57bafb 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -6017,7 +6017,9 @@ static void amdgpu_dm_enable_crtc_interrupts(struct drm_device *dev,
> struct drm_crtc *crtc;
> struct drm_crtc_state *old_crtc_state, *new_crtc_state;
> int i;
> +#ifdef CONFIG_DEBUG_FS
> enum amdgpu_dm_pipe_crc_source source;
> +#endif
>
> for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state,
> new_crtc_state, i) {
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amd/display: hide an unused variable
2019-09-19 13:45 ` Harry Wentland
@ 2019-09-19 16:49 ` Alex Deucher
0 siblings, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2019-09-19 16:49 UTC (permalink / raw)
To: Harry Wentland
Cc: Arnd Bergmann, Wentland, Harry, Li, Sun peng (Leo),
Deucher, Alexander, Koenig, Christian, Zhou, David(ChunMing),
David Airlie, Daniel Vetter, Mario Kleiner, Zhang,
Dingchen (David),
Francis, David, linux-kernel, dri-devel, amd-gfx, Kazlauskas,
Nicholas
On Thu, Sep 19, 2019 at 9:45 AM Harry Wentland <hwentlan@amd.com> wrote:
>
> On 2019-09-18 3:53 p.m., Arnd Bergmann wrote:
> > Without CONFIG_DEBUG_FS, we get a warning for an unused
> > variable:
> >
> > drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6020:33: error: unused variable 'source' [-Werror,-Wunused-variable]
> >
> > Hide the variable in an #ifdef like its only users.
> >
> > Fixes: 14b2584636c6 ("drm/amd/display: add functionality to grab DPRX CRC entries.")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
>
Applied. thanks!
Alex
> Harry
>
> > ---
> > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > index e1b09bb432bd..74252f57bafb 100644
> > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > @@ -6017,7 +6017,9 @@ static void amdgpu_dm_enable_crtc_interrupts(struct drm_device *dev,
> > struct drm_crtc *crtc;
> > struct drm_crtc_state *old_crtc_state, *new_crtc_state;
> > int i;
> > +#ifdef CONFIG_DEBUG_FS
> > enum amdgpu_dm_pipe_crc_source source;
> > +#endif
> >
> > for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state,
> > new_crtc_state, i) {
> >
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-09-19 16:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-18 19:53 [PATCH] drm/amd/display: hide an unused variable Arnd Bergmann
2019-09-19 13:45 ` Harry Wentland
2019-09-19 16:49 ` 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).