drm/i2c: tda998x: Remove VLA usage
authorLaura Abbott <labbott@redhat.com>
Wed, 11 Apr 2018 01:03:30 +0000 (18:03 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 23 May 2018 08:45:22 +0000 (10:45 +0200)
commitca510ead96d78c5379db5d36ffbdf5382f36db6d
tree97470aae150f28d536a2c7e29e6f82a72fbe570f
parent520ea9347505f5eb90a6162385cf821e80b6c233
drm/i2c: tda998x: Remove VLA usage

There's an ongoing effort to remove VLAs[1] from the kernel to eventually
turn on -Wvla. The vla in reg_write_range is based on the length of data
passed. The one use of a non-constant size for this range is bounded by
the size buffer passed to hdmi_infoframe_pack which is a fixed size.
Switch to this upper bound.

[1] https://lkml.org/lkml/2018/3/7/621

Signed-off-by: Laura Abbott <labbott@redhat.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20180411010330.17866-1-labbott@redhat.com
drivers/gpu/drm/i2c/tda998x_drv.c