linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manasi Navare <manasi.d.navare@intel.com>
To: Harry Wentland <hwentlan@amd.com>
Cc: Benjamin Gaignard <benjamin.gaignard@st.com>,
	"benjamin.gaignard@linaro.org" <benjamin.gaignard@linaro.org>,
	"airlied@linux.ie" <airlied@linux.ie>,
	"daniel@ffwll.ch" <daniel@ffwll.ch>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	Gaurav K Singh <gaurav.k.singh@intel.com>
Subject: Re: [PATCH] drm: include: fix W=1 warnings in struct drm_dsc_config
Date: Tue, 10 Sep 2019 10:58:07 -0700	[thread overview]
Message-ID: <20190910175806.GA31258@intel.com> (raw)
In-Reply-To: <f17b306d-2810-985c-42ec-59c6a6dd7093@amd.com>

On Tue, Sep 10, 2019 at 12:58:24PM +0000, Harry Wentland wrote:
> +Manasi, Gaurav
> 
> On 2019-09-09 9:52 a.m., Benjamin Gaignard wrote:
> > Change scale_increment_interval and nfl_bpg_offset fields to
> > u32 to avoid W=1 warnings because we are testing them against
> > 65535.
> > 
> > Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
> > ---
> >   include/drm/drm_dsc.h | 6 ++++--
> >   1 file changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/include/drm/drm_dsc.h b/include/drm/drm_dsc.h
> > index 887954cbfc60..e495024e901c 100644
> > --- a/include/drm/drm_dsc.h
> > +++ b/include/drm/drm_dsc.h
> > @@ -207,11 +207,13 @@ struct drm_dsc_config {
> >   	 * Number of group times between incrementing the scale factor value
> >   	 * used at the beginning of a slice.
> >   	 */
> > -	u16 scale_increment_interval;
> > +	u32 scale_increment_interval;
> 
> The DSC spec defines both as u16. I think the check in drm_dsc.c is 
> useless and should be dropped.
>

I agree with Harry here, all these variables should match the number of bits
in the spec, increasing them to u32 allows more values which violates the
DSC spec.

It should stay u16

Manasi
 
> Harry
> 
> > +
> >   	/**
> >   	 * @nfl_bpg_offset: Non first line BPG offset to be used
> >   	 */
> > -	u16 nfl_bpg_offset;
> > +
> > +	u32 nfl_bpg_offset;
> >   	/**
> >   	 * @slice_bpg_offset: BPG offset used to enforce slice bit
> >   	 */
> > 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2019-09-10 17:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-09 13:52 Benjamin Gaignard
2019-09-09 13:52 ` [PATCH] drm: atomic helper: fix W=1 warnings Benjamin Gaignard
2019-09-16 13:19   ` Benjamin Gaignard
2019-10-03  9:52     ` Benjamin Gaignard
2019-10-03 14:27   ` Ville Syrjälä
2019-10-03 14:46     ` Benjamin Gaignard
2019-10-03 15:05       ` Ville Syrjälä
2019-10-03 15:37         ` Benjamin Gaignard
2019-10-03 15:46           ` Ville Syrjälä
2019-10-04 10:48             ` Benjamin Gaignard
2019-10-04 12:27               ` Ville Syrjälä
2019-10-04 12:36                 ` Benjamin GAIGNARD
2019-10-04 13:08                   ` Ville Syrjälä
2019-10-08  9:55           ` Daniel Vetter
2019-09-10 12:58 ` [PATCH] drm: include: fix W=1 warnings in struct drm_dsc_config Harry Wentland
2019-09-10 17:58   ` Manasi Navare [this message]

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=20190910175806.GA31258@intel.com \
    --to=manasi.d.navare@intel.com \
    --cc=airlied@linux.ie \
    --cc=benjamin.gaignard@linaro.org \
    --cc=benjamin.gaignard@st.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gaurav.k.singh@intel.com \
    --cc=hwentlan@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH] drm: include: fix W=1 warnings in struct drm_dsc_config' \
    /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

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).