Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp17025rwi; Sun, 9 Oct 2022 17:33:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM44AhUZA2zKfz0Ae45L0HB+P6x7xxoR1gho5ICJvh5VL6nVUs20VlKGdNrIMz70TapiBXQ4 X-Received: by 2002:a17:907:7e83:b0:782:7c78:3828 with SMTP id qb3-20020a1709077e8300b007827c783828mr12822195ejc.7.1665362005125; Sun, 09 Oct 2022 17:33:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665362005; cv=none; d=google.com; s=arc-20160816; b=UIgpCXoB+xE+yZRwfXRcw7Vn69o949nUFiPqldfdJZWShbZOGsjSyX3xg2KLnBFx4l z6IW94DesnAXYCcATTCFi4G/+VVgeXpNe930DKHUnAQ/HoSjNXjWlkTILU6lMsRLxdBr PnbYECBcgmNY9Qivsh4KHwRB3KqMETKlohI54En4mdgRGTY6/b4SbZ0XIatiWkAK84J/ wHL5R6I6FvDtxILSo+DjmX3B3s73aX2Cs3afSPivgtmruI1uecpKxFkTGson9kaQN5Pk SWVEQGtKeL7yWCR5XkDEQ8aSv3qXSqkbasCVqVZN6G4nxVYeeUzqGRlKXOsBRwb7oOSl zzhw== 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=/1C3HX4mi5y0Vb5Q0Pc5S2z5XR818dZQRdGTDNoRZso=; b=DWZaWJORcNengzUNtUwysXFVEQUcTTt/XlmBliLnbtUnf/veVScDIcmPqXrGX99yww 6h+MtXI/uSaN+y9iess6v7B6KVcwZAtPCKTjwfLG4abEaOJWJ5MRAadbqeE7guC/57Og ZygLURVLQED4LYpg6SvoHPHWKt77JYdud0kRAuwcnCJ4PrnGd2iRFUBReb24215qT6hG gQKg9CJ24+Fn+wc4U7hPOf2RG0TRytPDySqCWYJqYa7BhdsDPZsM61wK2+D5D3jReXid O0ce57P3FxOSalGGyvleOjJoM39heYFc/wyzuHIMl9sj+mKTLb01MWJ96AEFFWR7r6q9 a+dA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lz8DXgxU; 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 i13-20020a05640242cd00b00458d43beac7si11118352edc.41.2022.10.09.17.32.57; Sun, 09 Oct 2022 17:33:25 -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=lz8DXgxU; 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 S233147AbiJJA27 (ORCPT + 99 others); Sun, 9 Oct 2022 20:28:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232922AbiJJAXy (ORCPT ); Sun, 9 Oct 2022 20:23:54 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE9C73DBEE; Sun, 9 Oct 2022 16:57:42 -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 sin.source.kernel.org (Postfix) with ESMTPS id D9429CE0F72; Sun, 9 Oct 2022 23:57:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 952F4C43143; Sun, 9 Oct 2022 23:57:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665359859; bh=68484usKTHxDSlDitAPfp628Cran1WU7zwP/eWP86Gw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lz8DXgxUCo36HAfVU1HSaF50/BNpFJyelblOAqqkw2QrkFWXmnkY0CgTe1guz71fL YgYX4PSfgpv47Z+STiXUgu12uM7Dn5D4k0T9Fsc8jw6CT3g6e/nRX0PQNoXzXVYCWE /Zk2oFmgbwjKf1Zr4ZBceqa1wDx+c2jJ+CWNehwrLOUb5Do4N8S4yxmjjY8N563WZz J4qHcS5tsrpBCmGrbz0tIK+osG8c98hnjBFKFabIbFRurnLx9P9FXVAjzoT3YjfTS8 psp73axcTTQqsjUqjlMALcGSZngg2q70//xI7boyGCGI/bn8TFx22U/Fi93upB1Sgf yCmya1tDxF7ZQ== 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.4 12/14] drm/exynos: Fix return type for mixer_mode_valid and hdmi_mode_valid Date: Sun, 9 Oct 2022 19:57:08 -0400 Message-Id: <20221009235710.1231937-12-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221009235710.1231937-1-sashal@kernel.org> References: <20221009235710.1231937-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 0073a2b3b80a..838a638fb03a 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 22f494145411..07c59e647fc2 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -1039,7 +1039,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