]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9a5274c4b3485bbb4c3169781adc065e0daa8f80
tree97470aae150f28d536a2c7e29e6f82a72fbe570f
parentbb3218cf09440cf0592c04d34f849ac4f98d9aa1
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