Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp7230864rwn; Tue, 13 Sep 2022 16:37:51 -0700 (PDT) X-Google-Smtp-Source: AA6agR6TIKn9fhCIhE3gDJQBwn0vMUBluAERJHIm1lKtP4MvmSmlxlQ5ELhMvJf0/CWXvxqbfIEi X-Received: by 2002:a17:907:2c77:b0:77c:59aa:c011 with SMTP id ib23-20020a1709072c7700b0077c59aac011mr10702258ejc.724.1663112270868; Tue, 13 Sep 2022 16:37:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663112270; cv=none; d=google.com; s=arc-20160816; b=dhjsLHrycJAwxTHXRK2Y72zJ+eOE/PST8Y1LRZDgbPc/krcNUfuhZ5PxdNlBLe1BQy FZr76l68q6wqeJoamSReHIx45qERkAhepd+eqXWgHVO2ho+tVr3GHbrVMaAz7N8YzBb6 1v6hyc5w1Q4oASR7cgVr/WNGwXyMxS+wF0nJxyfOFIiPX4rMLQ1XX3RZm2A/XW+BQVDA d6kXIjdbmKvkcmPilrucwrxyIs0r/CiZCP7TOUELSrgfgm+KOi1zeyiqX51zla04yEbD bDGjdVS8wuK65Hh0glJk3YLtDmNlTYr+Gn9im3whdpsnTxMktA7ljgwY8Jurn/z2aKU5 kGnw== 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=rBC6U5xeT7XnhiOTl1gcsELfdVXgTLk12WP/NtM1FoI=; b=DguRp3uNTCguAmkboBfs54JwWNWspth3V3wHStaRBy5ikHZ8JGp4edFp9c5+kv/Gei upihgAlvx60nC6YFqaQ/qF807C4Asx81Zqllasgj5mfHBUKBX8Ef6a4bluVA+ywJ00Re pTyJugnV8xQjIGeQ2vlfvEnLeg8cZqDb2/UkPu2kdFDcdN7IkjZUfsBxyFxAfKaZDxnk lg6JUgx6c7DLu2G0Knzqj0/hKSvBjbXORGRash8TlNW31eW6REpUaGXjUxdxmaMdnaal en75WuDI+FMSYT+eG3BJbKUZF7RMwoNotpXXt1sapfk6tJS+2WZO7V+VIXLbVqZEQ3n6 tclw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TQRkj0WS; 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 dd21-20020a1709069b9500b0073083c63edcsi12142857ejc.306.2022.09.13.16.37.25; Tue, 13 Sep 2022 16:37:50 -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=TQRkj0WS; 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 S229603AbiIMXVs (ORCPT + 99 others); Tue, 13 Sep 2022 19:21:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229473AbiIMXVq (ORCPT ); Tue, 13 Sep 2022 19:21:46 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AC1CDC5 for ; Tue, 13 Sep 2022 16:21:45 -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 03466B8117E for ; Tue, 13 Sep 2022 23:21:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E8F33C433C1; Tue, 13 Sep 2022 23:21:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663111302; bh=2jbRZFM4qeN5YCFSazhxEpg8n/mzzbUnwtHXj+NPhSk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TQRkj0WSpOD0mkodtfH5ZqEdy/82uRTYQRN/rH8aQvU9JdxvkiPEvMDbEcu0YcI/x Sm7a/8lxbDZUY6jHhoUdjLKqqwDQLmSzPtdmmb7y04/0AvFDwK61h0r9Cyo9huyMyP mxeMYqixBSYDI3YEVGjBxXkCXbirCJOk+sRFU+Tgb4TybK5/ySljL8J8560paUxVdj MGJhmRgNVdoPwWyMQ6TccuVUgNwxQXOTrXen80+N+7HvzeOlTFQkVP4BrT+A5XP3Pv jYeW41xBnEplbpE0547ZjE+URTB+1Uc52wmkNy36ht5M7oaycoagHZlwir7rtgJBDq GUTrHn7V3rdCg== Date: Tue, 13 Sep 2022 16:21:40 -0700 From: Nathan Chancellor To: Nathan Huckleberry Cc: Dan Carpenter , llvm@lists.linux.dev, Hyun Kwon , Laurent Pinchart , David Airlie , Daniel Vetter , Michal Simek , Nick Desaulniers , Tom Rix , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm: xlnx: Fix return type of zynqmp_dp_connector_mode_valid Message-ID: References: <20220913205600.155172-1-nhuck@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220913205600.155172-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:56:00PM -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 zynqmp_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/xlnx/zynqmp_dp.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xlnx/zynqmp_dp.c > index d14612b34796..f571b08d23d3 100644 > --- a/drivers/gpu/drm/xlnx/zynqmp_dp.c > +++ b/drivers/gpu/drm/xlnx/zynqmp_dp.c > @@ -1352,8 +1352,9 @@ zynqmp_dp_connector_best_encoder(struct drm_connector *connector) > return &dp->encoder; > } > > -static int zynqmp_dp_connector_mode_valid(struct drm_connector *connector, > - struct drm_display_mode *mode) > +static enum drm_mode_status > +zynqmp_dp_connector_mode_valid(struct drm_connector *connector, > + struct drm_display_mode *mode) > { > struct zynqmp_dp *dp = connector_to_dp(connector); > u8 max_lanes = dp->link_config.max_lanes; > -- > 2.37.2.789.g6183377224-goog >