From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 07F46C4332F for ; Mon, 10 Oct 2022 00:00:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iDLLeR0LpLMzsbcftoR3YdBB2Kk5P7HFgRRBe8mSdXQ=; b=1TC/wBtrBm+6EP X/Z/g6wy7ggjqRhwWTa70DQby/epS+1bERuTDi5AIdp1PyG9gl4uz8YU24uEe1BXz6ci1HCa+UDbk bUf9iK4OKpkVzh4M9FN+UiSdzZFKg0bhD+7CPMcEf1lfVTDYHtDD0fqhGs4verrcKJT0I5jmRocyP 5X979AAgrtbkl9cvnkM7JjNcE/0r0W3z3DyOVsMwIy8R8KzHxIOSEAd3ZOqnfV7upKEYbVi2njPZt UYYu5+v3SDexxmdA+02QAtZWQZWNELz3U1I7RB5pQOK5H7ALTRfPutcy2bITQMiGmaa3ABwkOb4lD +/w5fuZBH+apPHV5UB+g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ohgCJ-00GWFE-Sz; Sun, 09 Oct 2022 23:59:08 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ohgBM-00GVlL-Ph for linux-arm-kernel@lists.infradead.org; Sun, 09 Oct 2022 23:58:10 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4B38960DD3; Sun, 9 Oct 2022 23:58:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 15334C43141; Sun, 9 Oct 2022 23:58:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665359887; bh=smQ+WOJ2DvzcoWgCJ8NdsVMDowvo9I+a12p6Z3muVUs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D5MDaU90hyZH12wsdpfdQYWILWq7W6zKm+dDSF6MVlXf3zhWnxMEDR/XNqB4Yodt3 uxQXkSms29xREs4t0mjv2B+752yZfMIasuRrl6k7HOcGPzvshMUMlpESC+vIIdMKVN jMOZDOI4MvET+mrfIvetOx5yKQSca5AHBVO9O6oMsm+vmIRLmcT9Ns9aAA5tpIgdL8 Hp3BdvqWCGmzel0XTgylexjn8AZ17Q+WnplHb6Dr8ZxH7K9Q99XeLb9c0WUZ+o+jSw k9UacFgC5QKFqBXNjrTsJAdoix5ql5q/cuG9PaXAa33aHLzgVLczTqD0f243KGKYip 7oHFhqm178pDg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Nathan Huckleberry , Dan Carpenter , llvm@lists.linux.dev, Inki Dae , Sasha Levin , sw0312.kim@samsung.com, kyungmin.park@samsung.com, airlied@gmail.com, daniel@ffwll.ch, krzysztof.kozlowski@linaro.org, nathan@kernel.org, ndesaulniers@google.com, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 10/10] drm/exynos: Fix return type for mixer_mode_valid and hdmi_mode_valid Date: Sun, 9 Oct 2022 19:57:45 -0400 Message-Id: <20221009235746.1232129-10-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221009235746.1232129-1-sashal@kernel.org> References: <20221009235746.1232129-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221009_165808_986219_089AD32E X-CRM114-Status: GOOD ( 14.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Nathan Huckleberry [ 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 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: Nathan Huckleberry Signed-off-by: Inki Dae Signed-off-by: Sasha Levin --- drivers/gpu/drm/exynos/exynos_hdmi.c | 4 ++-- drivers/gpu/drm/exynos/exynos_mixer.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 2092a650df7d..227856f0a3c4 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -911,8 +911,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 522d6c46d7b1..16a7624021a8 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -1018,7 +1018,7 @@ static void mixer_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; -- 2.35.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel