commit: 42337dcbb74c47c507f2628074a83f937cd1cf1a Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> AuthorDate: Mon Dec 9 23:12:52 2024 +0000 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> CommitDate: Mon Dec 9 23:12:52 2024 +0000 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=42337dcb
drm/display: Fix building with GCC 15 Bug: https://bugs.gentoo.org/946130 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> 0000_README | 4 ++++ 2700_drm-display-GCC15.patch | 52 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/0000_README b/0000_README index 87f43cf7..b2e6beb3 100644 --- a/0000_README +++ b/0000_README @@ -75,6 +75,10 @@ Patch: 2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch From: https://lore.kernel.org/linux-bluetooth/20190522070540.48895-1-mar...@holtmann.org/raw Desc: Bluetooth: Check key sizes only when Secure Simple Pairing is enabled. See bug #686758 +Patch: 2700_drm-display-GCC15.patch +From: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git +Desc: drm/display: Fix building with GCC 15 + Patch: 2901_tools-lib-subcmd-compile-fix.patch From: https://lore.kernel.org/all/20240731085217.94928-1-michael.we...@aisec.fraunhofer.de/ Desc: tools lib subcmd: Fixed uninitialized use of variable in parse-options diff --git a/2700_drm-display-GCC15.patch b/2700_drm-display-GCC15.patch new file mode 100644 index 00000000..0be775ea --- /dev/null +++ b/2700_drm-display-GCC15.patch @@ -0,0 +1,52 @@ +From a500f3751d3c861be7e4463c933cf467240cca5d Mon Sep 17 00:00:00 2001 +From: Brahmajit Das <brahmajit....@gmail.com> +Date: Wed, 2 Oct 2024 14:53:11 +0530 +Subject: drm/display: Fix building with GCC 15 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +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....@gmail.com> +Reviewed-by: Jani Nikula <jani.nik...@intel.com> +Link: https://patchwork.freedesktop.org/patch/msgid/20241002092311.942822-1-brahmajit....@gmail.com +Signed-off-by: Jani Nikula <jani.nik...@intel.com> +--- + drivers/gpu/drm/display/drm_dp_dual_mode_helper.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +(limited to 'drivers/gpu/drm/display/drm_dp_dual_mode_helper.c') + +diff --git a/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c b/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c +index 14a2a8473682b0..c491e3203bf11c 100644 +--- a/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c ++++ b/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c +@@ -160,11 +160,11 @@ EXPORT_SYMBOL(drm_dp_dual_mode_write); + + static bool is_hdmi_adaptor(const char hdmi_id[DP_DUAL_MODE_HDMI_ID_LEN]) + { +- static const char dp_dual_mode_hdmi_id[DP_DUAL_MODE_HDMI_ID_LEN] = ++ static const char dp_dual_mode_hdmi_id[DP_DUAL_MODE_HDMI_ID_LEN + 1] = + "DP-HDMI ADAPTOR\x04"; + + return memcmp(hdmi_id, dp_dual_mode_hdmi_id, +- sizeof(dp_dual_mode_hdmi_id)) == 0; ++ DP_DUAL_MODE_HDMI_ID_LEN) == 0; + } + + static bool is_type1_adaptor(uint8_t adaptor_id) +-- +cgit 1.2.3-korg +