* [Nouveau] [PATCH -resend] drm/nouveau/kms/nv50- (gcc13): fix nv50_wndw_new_ prototype
@ 2023-01-16 10:06 Jiri Slaby (SUSE)
0 siblings, 0 replies; 3+ messages in thread
From: Jiri Slaby (SUSE) @ 2023-01-16 10:06 UTC (permalink / raw)
To: airlied
Cc: Jiri Slaby (SUSE),
linux-kernel, dri-devel, Ben Skeggs, Daniel Vetter, nouveau,
Martin Liska
gcc-13 warns about mismatching types for enums. That revealed switched
arguments of nv50_wndw_new_():
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 **)'
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 **)'
It can be barely visible, but the declaration says about the parameters
in the middle:
enum nv50_disp_interlock_type,
u32 interlock_data,
u32 heads,
While the definition states differently:
u32 heads,
enum nv50_disp_interlock_type interlock_type,
u32 interlock_data,
Unify/fix the declaration to match the definition.
Cc: Martin Liska <mliska@suse.cz>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Karol Herbst <kherbst@redhat.com>
Cc: Lyude Paul <lyude@redhat.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Cc: nouveau@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
---
Notes:
[v2] switch to uint instead of to enum
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/nouveau/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 {
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,
--
2.39.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Nouveau] [PATCH -resend] drm/nouveau/kms/nv50- (gcc13): fix nv50_wndw_new_ prototype
2023-01-16 10:07 Jiri Slaby (SUSE)
@ 2023-01-16 11:34 ` Karol Herbst
0 siblings, 0 replies; 3+ messages in thread
From: Karol Herbst @ 2023-01-16 11:34 UTC (permalink / raw)
To: Jiri Slaby (SUSE)
Cc: Martin Liska, linux-kernel, dri-devel, Ben Skeggs, Daniel Vetter,
nouveau, airlied
On Mon, Jan 16, 2023 at 11:07 AM Jiri Slaby (SUSE) <jirislaby@kernel.org> wrote:
>
> gcc-13 warns about mismatching types for enums. That revealed switched
> arguments of nv50_wndw_new_():
> 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 **)'
> 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 **)'
>
> It can be barely visible, but the declaration says about the parameters
> in the middle:
> enum nv50_disp_interlock_type,
> u32 interlock_data,
> u32 heads,
>
> While the definition states differently:
> u32 heads,
> enum nv50_disp_interlock_type interlock_type,
> u32 interlock_data,
>
> Unify/fix the declaration to match the definition.
>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
will merge it into drm-misc soon
> Cc: Martin Liska <mliska@suse.cz>
> Cc: Ben Skeggs <bskeggs@redhat.com>
> Cc: Karol Herbst <kherbst@redhat.com>
> Cc: Lyude Paul <lyude@redhat.com>
> Cc: David Airlie <airlied@gmail.com>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: dri-devel@lists.freedesktop.org
> Cc: nouveau@lists.freedesktop.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
> ---
>
> Notes:
> [v2] switch to uint instead of to enum
>
> 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/nouveau/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 {
>
> 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,
> --
> 2.39.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Nouveau] [PATCH -resend] drm/nouveau/kms/nv50- (gcc13): fix nv50_wndw_new_ prototype
@ 2023-01-16 10:07 Jiri Slaby (SUSE)
2023-01-16 11:34 ` Karol Herbst
0 siblings, 1 reply; 3+ messages in thread
From: Jiri Slaby (SUSE) @ 2023-01-16 10:07 UTC (permalink / raw)
To: airlied
Cc: Jiri Slaby (SUSE),
linux-kernel, dri-devel, Ben Skeggs, Daniel Vetter, nouveau,
Martin Liska
gcc-13 warns about mismatching types for enums. That revealed switched
arguments of nv50_wndw_new_():
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 **)'
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 **)'
It can be barely visible, but the declaration says about the parameters
in the middle:
enum nv50_disp_interlock_type,
u32 interlock_data,
u32 heads,
While the definition states differently:
u32 heads,
enum nv50_disp_interlock_type interlock_type,
u32 interlock_data,
Unify/fix the declaration to match the definition.
Cc: Martin Liska <mliska@suse.cz>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Karol Herbst <kherbst@redhat.com>
Cc: Lyude Paul <lyude@redhat.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Cc: nouveau@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
---
Notes:
[v2] switch to uint instead of to enum
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/nouveau/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 {
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,
--
2.39.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-05-04 12:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-16 10:06 [Nouveau] [PATCH -resend] drm/nouveau/kms/nv50- (gcc13): fix nv50_wndw_new_ prototype Jiri Slaby (SUSE)
2023-01-16 10:07 Jiri Slaby (SUSE)
2023-01-16 11:34 ` Karol Herbst
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).