Message ID | 20190109211414.15622-1-radhakrishna.sripada@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915: Fix the static code analysis warning in debugfs | expand |
On Wed, Jan 09, 2019 at 01:14:14PM -0800, Radhakrishna Sripada wrote: > intel_dp->dsc_dpcd is defined as an array making the if check redundant. > Yes I agree, I guess when I added that if check it was anot an array to begin with and then forgot to take it off. Looks good to me. Reviewed-by: Manasi Navare <manasi.d.navare@intel.com> Manasi > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> > Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com> > --- > drivers/gpu/drm/i915/i915_debugfs.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c > index 95813e21ae02..908e41f9cb7d 100644 > --- a/drivers/gpu/drm/i915/i915_debugfs.c > +++ b/drivers/gpu/drm/i915/i915_debugfs.c > @@ -4958,9 +4958,8 @@ static int i915_dsc_fec_support_show(struct seq_file *m, void *data) > crtc_state = to_intel_crtc_state(crtc->state); > seq_printf(m, "DSC_Enabled: %s\n", > yesno(crtc_state->dsc_params.compression_enable)); > - if (intel_dp->dsc_dpcd) > - seq_printf(m, "DSC_Sink_Support: %s\n", > - yesno(drm_dp_sink_supports_dsc(intel_dp->dsc_dpcd))); > + seq_printf(m, "DSC_Sink_Support: %s\n", > + yesno(drm_dp_sink_supports_dsc(intel_dp->dsc_dpcd))); > if (!intel_dp_is_edp(intel_dp)) > seq_printf(m, "FEC_Sink_Support: %s\n", > yesno(drm_dp_sink_supports_fec(intel_dp->fec_capable))); > -- > 2.20.0.rc2.7.g965798d1f299 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
On Wed, Jan 09, 2019 at 01:14:14PM -0800, Radhakrishna Sripada wrote: > intel_dp->dsc_dpcd is defined as an array making the if check redundant. > > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> > Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com> This fixes a Clang warning I saw after the patch that added this hit linux-next. Reviewed-by: Nathan Chancellor <natechancellor@gmail.com> Tested-by: Nathan Chancellor <natechancellor@gmail.com> > --- > drivers/gpu/drm/i915/i915_debugfs.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c > index 95813e21ae02..908e41f9cb7d 100644 > --- a/drivers/gpu/drm/i915/i915_debugfs.c > +++ b/drivers/gpu/drm/i915/i915_debugfs.c > @@ -4958,9 +4958,8 @@ static int i915_dsc_fec_support_show(struct seq_file *m, void *data) > crtc_state = to_intel_crtc_state(crtc->state); > seq_printf(m, "DSC_Enabled: %s\n", > yesno(crtc_state->dsc_params.compression_enable)); > - if (intel_dp->dsc_dpcd) > - seq_printf(m, "DSC_Sink_Support: %s\n", > - yesno(drm_dp_sink_supports_dsc(intel_dp->dsc_dpcd))); > + seq_printf(m, "DSC_Sink_Support: %s\n", > + yesno(drm_dp_sink_supports_dsc(intel_dp->dsc_dpcd))); > if (!intel_dp_is_edp(intel_dp)) > seq_printf(m, "FEC_Sink_Support: %s\n", > yesno(drm_dp_sink_supports_fec(intel_dp->fec_capable)));
On Wed, 09 Jan 2019, Manasi Navare <manasi.d.navare@intel.com> wrote: > On Wed, Jan 09, 2019 at 01:14:14PM -0800, Radhakrishna Sripada wrote: >> intel_dp->dsc_dpcd is defined as an array making the if check redundant. >> > > Yes I agree, I guess when I added that if check it was anot an array to begin > with and then forgot to take it off. > > Looks good to me. > > Reviewed-by: Manasi Navare <manasi.d.navare@intel.com> Manasi, you've got commit rights, please use them! Pushed now, with proper Fixes: tag added, thanks for the patch, review, testing, etc. BR, Jani. > > Manasi > >> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> >> Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com> >> --- >> drivers/gpu/drm/i915/i915_debugfs.c | 5 ++--- >> 1 file changed, 2 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c >> index 95813e21ae02..908e41f9cb7d 100644 >> --- a/drivers/gpu/drm/i915/i915_debugfs.c >> +++ b/drivers/gpu/drm/i915/i915_debugfs.c >> @@ -4958,9 +4958,8 @@ static int i915_dsc_fec_support_show(struct seq_file *m, void *data) >> crtc_state = to_intel_crtc_state(crtc->state); >> seq_printf(m, "DSC_Enabled: %s\n", >> yesno(crtc_state->dsc_params.compression_enable)); >> - if (intel_dp->dsc_dpcd) >> - seq_printf(m, "DSC_Sink_Support: %s\n", >> - yesno(drm_dp_sink_supports_dsc(intel_dp->dsc_dpcd))); >> + seq_printf(m, "DSC_Sink_Support: %s\n", >> + yesno(drm_dp_sink_supports_dsc(intel_dp->dsc_dpcd))); >> if (!intel_dp_is_edp(intel_dp)) >> seq_printf(m, "FEC_Sink_Support: %s\n", >> yesno(drm_dp_sink_supports_fec(intel_dp->fec_capable))); >> -- >> 2.20.0.rc2.7.g965798d1f299 >> >> _______________________________________________ >> Intel-gfx mailing list >> Intel-gfx@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/intel-gfx > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
On Tue, Jan 15, 2019 at 12:52:29PM +0200, Jani Nikula wrote: > On Wed, 09 Jan 2019, Manasi Navare <manasi.d.navare@intel.com> wrote: > > On Wed, Jan 09, 2019 at 01:14:14PM -0800, Radhakrishna Sripada wrote: > >> intel_dp->dsc_dpcd is defined as an array making the if check redundant. > >> > > > > Yes I agree, I guess when I added that if check it was anot an array to begin > > with and then forgot to take it off. > > > > Looks good to me. > > > > Reviewed-by: Manasi Navare <manasi.d.navare@intel.com> > > Manasi, you've got commit rights, please use them! > > Pushed now, with proper Fixes: tag added, thanks for the patch, review, > testing, etc. > Thanks Jani for merging this one. I know I had this in my list of patches to merge but got heads down busy with getting the IGT commit rights and merging the kms_dsc IGT test last few days. Thanks for catching this and for fixes patch RK! Regards Manasi > BR, > Jani. > > > > > > Manasi > > > >> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> > >> Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com> > >> --- > >> drivers/gpu/drm/i915/i915_debugfs.c | 5 ++--- > >> 1 file changed, 2 insertions(+), 3 deletions(-) > >> > >> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c > >> index 95813e21ae02..908e41f9cb7d 100644 > >> --- a/drivers/gpu/drm/i915/i915_debugfs.c > >> +++ b/drivers/gpu/drm/i915/i915_debugfs.c > >> @@ -4958,9 +4958,8 @@ static int i915_dsc_fec_support_show(struct seq_file *m, void *data) > >> crtc_state = to_intel_crtc_state(crtc->state); > >> seq_printf(m, "DSC_Enabled: %s\n", > >> yesno(crtc_state->dsc_params.compression_enable)); > >> - if (intel_dp->dsc_dpcd) > >> - seq_printf(m, "DSC_Sink_Support: %s\n", > >> - yesno(drm_dp_sink_supports_dsc(intel_dp->dsc_dpcd))); > >> + seq_printf(m, "DSC_Sink_Support: %s\n", > >> + yesno(drm_dp_sink_supports_dsc(intel_dp->dsc_dpcd))); > >> if (!intel_dp_is_edp(intel_dp)) > >> seq_printf(m, "FEC_Sink_Support: %s\n", > >> yesno(drm_dp_sink_supports_fec(intel_dp->fec_capable))); > >> -- > >> 2.20.0.rc2.7.g965798d1f299 > >> > >> _______________________________________________ > >> Intel-gfx mailing list > >> Intel-gfx@lists.freedesktop.org > >> https://lists.freedesktop.org/mailman/listinfo/intel-gfx > > _______________________________________________ > > Intel-gfx mailing list > > Intel-gfx@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx > > -- > Jani Nikula, Intel Open Source Graphics Center
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 95813e21ae02..908e41f9cb7d 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -4958,9 +4958,8 @@ static int i915_dsc_fec_support_show(struct seq_file *m, void *data) crtc_state = to_intel_crtc_state(crtc->state); seq_printf(m, "DSC_Enabled: %s\n", yesno(crtc_state->dsc_params.compression_enable)); - if (intel_dp->dsc_dpcd) - seq_printf(m, "DSC_Sink_Support: %s\n", - yesno(drm_dp_sink_supports_dsc(intel_dp->dsc_dpcd))); + seq_printf(m, "DSC_Sink_Support: %s\n", + yesno(drm_dp_sink_supports_dsc(intel_dp->dsc_dpcd))); if (!intel_dp_is_edp(intel_dp)) seq_printf(m, "FEC_Sink_Support: %s\n", yesno(drm_dp_sink_supports_fec(intel_dp->fec_capable)));
intel_dp->dsc_dpcd is defined as an array making the if check redundant. Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com> --- drivers/gpu/drm/i915/i915_debugfs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)