staging: vchiq_arm: fix enum vchiq_status return types
Subsystems (2)
PATCH 1/1 staging: vchiq_arm: fix enum vchiq_status return types
From: Arnd Bergmann <[email protected]>
gcc-13 notices a type mismatch between function declaration and definition for a few functions that have been converted from returning vchiq specific status values to regular error codes:
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:662:5: error: conflicting types for 'vchiq_initialise' due to enum/integer mismatch; have 'int(struct vchiq_instance **)' [-Werror=enum-int-mismatch] drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1411:1: error: conflicting types for 'vchiq_use_internal' due to enum/integer mismatch; have 'int(struct vchiq_state *, struct vchiq_service *, enum USE_TYPE_E)' [-Werror=enum-int-mismatch] drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1468:1: error: conflicting types for 'vchiq_release_internal' due to enum/integer mismatch; have 'int(struct vchiq_state *, struct vchiq_service *)' [-Werror=enum-int-mismatch]
Change the declarations to match the actual function definition.
--- .../staging/vc04_services/include/linux/raspberrypi/vchiq.h | 2 +- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/vc04_services/include/linux/raspberrypi/vchiq.h +1 -1
@@ -86,7 +86,7 @@ struct vchiq_service_params_kernel {struct vchiq_instance ; -extern enum vchiq_status vchiq_initialise (struct vchiq_instance **pinstance); +extern int vchiq_initialise (struct vchiq_instance **pinstance);extern enum vchiq_status vchiq_shutdown (struct vchiq_instance *instance);extern enum vchiq_status vchiq_connect (struct vchiq_instance *instance); extern enum vchiq_status vchiq_open_service(struct vchiq_instance *instance,
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h +2 -2
@@ -100,10 +100,10 @@ vchiq_dump_platform_use_state(struct vchiq_state *state);extern void vchiq_dump_service_use_state (struct vchiq_state *state); -extern enum vchiq_status +extern int vchiq_use_internal (struct vchiq_state *state,struct vchiq_service *service,enum USE_TYPE_E use_type); -extern enum vchiq_status +extern int vchiq_release_internal (struct vchiq_state *state,struct vchiq_service *service);
Signature · 1 line
2.39.0
Hi Arnd,
Am 17.01.23 um 17:39 schrieb Arnd Bergmann:
Quoted 7 lines
From: Arnd Bergmann <[email protected]>
gcc-13 notices a type mismatch between function declaration and definition for a few functions that have been converted from returning vchiq specific status values to regular error codes:
Quoted 8 lines
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:662:5: error: conflicting types for 'vchiq_initialise' due to enum/integer mismatch; have 'int(struct vchiq_instance **)' [-Werror=enum-int-mismatch]drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1411:1: error: conflicting types for 'vchiq_use_internal' due to enum/integer mismatch; have 'int(struct vchiq_state *, struct vchiq_service *, enum USE_TYPE_E)' [-Werror=enum-int-mismatch]drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1468:1: error: conflicting types for 'vchiq_release_internal' due to enum/integer mismatch; have 'int(struct vchiq_state *, struct vchiq_service *)' [-Werror=enum-int-mismatch]Change the declarations to match the actual function definition.
Fixes a9fbd828be7f ("staging: vchiq_arm: drop enum vchiq_status from vchiq_*_internal")Signed-off-by Arnd Bergmann <[email protected]>
thanks for fixing this.
Greg applied a series [1] from Umang which completely removes this enum completely. This series has been applied to today and will likely cause a conflict tomorrow in linux-next.
[1] - https://lore.kernel.org/linux-arm-kernel/[email protected]/T/
Quoted 35 lines
--- .../staging/vc04_services/include/linux/raspberrypi/vchiq.h | 2 +- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)drivers/staging/vc04_services/include/linux/raspberrypi/vchiq.h +1
-1@@ -86,7 +86,7 @@ struct vchiq_service_params_kernel {struct vchiq_instance ; -extern enum vchiq_status vchiq_initialise (struct vchiq_instance **pinstance); +extern int vchiq_initialise (struct vchiq_instance **pinstance);extern enum vchiq_status vchiq_shutdown (struct vchiq_instance *instance);extern enum vchiq_status vchiq_connect (struct vchiq_instance *instance); extern enum vchiq_status vchiq_open_service(struct vchiq_instance *instance,drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h +2
-2@@ -100,10 +100,10 @@ vchiq_dump_platform_use_state(struct vchiq_state *state);extern void vchiq_dump_service_use_state (struct vchiq_state *state); -extern enum vchiq_status +extern int vchiq_use_internal (struct vchiq_state *state,struct vchiq_service *service,enum USE_TYPE_E use_type); -extern enum vchiq_status +extern int vchiq_release_internal (struct vchiq_state *state,struct vchiq_service *service);
Hi,
Quoted 14 lines · Stefan Wahren
Hi Arnd,
Am 17.01.23 um 17:39 schrieb Arnd Bergmann:
Quoted 11 lines
From: Arnd Bergmann <[email protected]>
gcc-13 notices a type mismatch between function declaration and definition for a few functions that have been converted from returning vchiq specific status values to regular error codes:
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:662:5: error: conflicting types for 'vchiq_initialise' due to enum/integer mismatch; have 'int(struct vchiq_instance **)' [-Werror=enum-int-mismatch]drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1411:1: error: conflicting types for 'vchiq_use_internal' due to enum/integer mismatch; have 'int(struct vchiq_state *, struct vchiq_service *, enum USE_TYPE_E)' [-Werror=enum-int-mismatch]drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1468:1: error: conflicting types for 'vchiq_release_internal' due to enum/integer mismatch; have 'int(struct vchiq_state *, struct vchiq_service *)' [-Werror=enum-int-mismatch]
Quoted 8 lines
Quoted 4 lines
Change the declarations to match the actual function definition.
Fixes a9fbd828be7f ("staging: vchiq_arm: drop enum vchiq_status from vchiq_*_internal")Signed-off-by Arnd Bergmann <[email protected]>thanks for fixing this.
Greg applied a series [1] from Umang which completely removes this enum completely. This series has been applied to today and will likely cause a conflict tomorrow in linux-next.
Yes, the series was applied today.
Has this patch (By Arnd) already applied to linux-next? I am not sure if I understand where the conflict will get originated ..
Quoted 35 lines
[1] - https://lore.kernel.org/linux-arm-kernel/[email protected]/T/
Quoted 32 lines
---
.../staging/vc04_services/include/linux/raspberrypi/vchiq.h| 2 +-drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h| 4 ++--2 files changed, 3 insertions(+), 3 deletions(-)drivers/staging/vc04_services/include/linux/raspberrypi/vchiq.h +1
-0@@ -86,7 +86,7 @@ struct vchiq_service_params_kernel { struct vchiq_instance; -extern enum vchiq_status vchiq_initialise(struct vchiq_instance **pinstance); +extern int vchiq_initialise (struct vchiq_instance **pinstance); extern enum vchiq_status vchiq_shutdown(struct vchiq_instance *instance); extern enum vchiq_status vchiq_connect(struct vchiq_instance *instance); extern enum vchiq_status vchiq_open_service(struct vchiq_instance *instance,drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h +0
-0@@ -100,10 +100,10 @@ vchiq_dump_platform_use_state(struct vchiq_state *state);extern void
vchiq_dump_service_use_state(struct vchiq_state *state); -extern enumvchiq_status
+extern int
vchiq_use_internal(struct vchiq_state *state, struct vchiq_service *service, enum USE_TYPE_E use_type);drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h +1
-1-extern enum vchiq_status +extern int
vchiq_release_internal(struct vchiq_state *state, struct vchiq_service *service);
Greg Kroah-Hartman
maintainerQuoted 34 lines · Umang Jain
Hi,
Quoted 31 lines · Stefan Wahren
Hi Arnd,
Am 17.01.23 um 17:39 schrieb Arnd Bergmann:
Quoted 20 lines
From: Arnd Bergmann <[email protected]>
gcc-13 notices a type mismatch between function declaration and definition for a few functions that have been converted from returning vchiq specific status values to regular error codes:
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:662:5:
error: conflicting types for 'vchiq_initialise' due to enum/integer mismatch; have 'int(struct vchiq_instance **)' [-Werror=enum-int-mismatch]drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1411:1:
error: conflicting types for 'vchiq_use_internal' due to enum/integer mismatch; have 'int(struct vchiq_state *, struct vchiq_service *, enum USE_TYPE_E)' [-Werror=enum-int-mismatch]drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1468:1:
error: conflicting types for 'vchiq_release_internal' due to enum/integer mismatch; have 'int(struct vchiq_state *, struct vchiq_service *)' [-Werror=enum-int-mismatch]Quoted 5 lines
Change the declarations to match the actual function definition.
Fixes a9fbd828be7f ("staging: vchiq_arm: drop enum vchiq_statusfrom vchiq_*_internal")
Signed-off-by Arnd Bergmann <[email protected]>thanks for fixing this.
Quoted 8 lines
Quoted 3 lines
Greg applied a series [1] from Umang which completely removes this enum completely. This series has been applied to today and will likely cause a conflict tomorrow in linux-next.
Yes, the series was applied today.
Has this patch (By Arnd) already applied to linux-next? I am not sure if I understand where the conflict will get originated ..
I've applied Arnd's patch to my staging-linus branch and it will go there for 6.2-final. I'll handle the merge into my other branch when that happens.
thanks,
greg k-h