Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp62249rwi; Sun, 9 Oct 2022 18:31:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4a6xjNB+/J6ZPUun0ZzE3aY0SkZKtsc5eM/+w6hYb8ydqx8NRA7p1LSaZlkH3vOxTAp1wJ X-Received: by 2002:a17:902:8693:b0:17a:f71:98fd with SMTP id g19-20020a170902869300b0017a0f7198fdmr16580133plo.25.1665365514186; Sun, 09 Oct 2022 18:31:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665365514; cv=none; d=google.com; s=arc-20160816; b=MOtCJG3vCzRZo8/i8amB/vSj8qTQHlSce9gb+jTWW3Vb+ZVBYNUi1gbflkhwwxrTvr npj7s7Z8TQnv1WsCV2c48X7iuuN1cXfrlQosh9z4fUMflFfEX834Qz7wfZRJfldkArj6 N4VPKKRmvnfcwf2HMdBCKst4KzisRofsr2D2aBSIGoh9oKI/HVaN2ev6m//P7GpZtthM meaCa7UrZH6eQVdnlGF9SCPC1Afdhg1fLfOlSksRXNaH7bpfZl9to8l62wleaNcRfZCG SniV41BjDEWKtiQa0dgPYtXJDgOGsCSq0eIV5OuKx2wK5pNZfBzMQOOGUUDlkunVgRZN p2ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=g6yxN2Id9RL0EqcWy1/tW7STnkR+Fnt3QfzTXVauwhc=; b=a/47rxcfkEse1N8B81As9Vk363CFCRYMvdWH4eVBMNvFnfUmLpTap02zy5mSKVYJbo qb3ccj4UuSl4+ssSCoYUkvJUerNAYpiCy4rBqedSHPh0GWpn85L7jSO47sl990k5kEUM yvvQdjDauAMX+0F62XtpcSg19vZUu/2DHVZPdCNjof2A+ct5fnoC5bWtvXnOwM23ZG2/ VFJEg9XbnQ8wdL+wtuZwVkV6r6i3YdMDzIvgnGtkDqd082Tsb5tbozpiHtOyKLSJY3f0 wnjQBsL5v5oJr8f0AI+p5dkJZF4JneDJJqMvVCwhgEsFHQbPKkUVrJHqA6lnh1jqFcey Ps8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WiMxyayK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c12-20020a170903234c00b00176e9de1f46si11896223plh.154.2022.10.09.18.31.43; Sun, 09 Oct 2022 18:31:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WiMxyayK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232832AbiJJA1W (ORCPT + 99 others); Sun, 9 Oct 2022 20:27:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231374AbiJJAWu (ORCPT ); Sun, 9 Oct 2022 20:22:50 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7763C12D3C; Sun, 9 Oct 2022 16:56:48 -0700 (PDT) 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 164F560DD3; Sun, 9 Oct 2022 23:56:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C049AC433D7; Sun, 9 Oct 2022 23:56:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665359807; bh=n1vxNJQOjDHQL8BZFeVv4c88gOZtun81ldHhd6fhowM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WiMxyayKpdzuYtV8u5j79N6dxmmmp3r/ip7hfn0n5kL/kL9zXgESF0KldoPWRG2qN 9CrAWvq98xR3d6rmHStytiVGMIEYK3kemu+oROx45+9mJmFpxwmak30GzC/8kqIUrd Yd4xYj6ZgKXpu3dFFbvWKk1kLOY5B/w5YGHBoVOzXaxnsDM9UynKfbw//yo8VVFMMq UPZiwVkc1FqaFr/dnlCdIP50wDBtu476cC0Rq5Ns6UMCSIZ/D3JPoV8D9tMewIUL9v j4r4rmYr05iPRjJb4SSp+zjevasvY6Y3T856RitaxjD3EgZ8QlHS0giw2+GOhpTj2g XYoxQWA6OhWSw== 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 5.10 18/22] drm/exynos: Fix return type for mixer_mode_valid and hdmi_mode_valid Date: Sun, 9 Oct 2022 19:55:36 -0400 Message-Id: <20221009235540.1231640-18-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221009235540.1231640-1-sashal@kernel.org> References: <20221009235540.1231640-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 dc01c188c0e0..d864082b2592 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -913,8 +913,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 af192e5a16ef..dd038b30e7e9 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -1039,7 +1039,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; -- 2.35.1