Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp819300rwb; Mon, 26 Sep 2022 06:19:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6rx2bk+FB/snyrmcMBvVNJDx2pHCpcesHNrvY61Et46WKODr+DrWbgbEH4ZU4wJAJ0+v9F X-Received: by 2002:a17:907:2d9e:b0:782:69f2:a0ec with SMTP id gt30-20020a1709072d9e00b0078269f2a0ecmr16504451ejc.680.1664198355403; Mon, 26 Sep 2022 06:19:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664198355; cv=none; d=google.com; s=arc-20160816; b=dO34HG//yulQfb/tAwXz9KN5T0VSQyOq1UN11uN75ujR8skwr5L/9A2s28uF1tqUxB xkVsRxbIXP/g2/19w2a/kmUJx9o5feUkf6pIBmhqnBNZKUnj5gj5FS1PIdgSm2dYdP8m Q3kpy469vSJlwfV1jd95PqyuDyHzMcR7cphik+mx+xEsmOM5jCaZEBGtorDiQR9scUOg KCHMK5t3oOg9x/TlBQWk8n2PIn6s+IECktRYfD+pu/FoK0GidxzmR/nj0o3NhywSlSvX Mnkjw/Xi+kY55mDCc3kzN8ddd0/e0sUlD63JYLM2M7w4RHvejvOy+QKiBjHFBqWhhv/k xpdQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fBdkgmDF75Mr1ZGnm6hjsJCPqnuwq3xWSS1ZjAhPEOc=; b=BaYLpREUoj8qE7XVT7BFu8VUF9l4BRguz1Zt1EAx7gvLgqZ7hEn3+xyJX0bysHV/FM Tny+YAyltXbp9rgchJlHOBfvzuAVdiUcklL+/9ukXMnbUEDrkxK/wwwINugW2qAB5+AJ 5+/xDJFM9zfnWzrnb3TQ/2rZcSFl2akVvYfB1bWp6FS5ZMkW4N9hNJ3VZ0BVYrQEvPum bA+xaqHOg36hlfyThrT7NIkeqoAODFdgxSWwoeMARYJ7KtAgI2JT+un7aw5KNFJ3u5wL thVouQeF9JD4ZVk6GaeHYDt3uacSbUv7w1S6f8XqJNzp8zT4S88aMuopsYBrfg3ZKTna CdOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Wr9czHly; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fw38-20020a170907502600b00781ebe14ffesi12989082ejc.816.2022.09.26.06.18.48; Mon, 26 Sep 2022 06:19:15 -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=@linuxfoundation.org header.s=korg header.b=Wr9czHly; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235681AbiIZKfD (ORCPT + 99 others); Mon, 26 Sep 2022 06:35:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235883AbiIZKdK (ORCPT ); Mon, 26 Sep 2022 06:33:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DC343844E; Mon, 26 Sep 2022 03:20:25 -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 C34F960C00; Mon, 26 Sep 2022 10:20:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D01C2C433D6; Mon, 26 Sep 2022 10:20:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187612; bh=VwNcnLR2/LA/fz5sKeoJt9Vzelm+E+Rs4audF7yv7p4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Wr9czHlyaqk7bdxkEIbpWUnet7dpOSP2w3hRvj45cY9fYW5b6I5S1AsP/UfmqhkVA a/g2LS9qrFCii/yqcoF/9CUEKPah8cq7rWnNjv9VtqqIC+qvzOE2mACsvs2uhukZTT EXVh0p1OZjB5MDjATVfKse7Zh4fooqmg0r8csd0M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , llvm@lists.linux.dev, Nathan Huckleberry , Nathan Chancellor , Heiko Stuebner , Sasha Levin Subject: [PATCH 4.19 55/58] drm/rockchip: Fix return type of cdn_dp_connector_mode_valid Date: Mon, 26 Sep 2022 12:12:14 +0200 Message-Id: <20220926100743.502824630@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.2 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 b0b9408f132623dc88e78adb5282f74e4b64bb57 ] The mode_valid field in drm_connector_helper_funcs is expected to be of type: enum drm_mode_status (* mode_valid) (struct drm_connector *connector, struct drm_display_mode *mode); The mismatched return type breaks forward edge kCFI since the underlying function definition does not match the function hook definition. The return type of cdn_dp_connector_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 Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20220913205555.155149-1-nhuck@google.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/rockchip/cdn-dp-core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c index 3feab563e50a..3f992e5a75c9 100644 --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c @@ -284,8 +284,9 @@ static int cdn_dp_connector_get_modes(struct drm_connector *connector) return ret; } -static int cdn_dp_connector_mode_valid(struct drm_connector *connector, - struct drm_display_mode *mode) +static enum drm_mode_status +cdn_dp_connector_mode_valid(struct drm_connector *connector, + struct drm_display_mode *mode) { struct cdn_dp_device *dp = connector_to_dp(connector); struct drm_display_info *display_info = &dp->connector.display_info; -- 2.35.1