Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm: fix warnings in DSC

Remove always false comparisons due to limited range of nfl_bpg_offset
and scale_increment_interval fields.
Warnings detected when compiling with W=1.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190911084759.6946-1-benjamin.gaignard@st.com

authored by

Benjamin Gaignard and committed by
Benjamin Gaignard
3b92198d 5dec1aff

-11
-11
drivers/gpu/drm/drm_dsc.c
··· 336 336 else 337 337 vdsc_cfg->nfl_bpg_offset = 0; 338 338 339 - /* 2^16 - 1 */ 340 - if (vdsc_cfg->nfl_bpg_offset > 65535) { 341 - DRM_DEBUG_KMS("NflBpgOffset is too large for this slice height\n"); 342 - return -ERANGE; 343 - } 344 - 345 339 /* Number of groups used to code the entire slice */ 346 340 groups_total = groups_per_line * vdsc_cfg->slice_height; 347 341 ··· 363 369 * be used to disable the scale increment at the end of the slice 364 370 */ 365 371 vdsc_cfg->scale_increment_interval = 0; 366 - } 367 - 368 - if (vdsc_cfg->scale_increment_interval > 65535) { 369 - DRM_DEBUG_KMS("ScaleIncrementInterval is large for slice height\n"); 370 - return -ERANGE; 371 372 } 372 373 373 374 /*