From: Ville Syrjälä Date: Wed, 10 Jul 2019 12:51:40 +0000 (+0300) Subject: drm/dsc: Fix bogus cpu_to_be16() usage X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=40d51c05d04473e83f3ecfc5a046b1ab783670e4;p=openwrt%2Fstaging%2Fblogic.git drm/dsc: Fix bogus cpu_to_be16() usage __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 Cc: David Francis Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190710125143.9965-2-ville.syrjala@linux.intel.com Reviewed-by: Sean Paul --- diff --git a/drivers/gpu/drm/drm_dsc.c b/drivers/gpu/drm/drm_dsc.c index 27e5c6036658..4a475d9696ff 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 */