From: Sean Paul <sean@poorly.run>
To: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Manasi Navare <manasi.d.navare@intel.com>,
David Francis <David.Francis@amd.com>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/5] drm/dsc: Fix bogus cpu_to_be16() usage
Date: Thu, 11 Jul 2019 11:36:34 -0400 [thread overview]
Message-ID: <20190711153634.GD136584@art_vandelay> (raw)
In-Reply-To: <20190710125143.9965-2-ville.syrjala@linux.intel.com>
On Wed, Jul 10, 2019 at 03:51:40PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> __be16 = cpu_to_be16(__be16) is nonsense. Do it right.
>
> ../drivers/gpu/drm/drm_dsc.c:218:53: warning: incorrect type in assignment (different base types)
> ../drivers/gpu/drm/drm_dsc.c:218:53: expected restricted __be16
> ../drivers/gpu/drm/drm_dsc.c:218:53: got int
> ../drivers/gpu/drm/drm_dsc.c:225:25: warning: cast from restricted __be16
> ../drivers/gpu/drm/drm_dsc.c:225:25: warning: incorrect type in argument 1 (different base types)
> ../drivers/gpu/drm/drm_dsc.c:225:25: expected unsigned short [usertype] val
> ../drivers/gpu/drm/drm_dsc.c:225:25: got restricted __be16
> ../drivers/gpu/drm/drm_dsc.c:225:25: warning: cast from restricted __be16
> ../drivers/gpu/drm/drm_dsc.c:225:25: warning: cast from restricted __be16
>
> Cc: Manasi Navare <manasi.d.navare@intel.com>
> Cc: David Francis <David.Francis@amd.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Sean Paul <sean@poorly.run>
> ---
> drivers/gpu/drm/drm_dsc.c | 12 +++++-------
> 1 file changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_dsc.c b/drivers/gpu/drm/drm_dsc.c
> index 77f4e5ae4197..f2fc47f123d2 100644
> --- a/drivers/gpu/drm/drm_dsc.c
> +++ b/drivers/gpu/drm/drm_dsc.c
> @@ -216,13 +216,11 @@ void drm_dsc_pps_payload_pack(struct drm_dsc_picture_parameter_set *pps_payload,
> */
> for (i = 0; i < DSC_NUM_BUF_RANGES; i++) {
> pps_payload->rc_range_parameters[i] =
> - ((dsc_cfg->rc_range_params[i].range_min_qp <<
> - DSC_PPS_RC_RANGE_MINQP_SHIFT) |
> - (dsc_cfg->rc_range_params[i].range_max_qp <<
> - DSC_PPS_RC_RANGE_MAXQP_SHIFT) |
> - (dsc_cfg->rc_range_params[i].range_bpg_offset));
> - pps_payload->rc_range_parameters[i] =
> - cpu_to_be16(pps_payload->rc_range_parameters[i]);
> + cpu_to_be16((dsc_cfg->rc_range_params[i].range_min_qp <<
> + DSC_PPS_RC_RANGE_MINQP_SHIFT) |
> + (dsc_cfg->rc_range_params[i].range_max_qp <<
> + DSC_PPS_RC_RANGE_MAXQP_SHIFT) |
> + (dsc_cfg->rc_range_params[i].range_bpg_offset));
> }
>
> /* PPS 88 */
> --
> 2.21.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-07-11 15:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-10 12:51 [PATCH 1/5] drm/fb-helper: Include prototype for drm_fb_helper_modinit() Ville Syrjala
2019-07-10 12:51 ` [PATCH 2/5] drm/dsc: Fix bogus cpu_to_be16() usage Ville Syrjala
2019-07-11 15:36 ` Sean Paul [this message]
2019-07-10 12:51 ` [PATCH 3/5] drm: Include prototype for drm_need_swiotlb() Ville Syrjala
2019-07-11 15:37 ` Sean Paul
2019-07-10 12:51 ` [PATCH 4/5] drm/syncobj: Include the prototype for drm_timeout_abs_to_jiffies() Ville Syrjala
2019-07-11 15:39 ` Sean Paul
2019-07-11 16:32 ` Sam Ravnborg
2019-07-10 12:51 ` [PATCH 5/5] drm: Fix return type of crc .poll() Ville Syrjala
2019-07-11 15:40 ` Sean Paul
2019-07-11 15:35 ` [PATCH 1/5] drm/fb-helper: Include prototype for drm_fb_helper_modinit() Sean Paul
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=20190711153634.GD136584@art_vandelay \
--to=sean@poorly.run \
--cc=David.Francis@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=manasi.d.navare@intel.com \
--cc=ville.syrjala@linux.intel.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.