Re: [PATCH 02/40] drm/amd/display/dc/core/dc_link_dp: Move DP_VGA_LVDS_CONVERTER_ID_{2, 3} to where they're used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 13 Nov 2020, Alex Deucher wrote:

> On Fri, Nov 13, 2020 at 8:49 AM Lee Jones <lee.jones@xxxxxxxxxx> wrote:
> >
> > This patch fixes >200 warnings.
> >
> > Fixes the following W=1 kernel build warning(s):
> >
> >  drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:123:22: warning: ‘DP_VGA_LVDS_CONVERTER_ID_3’ defined but not used [-Wunused-const-variable=]
> >  123 | static const uint8_t DP_VGA_LVDS_CONVERTER_ID_3[] = "dnomlA";
> >  | ^~~~~~~~~~~~~~~~~~~~~~~~~~
> >  drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:121:22: warning: ‘DP_VGA_LVDS_CONVERTER_ID_2’ defined but not used [-Wunused-const-variable=]
> >  121 | static const uint8_t DP_VGA_LVDS_CONVERTER_ID_2[] = "sivarT";
> >
> > NB: Repeated ~100 times - snipped for brevity
> >
> > Cc: Harry Wentland <harry.wentland@xxxxxxx>
> > Cc: Leo Li <sunpeng.li@xxxxxxx>
> > Cc: Alex Deucher <alexander.deucher@xxxxxxx>
> > Cc: "Christian König" <christian.koenig@xxxxxxx>
> > Cc: David Airlie <airlied@xxxxxxxx>
> > Cc: Daniel Vetter <daniel@xxxxxxxx>
> > Cc: amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> > Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
> > Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx>
> > ---
> >  drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c        | 5 +++++
> >  drivers/gpu/drm/amd/display/include/ddc_service_types.h | 4 ----
> >  2 files changed, 5 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> > index 6c60c1fdebdc1..f2023d2b53234 100644
> > --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> > +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> > @@ -15,6 +15,11 @@
> >  #include "dc_dmub_srv.h"
> >  #include "dce/dmub_hw_lock_mgr.h"
> >
> > +/*Travis*/
> > +static const uint8_t DP_VGA_LVDS_CONVERTER_ID_2[] = "sivarT";
> > +/*Nutmeg*/
> > +static const uint8_t DP_VGA_LVDS_CONVERTER_ID_3[] = "dnomlA";
> > +
> >  #define DC_LOGGER \
> >         link->ctx->logger
> >  #define DC_TRACE_LEVEL_MESSAGE(...) /* do nothing */
> > diff --git a/drivers/gpu/drm/amd/display/include/ddc_service_types.h b/drivers/gpu/drm/amd/display/include/ddc_service_types.h
> > index c9be899cd25cd..b453ce5a9bfdb 100644
> > --- a/drivers/gpu/drm/amd/display/include/ddc_service_types.h
> > +++ b/drivers/gpu/drm/amd/display/include/ddc_service_types.h
> > @@ -117,10 +117,6 @@ struct av_sync_data {
> >         uint8_t aud_del_ins3;/* DPCD 0002Dh */
> >  };
> >
> > -/*Travis*/
> > -static const uint8_t DP_VGA_LVDS_CONVERTER_ID_2[] = "sivarT";
> > -/*Nutmeg*/
> > -static const uint8_t DP_VGA_LVDS_CONVERTER_ID_3[] = "dnomlA";
> >  /*DP to Dual link DVI converter*/
> >  static const uint8_t DP_DVI_CONVERTER_ID_4[] = "m2DVIa";
> >  static const uint8_t DP_DVI_CONVERTER_ID_5[] = "3393N2";
> 
> Can we keep all of these strings together?

I don't think so.  They are consumed by different files.

Oh, one way to do it would be to mark them as __maybe_unused, but
I only tend to do that a last resort.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux