Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp7247935rwn; Tue, 13 Sep 2022 17:02:18 -0700 (PDT) X-Google-Smtp-Source: AA6agR40RIKtAautgTqMA/a8lBDCW0QEFaUeR0ui4Gj7EwFhJN6/mj9VebMinXdJEepHNLQw+WLO X-Received: by 2002:a63:4c50:0:b0:429:983d:22f1 with SMTP id m16-20020a634c50000000b00429983d22f1mr30063566pgl.213.1663113737696; Tue, 13 Sep 2022 17:02:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663113737; cv=none; d=google.com; s=arc-20160816; b=FKmzkx5n1BMIP3hcGTADuvwHICIQIemRXcqltP0aksF4UpIwEKEJaZ5AlxED+2ygc2 YQox1duYfO9vpQbyQ83IorTjbF6RbQeUcdDHSuTVgmga3QIjmBm9iXhsQGHejXyHKV9/ H2eFjQBX5j13ennXkHd+OuLyUo0QQc7M8cW+vAFeBQ/s63+3IOjG+ePEJLS5mR84JGps 0x7D6qqWwHPmU1kekqMItFw9dx5fV9f8wS7+ZiK1Bs+Ire0SQieaY/yqQ6x8TE0/oTkJ +VSz6KcKc+yqF5xgf6V0ENxpI/M1zip/pAgMBzui9dheYyg/w2uk8Bjq7RXd1aa6aePw TDuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2nE8daXmgiY/4I1mivnmKlVjhGhaNow1pWasLmftTO8=; b=WFhem0WLbDPGRkPFQuEW6DGQDRtAfVLsT50r55SrVyhnBdoQCtzSeLuO8Qsol+QQao NaSXUkghhEc+Q1fHjHsOjZ2tCJX6sW1wdpVlpNpviqG2bBpqZPOYIpNntbXX1ZX2qAzM 5irirWZaGxVZJOzrIwKrcHGFUOZ3G2e0yCX2zBU83CebRqE9IUGsf9DhOpVofwQtMZ1G hKo6HUs46IIwLCnrCxkQA30Jewwu+RBnW6QkU+Y7wbTD27LTKAXfYW0ekeyNjAabOdz1 /QX76wtMwQqYHUIY1teKZUd8s9ZTTMvNP+dLGf438h2/ZUAG6whsQb9fubpi30UBfyNw FQ1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RaG8wFr0; 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 oc7-20020a17090b1c0700b001fdfc3ea521si3245493pjb.143.2022.09.13.17.02.05; Tue, 13 Sep 2022 17:02:17 -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=RaG8wFr0; 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 S229706AbiIMXUs (ORCPT + 99 others); Tue, 13 Sep 2022 19:20:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229789AbiIMXUf (ORCPT ); Tue, 13 Sep 2022 19:20:35 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C45E27DE6 for ; Tue, 13 Sep 2022 16:20:33 -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 ams.source.kernel.org (Postfix) with ESMTPS id 8EF2EB81178 for ; Tue, 13 Sep 2022 23:20:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90208C433D6; Tue, 13 Sep 2022 23:20:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663111230; bh=OkP3AB4BNr1hUTAE2knTD/oF21cHVgadoi0HWaJ0SLU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RaG8wFr0Psffi9JspzPru/GXaGT31Tfy0p63bSRRqfCwuyyhTBkvV3TfOMHLio4Yh FONjnotfc5J+UDhI/D8W4zMvyvLL4yDn62ng5yothHBqic01UQAPxbaFbuwhTsNugx sbWkYYeNEbC5wgzXf/TVe+jVIIiOnkcUYSe7ZJIbplTSlV3F/yuiO1a1bphlDTyooE DoNtdvWoQwzV+wbBI8K9lavbO4IDr6F0G//6qdG1L7W6ORdWS1+wXSECCeUtiQ93PT g1m3sqxpQdSrYVhd/nJattv5U4sARnRjlPFalr6A2+u4eh/N/zZG13j5+lSA5PuLIA SznubJmBFyvKA== Date: Tue, 13 Sep 2022 16:20:27 -0700 From: Nathan Chancellor To: Nathan Huckleberry Cc: Dan Carpenter , llvm@lists.linux.dev, Sandy Huang , Heiko =?iso-8859-1?Q?St=FCbner?= , David Airlie , Daniel Vetter , Nick Desaulniers , Tom Rix , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm/rockchip: Fix return type of cdn_dp_connector_mode_valid Message-ID: References: <20220913205555.155149-1-nhuck@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220913205555.155149-1-nhuck@google.com> 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,T_SCC_BODY_TEXT_LINE 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 On Tue, Sep 13, 2022 at 01:55:55PM -0700, Nathan Huckleberry wrote: > 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 > --- > 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 c204e9b95c1f..518ee13b1d6f 100644 > --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c > +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c > @@ -283,8 +283,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.37.2.789.g6183377224-goog > >