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 2155DECAAD8 for ; Tue, 13 Sep 2022 23:20:16 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=bAzO5/udd3VDylYQ3eCGbtkjhbn9z4SEvNt6FZUifIg=; b=Bjlc3Hf24jW0ox OFsWAbySDIchnSBOKSZnKJXAV+4QkwRbVE4jqe8uMZrdtPlThyOaedX/Nbq79toXhr+nNeYyxWiMN XO/GnidwUCWn5fM1E9vVmVO9KSdk7QxnJ+h3ibExu709GgZIu9nMg/mQdlfHL6DcrABIUhYcgYPnD 1PU1DVTeUXrDyLuvPLeE9HO/t8QNQAcAU0KnIGkECoMICjb8VljNzeYxFglDK/hikj7feYtSyLIYv VYGgjFS16fLd4TbgKi9EGJ3S1lR+Uj7XRtZAQPLTrwGKcLkSLcnE6rdb7/fqKlGALyGOnaw7nWssL 2PB2B865D3kiusxCqaNg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oYFBI-001IfG-Px; Tue, 13 Sep 2022 23:19:04 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oYFBD-001IYv-Io for linux-arm-kernel@lists.infradead.org; Tue, 13 Sep 2022 23:19:01 +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 ams.source.kernel.org (Postfix) with ESMTPS id 00924B810DB; Tue, 13 Sep 2022 23:18:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DA4BDC433C1; Tue, 13 Sep 2022 23:18:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663111133; bh=/LcuPi8V7Ej7uvoNaew7dsD1eUxauxC0rf5elEG4pcY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=isGmkR8X+bqZCIZQIZToszbRwjKwXAksaJyyViRDQ/ma3/H6VFLPPnBz4H+I+C6Z1 6k969mCZrmzJ/PvuMY9bfIh5gMSpa4U5DU+e9lUOE5415GUoFjRUDZLy9B6o1Sfnhm 3EtgPvgMiLXEI9iAzPZ6EBkKHoMNjadHoRDyPZOk3tWbqMPuFIqDyGl9hIa45hm89L F/BlojPf6ZnPMR+WiolQWurOnGA0nbqbWlbZrE0JZ1mokMU4oSYFD6+IMLVQOPtkRJ CxhG7NRoOAS+mXX9yUN/d+qGKH5PXJyjUYxkpe2rJdJWPuBGrPaadHsfomM2bY93nQ TCPHDb5axgLdA== Date: Tue, 13 Sep 2022 16:18:51 -0700 From: Nathan Chancellor To: Nathan Huckleberry Cc: Dan Carpenter , llvm@lists.linux.dev, Inki Dae , Seung-Woo Kim , Kyungmin Park , David Airlie , Daniel Vetter , Krzysztof Kozlowski , Alim Akhtar , Nick Desaulniers , Tom Rix , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm/exynos: Fix return type for mixer_mode_valid and hdmi_mode_valid Message-ID: References: <20220913205449.154966-1-nhuck@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220913205449.154966-1-nhuck@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220913_161859_937072_AEB448ED X-CRM114-Status: GOOD ( 20.91 ) 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 On Tue, Sep 13, 2022 at 01:54:49PM -0700, Nathan Huckleberry wrote: > 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://github.com/ClangBuiltLinux/linux/issues/1703 > Cc: llvm@lists.linux.dev > Signed-off-by: Nathan Huckleberry Reviewed-by: Nathan Chancellor > --- > drivers/gpu/drm/exynos/exynos_hdmi.c | 4 ++-- > drivers/gpu/drm/exynos/exynos_mixer.c | 5 +++-- > 2 files changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c > index 10b0036f8a2e..8453359c92e8 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 65260a658684..82f676e6d21b 100644 > --- a/drivers/gpu/drm/exynos/exynos_mixer.c > +++ b/drivers/gpu/drm/exynos/exynos_mixer.c > @@ -1045,8 +1045,9 @@ 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, > - const struct drm_display_mode *mode) > +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; > u32 w = mode->hdisplay, h = mode->vdisplay; > -- > 2.37.2.789.g6183377224-goog > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel