Patch "drm/display: Fix building with GCC 15" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/display: Fix building with GCC 15

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-display-fix-building-with-gcc-15.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit c82e0413bca6731e2ae5d11b92fbd882ea917f73
Author: Brahmajit Das <brahmajit.xyz@xxxxxxxxx>
Date:   Wed Oct 2 14:53:11 2024 +0530

    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@xxxxxxxxx>
    Reviewed-by: Jani Nikula <jani.nikula@xxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20241002092311.942822-1-brahmajit.xyz@xxxxxxxxx
    Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

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 bd61e20770a5b..719da3610310f 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)




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux