Patch "drm/exynos: Fix return type for mixer_mode_valid and hdmi_mode_valid" has been added to the 5.15-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/exynos: Fix return type for mixer_mode_valid and hdmi_mode_valid

to the 5.15-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-exynos-fix-return-type-for-mixer_mode_valid-and-.patch
and it can be found in the queue-5.15 subdirectory.

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



commit bed7cbab0bd9ffeee46378ea15746cba495d4a0d
Author: Nathan Huckleberry <nhuck@xxxxxxxxxx>
Date:   Mon Sep 26 09:31:00 2022 +0900

    drm/exynos: Fix return type for mixer_mode_valid and hdmi_mode_valid
    
    [ Upstream commit 1261255531088208daeca818e2b486030b5339e5 ]
    
    The field mode_valid in exynos_drm_crtc_ops is expected to be of type enum
    drm_mode_status (*mode_valid)(struct exynos_drm_crtc *crtc,
                                       const struct drm_display_mode *mode);
    
    Likewise for mode_valid in drm_connector_helper_funcs.
    
    The mismatched return type breaks forward edge kCFI since the underlying
    function definition does not match the function hook definition.
    
    The return type of mixer_mode_valid and hdmi_mode_valid should be changed
    from int to enum drm_mode_status.
    
    Reported-by: Dan Carpenter <error27@xxxxxxxxx>
    Link: https://protect2.fireeye.com/v1/url?k=3e644738-5fef521d-3e65cc77-
    74fe485cbff6-36ad29bf912d3c9f&q=1&e=5cc06174-77dd-4abd-ab50-
    155da5711aa3&u=https%3A%2F%2Fgithub.com%2FClangBuiltLinux%2Flinux%2Fissues%2F
    1703
    Cc: llvm@xxxxxxxxxxxxxxx
    Signed-off-by: Nathan Huckleberry <nhuck@xxxxxxxxxx>
    Signed-off-by: Inki Dae <inki.dae@xxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 7655142a4651..912a7df9f8c4 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -922,8 +922,8 @@ static int hdmi_find_phy_conf(struct hdmi_context *hdata, u32 pixel_clock)
 	return -EINVAL;
 }
 
-static int hdmi_mode_valid(struct drm_connector *connector,
-			struct drm_display_mode *mode)
+static enum drm_mode_status hdmi_mode_valid(struct drm_connector *connector,
+					    struct drm_display_mode *mode)
 {
 	struct hdmi_context *hdata = connector_to_hdmi(connector);
 	int ret;
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
index 41c54f1f60bc..8d01e1068245 100644
--- a/drivers/gpu/drm/exynos/exynos_mixer.c
+++ b/drivers/gpu/drm/exynos/exynos_mixer.c
@@ -1044,7 +1044,7 @@ static void mixer_atomic_disable(struct exynos_drm_crtc *crtc)
 	clear_bit(MXR_BIT_POWERED, &ctx->flags);
 }
 
-static int mixer_mode_valid(struct exynos_drm_crtc *crtc,
+static enum drm_mode_status mixer_mode_valid(struct exynos_drm_crtc *crtc,
 		const struct drm_display_mode *mode)
 {
 	struct mixer_context *ctx = crtc->ctx;



[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