From nobody Mon Sep 15 00:02:08 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E63E6C3DA78 for ; Tue, 17 Jan 2023 16:39:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232553AbjAQQjk (ORCPT ); Tue, 17 Jan 2023 11:39:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233386AbjAQQjQ (ORCPT ); Tue, 17 Jan 2023 11:39:16 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BAC745216 for ; Tue, 17 Jan 2023 08:39:14 -0800 (PST) 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 669F8B81909 for ; Tue, 17 Jan 2023 16:39:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9D5FC433D2; Tue, 17 Jan 2023 16:39:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673973552; bh=ySEJMU3KFh+SZ1kFanOfIpyzm2CVjH6uK0xDkFyQROU=; h=From:To:Cc:Subject:Date:From; b=eW7zq9g1aG1mp/LEKIMRBrKcu7V83Wp32f8TQWHkG7X1GY8T/FqSazEJLctqAuZN2 7BqfQEtSyZhKlXvqJDAyvO8qeHGoS8/sbDOoEQJWRe4WhtinlYRUC+FTkBkNfUVFnX pMnMkh/cwVDHf2o2hJikIYAflfIeZfxuYlYPEwEDV6/jUlWFMV2gyE7f+HJspVLx72 /kU/EMUzt51+eW92mKUCN5mMRcDyCgpbAUBHHl3213CZhlIwGupRg0jCXZUWIuUur/ uA75N4S6APQJjsSCptU54CwkzuPmFgcmr6IRt7+9MTOv7C2h7T17ot3l4fVf/hX6k7 VSISGdV7hoSCg== From: Arnd Bergmann To: Ben Skeggs , Karol Herbst , Lyude Paul , David Airlie , Daniel Vetter Cc: Arnd Bergmann , Dave Airlie , dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] nouveau: fix nv50_wndw_new_() prototype Date: Tue, 17 Jan 2023 17:39:00 +0100 Message-Id: <20230117163907.1081223-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann gcc-13 complains about a mismatched function declaration: drivers/gpu/drm/nouveau/dispnv50/wndw.c:696:1: error: conflicting types for= 'nv50_wndw_new_' due to enum/integer mismatch; have 'int(const struct nv50= _wndw_func *, struct drm_device *, enum drm_plane_type, const char *, int,= const u32 *, u32, enum nv50_disp_interlock_type, u32, struct nv50_wndw= **)' {aka 'int(const struct nv50_wndw_func *, struct drm_device *, enum dr= m_plane_type, const char *, int, const unsigned int *, unsigned int, enu= m nv50_disp_interlock_type, unsigned int, struct nv50_wndw **)'} [-Werror= =3Denum-int-mismatch] 696 | nv50_wndw_new_(const struct nv50_wndw_func *func, struct drm_device= *dev, | ^~~~~~~~~~~~~~ In file included from drivers/gpu/drm/nouveau/dispnv50/wndw.c:22: drivers/gpu/drm/nouveau/dispnv50/wndw.h:36:5: note: previous declaration of= 'nv50_wndw_new_' with type 'int(const struct nv50_wndw_func *, struct drm_= device *, enum drm_plane_type, const char *, int, const u32 *, enum nv50_= disp_interlock_type, u32, u32, struct nv50_wndw **)' {aka 'int(const str= uct nv50_wndw_func *, struct drm_device *, enum drm_plane_type, const char= *, int, const unsigned int *, enum nv50_disp_interlock_type, unsigned in= t, unsigned int, struct nv50_wndw **)'} 36 | int nv50_wndw_new_(const struct nv50_wndw_func *, struct drm_device= *, | ^~~~~~~~~~~~~~ All the callers are ok, just the header file mixes up the order of the arguments. Fixes: 53e0a3e70de6 ("drm/nouveau/kms/nv50-: simplify tracking of channel i= nterlocks") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/nouveau/dispnv50/wndw.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndw.h b/drivers/gpu/drm/nouv= eau/dispnv50/wndw.h index 591c852f326b..76a6ae5d5652 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/wndw.h +++ b/drivers/gpu/drm/nouveau/dispnv50/wndw.h @@ -35,8 +35,9 @@ struct nv50_wndw { =20 int nv50_wndw_new_(const struct nv50_wndw_func *, struct drm_device *, enum drm_plane_type, const char *name, int index, - const u32 *format, enum nv50_disp_interlock_type, - u32 interlock_data, u32 heads, struct nv50_wndw **); + const u32 *format, u32 heads, + enum nv50_disp_interlock_type, u32 interlock_data, + struct nv50_wndw **); void nv50_wndw_flush_set(struct nv50_wndw *, u32 *interlock, struct nv50_wndw_atom *); void nv50_wndw_flush_clr(struct nv50_wndw *, u32 *interlock, bool flush, --=20 2.39.0