Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp6033107ybe; Tue, 10 Sep 2019 12:27:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqwm6TWspLcj+eVIQzBWV973TJlM6P7Z5DkLhWIbbyWgOzgQNhyTIAr3AMDLbBFj6mPyCR0S X-Received: by 2002:a50:d758:: with SMTP id i24mr32325613edj.246.1568143673289; Tue, 10 Sep 2019 12:27:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568143673; cv=none; d=google.com; s=arc-20160816; b=kdaMlLPx/4JrTUUFFd1DjCRLw4+GHcyzGpmf8V/91LYpQZ2bl2AFcwLVhFvQYBViu6 0ECPF016Prk6ZUoX+e5/Y4/mfEL0I0T9H/GyGTinnysjmSrHD6f3OnJkB5Wr40BU/DKq QC/j8W/wL5ktORgo8fg3KWnRKZqIsdGt0Pblk83LgFaBWrDOHtJmVCSm+Vn89/960e79 R2wNzR98o06a7yktJvJHiXeAJovm0J/xIiUTsyFoyvbIJexBtGksTizx5vOkTug0LQ/6 hZdLBcsAHdLI30uGQCHXBFLcQctf6wc/Wc+qKj4BvcWCa+EFZ1TIPhRty6WqVMcL1jMM nFnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=qLpznJPxLwwMi0OYrruHYfd3+++9aKqagL93n7vuDfw=; b=YBKjkuD0dIwmL6zA95Yz5J1Qn0fzj8x7iFFl8ZOWyp2whajMYfsESTWrbajQyRbIOm 5wgtEgfmvOeijxM7l8nk0TrLr4Gy5PKVe8gJNlwR6ZPWmfIR2v7Y0pE7Ln7kMXSxog1Z 6BxYuOLDdwXvcz7P51KaA0PgPF1fGNsDZ5TLUYPXwf0ee65vBL4Tszti2ZXXf+l5TJ7O e1QtBnC30JsVT46Zx8oQZCBJ9ycxj7WgpzXeOl6/XB4euw0y9AQGPv/mlQ+1BK13n4WO ej4OrdcMD5PVjfpBgIkVL5uo51ja3sJFrX6c17HP6Dv+8+SGZYCQtVFEUfmrj2rakm47 CjdQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n22si5368271edq.33.2019.09.10.12.27.29; Tue, 10 Sep 2019 12:27:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726915AbfIJR6D (ORCPT + 99 others); Tue, 10 Sep 2019 13:58:03 -0400 Received: from mga11.intel.com ([192.55.52.93]:49469 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726139AbfIJR5u (ORCPT ); Tue, 10 Sep 2019 13:57:50 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Sep 2019 10:56:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,490,1559545200"; d="scan'208";a="191885982" Received: from labuser-z97x-ud5h.jf.intel.com (HELO intel.com) ([10.54.75.49]) by FMSMGA003.fm.intel.com with ESMTP; 10 Sep 2019 10:56:40 -0700 Date: Tue, 10 Sep 2019 10:58:07 -0700 From: Manasi Navare To: Harry Wentland Cc: Benjamin Gaignard , "benjamin.gaignard@linaro.org" , "airlied@linux.ie" , "daniel@ffwll.ch" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , Gaurav K Singh Subject: Re: [PATCH] drm: include: fix W=1 warnings in struct drm_dsc_config Message-ID: <20190910175806.GA31258@intel.com> References: <20190909135205.10277-1-benjamin.gaignard@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > --- > > 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