]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/display: Fix building with GCC 15
authorBrahmajit Das <brahmajit.xyz@gmail.com>
Wed, 2 Oct 2024 09:23:11 +0000 (14:53 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 19:03:45 +0000 (20:03 +0100)
commit07a4acea17f53f5c47fff3cce5aede962f969435
tree4ee7c51bbe4c46a76f64f53398970833e6ecbbc2
parentee6219b9d0d2c05633067c3e0e2f4eb7f4f2c1c6
drm/display: Fix building with GCC 15

[ Upstream commit a500f3751d3c861be7e4463c933cf467240cca5d ]

GCC 15 enables -Werror=unterminated-string-initialization by default.
This results in the following build error

drivers/gpu/drm/display/drm_dp_dual_mode_helper.c: In function ‘is_hdmi_adaptor’:
drivers/gpu/drm/display/drm_dp_dual_mode_helper.c:164:17: error: initializer-string for array of
 ‘char’ is too long [-Werror=unterminated-string-initialization]
  164 |                 "DP-HDMI ADAPTOR\x04";
      |                 ^~~~~~~~~~~~~~~~~~~~~

After discussion with Ville, the fix was to increase the size of
dp_dual_mode_hdmi_id array by one, so that it can accommodate the NULL
line character. This should let us build the kernel with GCC 15.

Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241002092311.942822-1-brahmajit.xyz@gmail.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/display/drm_dp_dual_mode_helper.c