Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp2448242rwi; Tue, 1 Nov 2022 07:50:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5y8sNtcHVtjyj+7tw4/OS7ku7smUNvrPqwmwieKXn0KqtDXU0OV7hhmpnAv5l7hBmQJQ6g X-Received: by 2002:a17:902:cecf:b0:187:fd2:79c3 with SMTP id d15-20020a170902cecf00b001870fd279c3mr3463423plg.34.1667314239733; Tue, 01 Nov 2022 07:50:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667314239; cv=none; d=google.com; s=arc-20160816; b=beE2454zf28HhMBEBXn2lp6AxNuB9yKjjeKNbUzOzxpFUYAM9TYAkirwWTm0sOtxBz ++7qjWhTxmKnNTNGxzxJQgYg3kuNOo0tEeH9Y+IPDW8Q2PHdshmyQhBw9J8AJQqOEOtd py8N4kDzuGvayP7QP2PTr/MOTXVu64UDGFhvK5Vxejd6whASK16zj963dxr5WOqs+6sl BrBawKbvxm30Z6Nhse50cXsWgoutZbROcr5VtKKVNhc2wXL+1okVfwTY3QpfRr//WFW/ dAQ0rB7OENfHqjX+I4GNk+2b3oYyo+bUqGyybJNpkKZLJGU4nyCXEfSii6ilY8CxXFMh w1aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=z5kT2PBsHlqMQeKVnXuvDs1KNQ6dm/GwhEB9/qPDdEo=; b=VJQkCELi2AIZfA4hataaeeegSII03b14k7NHOHxFeSBFGYtimul2Sy8MHxt0aCYtMa ldvHvfn9k6lBdUhq+DTXbEdhN/wotHGB9RrfDta0nRYrGQkTXASAnyDC0LbKLCMxK8Zy C48pSTw9JuqozPgDXpt01bS0mav0MmBAvZMbkktbYyVmUNmIX9e9jUTfksgPZnCwiCK0 tWjGRtVi34E2GV2F12R9vwc2GAeBSj+rq23RJM7OQv6o2reO+VOgfd9s4Kn8ZH7wNNQt GCHjxTBe5CQ7bzSt5n45Bl+WH53ODdRgAkei45MylplQgGKOUw2uKuM6MW9dHx2TuWWI EOHg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j190-20020a6380c7000000b003fe34317ce2si11588483pgd.778.2022.11.01.07.50.25; Tue, 01 Nov 2022 07:50:39 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229763AbiKANmQ convert rfc822-to-8bit (ORCPT + 96 others); Tue, 1 Nov 2022 09:42:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbiKANmO (ORCPT ); Tue, 1 Nov 2022 09:42:14 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94B3F12AB8 for ; Tue, 1 Nov 2022 06:42:13 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oprWd-0007cK-Ar; Tue, 01 Nov 2022 14:41:55 +0100 Received: from [2a0a:edc0:0:900:1d::4e] (helo=lupine) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1oprWc-001ged-SZ; Tue, 01 Nov 2022 14:41:53 +0100 Received: from pza by lupine with local (Exim 4.94.2) (envelope-from ) id 1oprWb-0009dA-48; Tue, 01 Nov 2022 14:41:53 +0100 Message-ID: <0ddbe44d4247cf888bf2d8585b7b20d21a89b9b8.camel@pengutronix.de> Subject: Re: [PATCH] drm/imx: imx-tve: Fix return type of imx_tve_connector_mode_valid From: Philipp Zabel To: Nathan Huckleberry Cc: Dan Carpenter , llvm@lists.linux.dev, David Airlie , Daniel Vetter , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Nathan Chancellor , Nick Desaulniers , Tom Rix , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Date: Tue, 01 Nov 2022 14:41:53 +0100 In-Reply-To: <20220913205544.155106-1-nhuck@google.com> References: <20220913205544.155106-1-nhuck@google.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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 On Di, 2022-09-13 at 13:55 -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 imx_tve_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 > --- >  drivers/gpu/drm/imx/imx-tve.c | 5 +++-- >  1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/imx/imx-tve.c b/drivers/gpu/drm/imx/imx-tve.c > index 6b34fac3f73a..ab4d1c878fda 100644 > --- a/drivers/gpu/drm/imx/imx-tve.c > +++ b/drivers/gpu/drm/imx/imx-tve.c > @@ -218,8 +218,9 @@ static int imx_tve_connector_get_modes(struct drm_connector *connector) >   return ret; >  } >   > > -static int imx_tve_connector_mode_valid(struct drm_connector *connector, > - struct drm_display_mode *mode) > +static enum drm_mode_status > +imx_tve_connector_mode_valid(struct drm_connector *connector, > + struct drm_display_mode *mode) >  { >   struct imx_tve *tve = con_to_tve(connector); >   unsigned long rate; Reviewed-by: Philipp Zabel and pushed to drm-misc-fixes. regards Philipp