Commit 12612555 authored by Nathan Huckleberry's avatar Nathan Huckleberry Committed by Inki Dae
Browse files

drm/exynos: Fix return type for mixer_mode_valid and hdmi_mode_valid



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: default avatarDan Carpenter <error27@gmail.com>
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@lists.linux.dev
Signed-off-by: default avatarNathan Huckleberry <nhuck@google.com>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent 372a2eaf
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -922,7 +922,7 @@ static int hdmi_find_phy_conf(struct hdmi_context *hdata, u32 pixel_clock)
	return -EINVAL;
}

static int hdmi_mode_valid(struct drm_connector *connector,
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);
+1 −1
Original line number Diff line number Diff line
@@ -1045,7 +1045,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;