aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
diff options
context:
space:
mode:
authorMarcelo Diop-Gonzalez <marcgonzalez@google.com>2019-11-20 15:21:02 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-22 11:40:31 +0100
commit0f6f8749872e7be6c083dc845bf4d45a7018b79c (patch)
tree28cbd024ac053389c9d674cb58de1e28ecfcd9a9 /drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
parentstaging: vchiq: Refactor indentation in vchiq_dump_* functions (diff)
downloadlinux-dev-0f6f8749872e7be6c083dc845bf4d45a7018b79c.tar.xz
linux-dev-0f6f8749872e7be6c083dc845bf4d45a7018b79c.zip
staging: vchiq: Have vchiq_dump_* functions return an error code
These functions currently modify the struct dump_context passed to them, and set context->actual to -EFAULT in case of error. The issue is that this is never returned to the user (except accidentally when things align so that that happens). So, have these functions return 0 on success and the appropriate error code otherwise, and return nonzero errors to the user. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Marcelo Diop-Gonzalez <marcgonzalez@google.com> Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20191120202102.249121-5-marcgonzalez@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h')
-rw-r--r--drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
index 419bcdd165b4..c31f953a9986 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
@@ -526,10 +526,10 @@ vchiq_bulk_transfer(unsigned int handle, void *offset, int size,
void *userdata, enum vchiq_bulk_mode mode,
enum vchiq_bulk_dir dir);
-extern void
+extern int
vchiq_dump_state(void *dump_context, struct vchiq_state *state);
-extern void
+extern int
vchiq_dump_service_state(void *dump_context, struct vchiq_service *service);
extern void
@@ -602,16 +602,16 @@ vchiq_platform_resume(struct vchiq_state *state);
extern void
vchiq_platform_resumed(struct vchiq_state *state);
-extern void
+extern int
vchiq_dump(void *dump_context, const char *str, int len);
-extern void
+extern int
vchiq_dump_platform_state(void *dump_context);
-extern void
+extern int
vchiq_dump_platform_instances(void *dump_context);
-extern void
+extern int
vchiq_dump_platform_service_state(void *dump_context,
struct vchiq_service *service);