diff options
author | Stefan Wahren <stefan.wahren@i2se.com> | 2017-01-08 18:15:17 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-10 17:42:46 +0100 |
commit | f306ed07d1b5ac2a97173db3a05b3acb4203d251 (patch) | |
tree | b996d735f92e090404b6987c3000b106c1c56151 | |
parent | 946d61ace1f42661c3b85c303a34469bdec770cd (diff) |
staging: vc04_services: Fix indentation
This should fix the indentation issues found by checkpatch.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 files changed, 52 insertions, 50 deletions
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c index 1615c132573c..971c26c77fac 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c @@ -61,8 +61,8 @@ #define BELL2 0x08 typedef struct vchiq_2835_state_struct { - int inited; - VCHIQ_ARM_STATE_T arm_state; + int inited; + VCHIQ_ARM_STATE_T arm_state; } VCHIQ_2835_ARM_STATE_T; struct vchiq_pagelist_info { @@ -195,31 +195,31 @@ int vchiq_platform_init(struct platform_device *pdev, VCHIQ_STATE_T *state) vchiq_call_connected_callbacks(); - return 0; + return 0; } VCHIQ_STATUS_T vchiq_platform_init_state(VCHIQ_STATE_T *state) { - VCHIQ_STATUS_T status = VCHIQ_SUCCESS; - state->platform_state = kzalloc(sizeof(VCHIQ_2835_ARM_STATE_T), GFP_KERNEL); - ((VCHIQ_2835_ARM_STATE_T*)state->platform_state)->inited = 1; - status = vchiq_arm_init_state(state, &((VCHIQ_2835_ARM_STATE_T*)state->platform_state)->arm_state); - if(status != VCHIQ_SUCCESS) - { - ((VCHIQ_2835_ARM_STATE_T*)state->platform_state)->inited = 0; - } - return status; + VCHIQ_STATUS_T status = VCHIQ_SUCCESS; + state->platform_state = kzalloc(sizeof(VCHIQ_2835_ARM_STATE_T), GFP_KERNEL); + ((VCHIQ_2835_ARM_STATE_T*)state->platform_state)->inited = 1; + status = vchiq_arm_init_state(state, &((VCHIQ_2835_ARM_STATE_T*)state->platform_state)->arm_state); + if(status != VCHIQ_SUCCESS) + { + ((VCHIQ_2835_ARM_STATE_T*)state->platform_state)->inited = 0; + } + return status; } VCHIQ_ARM_STATE_T* vchiq_platform_get_arm_state(VCHIQ_STATE_T *state) { - if(!((VCHIQ_2835_ARM_STATE_T*)state->platform_state)->inited) - { - BUG(); - } - return &((VCHIQ_2835_ARM_STATE_T*)state->platform_state)->arm_state; + if(!((VCHIQ_2835_ARM_STATE_T*)state->platform_state)->inited) + { + BUG(); + } + return &((VCHIQ_2835_ARM_STATE_T*)state->platform_state)->arm_state; } void @@ -295,13 +295,13 @@ vchiq_dump_platform_state(void *dump_context) VCHIQ_STATUS_T vchiq_platform_suspend(VCHIQ_STATE_T *state) { - return VCHIQ_ERROR; + return VCHIQ_ERROR; } VCHIQ_STATUS_T vchiq_platform_resume(VCHIQ_STATE_T *state) { - return VCHIQ_SUCCESS; + return VCHIQ_SUCCESS; } void @@ -317,13 +317,13 @@ vchiq_platform_resumed(VCHIQ_STATE_T *state) int vchiq_platform_videocore_wanted(VCHIQ_STATE_T* state) { - return 1; // autosuspend not supported - videocore always wanted + return 1; // autosuspend not supported - videocore always wanted } int vchiq_platform_use_suspend_timer(void) { - return 0; + return 0; } void vchiq_dump_platform_use_state(VCHIQ_STATE_T *state) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index dd9590ba56f6..bfa47d023368 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -665,7 +665,7 @@ vchiq_ioctl(struct file *file, unsigned int cmd, unsigned long arg) USER_SERVICE_T *user_service = (USER_SERVICE_T *)service->base.userdata; /* close_pending is false on first entry, and when the - wait in vchiq_close_service has been interrupted. */ + wait in vchiq_close_service has been interrupted. */ if (!user_service->close_pending) { status = vchiq_close_service(service->handle); if (status != VCHIQ_SUCCESS) @@ -691,7 +691,7 @@ vchiq_ioctl(struct file *file, unsigned int cmd, unsigned long arg) USER_SERVICE_T *user_service = (USER_SERVICE_T *)service->base.userdata; /* close_pending is false on first entry, and when the - wait in vchiq_close_service has been interrupted. */ + wait in vchiq_close_service has been interrupted. */ if (!user_service->close_pending) { status = vchiq_remove_service(service->handle); if (status != VCHIQ_SUCCESS) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h index 9740e1afbc9d..bfbd81d9db33 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h @@ -154,7 +154,7 @@ vchiq_check_resume(VCHIQ_STATE_T *state); extern void vchiq_check_suspend(VCHIQ_STATE_T *state); - VCHIQ_STATUS_T +VCHIQ_STATUS_T vchiq_use_service(VCHIQ_SERVICE_HANDLE_T handle); extern VCHIQ_STATUS_T diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c index f4eab6297f0e..fcdfd662d360 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -3507,20 +3507,20 @@ release_message_sync(VCHIQ_STATE_T *state, VCHIQ_HEADER_T *header) VCHIQ_STATUS_T vchiq_get_peer_version(VCHIQ_SERVICE_HANDLE_T handle, short *peer_version) { - VCHIQ_STATUS_T status = VCHIQ_ERROR; - VCHIQ_SERVICE_T *service = find_service_by_handle(handle); + VCHIQ_STATUS_T status = VCHIQ_ERROR; + VCHIQ_SERVICE_T *service = find_service_by_handle(handle); - if (!service || - (vchiq_check_service(service) != VCHIQ_SUCCESS) || - !peer_version) - goto exit; - *peer_version = service->peer_version; - status = VCHIQ_SUCCESS; + if (!service || + (vchiq_check_service(service) != VCHIQ_SUCCESS) || + !peer_version) + goto exit; + *peer_version = service->peer_version; + status = VCHIQ_SUCCESS; exit: - if (service) - unlock_service(service); - return status; + if (service) + unlock_service(service); + return status; } VCHIQ_STATUS_T @@ -3814,7 +3814,7 @@ vchiq_dump_service_state(void *dump_context, VCHIQ_SERVICE_T *service) service->stats.bulk_stalls, service->stats.bulk_aborted_count, service->stats.error_count); - } + } } vchiq_dump(dump_context, buf, len + 1); diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c index d21b67c3af6f..53c975ce3f6f 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c @@ -75,13 +75,13 @@ VCHIQ_STATUS_T vchiq_initialise(VCHIQ_INSTANCE_T *instance_out) VCHIQ_STATUS_T status = VCHIQ_ERROR; VCHIQ_STATE_T *state; VCHIQ_INSTANCE_T instance = NULL; - int i; + int i; vchiq_log_trace(vchiq_core_log_level, "%s called", __func__); - /* VideoCore may not be ready due to boot up timing. - It may never be ready if kernel and firmware are mismatched, so don't block forever. */ - for (i=0; i<VCHIQ_INIT_RETRIES; i++) { + /* VideoCore may not be ready due to boot up timing. + It may never be ready if kernel and firmware are mismatched, so don't block forever. */ + for (i=0; i<VCHIQ_INIT_RETRIES; i++) { state = vchiq_get_state(); if (state) break; diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c index d9771394a041..388255f0dec9 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c @@ -527,7 +527,7 @@ static VCHIQ_STATUS_T shim_callback(VCHIQ_REASON_T reason, SHIM_SERVICE_T *service = (SHIM_SERVICE_T *)VCHIQ_GET_SERVICE_USERDATA(handle); - if (!service->callback) + if (!service->callback) goto release; switch (reason) { @@ -577,7 +577,7 @@ static VCHIQ_STATUS_T shim_callback(VCHIQ_REASON_T reason, } release: - vchiq_release_message(service->handle, header); + vchiq_release_message(service->handle, header); done: return VCHIQ_SUCCESS; } @@ -741,14 +741,16 @@ EXPORT_SYMBOL(vchi_service_set_option); int32_t vchi_get_peer_version( const VCHI_SERVICE_HANDLE_T handle, short *peer_version ) { - int32_t ret = -1; - SHIM_SERVICE_T *service = (SHIM_SERVICE_T *)handle; - if(service) - { - VCHIQ_STATUS_T status = vchiq_get_peer_version(service->handle, peer_version); - ret = vchiq_status_to_vchi( status ); - } - return ret; + int32_t ret = -1; + SHIM_SERVICE_T *service = (SHIM_SERVICE_T *)handle; + if(service) + { + VCHIQ_STATUS_T status; + + status = vchiq_get_peer_version(service->handle, peer_version); + ret = vchiq_status_to_vchi( status ); + } + return ret; } EXPORT_SYMBOL(vchi_get_peer_version); |