Commit 07f9ef04 authored by Sanjana Sanikommu's avatar Sanjana Sanikommu Committed by Greg Kroah-Hartman

staging: vc04_services: Remove unnecessary casts.

Explicit type casting of variable, with same type as
that of variable, is not required.
Issue found using coccinelle.
Signed-off-by: default avatarSanjana Sanikommu <sanjana99reddy99@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d34709c6
...@@ -1877,7 +1877,7 @@ parse_rx_slots(struct vchiq_state *state) ...@@ -1877,7 +1877,7 @@ parse_rx_slots(struct vchiq_state *state)
static int static int
slot_handler_func(void *v) slot_handler_func(void *v)
{ {
struct vchiq_state *state = (struct vchiq_state *)v; struct vchiq_state *state = v;
struct vchiq_shared_state *local = state->local; struct vchiq_shared_state *local = state->local;
DEBUG_INITIALISE(local) DEBUG_INITIALISE(local)
...@@ -1961,7 +1961,7 @@ slot_handler_func(void *v) ...@@ -1961,7 +1961,7 @@ slot_handler_func(void *v)
static int static int
recycle_func(void *v) recycle_func(void *v)
{ {
struct vchiq_state *state = (struct vchiq_state *)v; struct vchiq_state *state = v;
struct vchiq_shared_state *local = state->local; struct vchiq_shared_state *local = state->local;
BITSET_T *found; BITSET_T *found;
size_t length; size_t length;
...@@ -1985,7 +1985,7 @@ recycle_func(void *v) ...@@ -1985,7 +1985,7 @@ recycle_func(void *v)
static int static int
sync_func(void *v) sync_func(void *v)
{ {
struct vchiq_state *state = (struct vchiq_state *)v; struct vchiq_state *state = v;
struct vchiq_shared_state *local = state->local; struct vchiq_shared_state *local = state->local;
struct vchiq_header *header = struct vchiq_header *header =
(struct vchiq_header *)SLOT_DATA_FROM_INDEX(state, (struct vchiq_header *)SLOT_DATA_FROM_INDEX(state,
...@@ -2111,7 +2111,7 @@ vchiq_init_slots(void *mem_base, int mem_size) ...@@ -2111,7 +2111,7 @@ vchiq_init_slots(void *mem_base, int mem_size)
int mem_align = int mem_align =
(int)((VCHIQ_SLOT_SIZE - (long)mem_base) & VCHIQ_SLOT_MASK); (int)((VCHIQ_SLOT_SIZE - (long)mem_base) & VCHIQ_SLOT_MASK);
struct vchiq_slot_zero *slot_zero = struct vchiq_slot_zero *slot_zero =
(struct vchiq_slot_zero *)((char *)mem_base + mem_align); (struct vchiq_slot_zero *)(mem_base + mem_align);
int num_slots = (mem_size - mem_align)/VCHIQ_SLOT_SIZE; int num_slots = (mem_size - mem_align)/VCHIQ_SLOT_SIZE;
int first_data_slot = VCHIQ_SLOT_ZERO_SLOTS; int first_data_slot = VCHIQ_SLOT_ZERO_SLOTS;
...@@ -3039,13 +3039,13 @@ VCHIQ_STATUS_T vchiq_bulk_transfer(VCHIQ_SERVICE_HANDLE_T handle, ...@@ -3039,13 +3039,13 @@ VCHIQ_STATUS_T vchiq_bulk_transfer(VCHIQ_SERVICE_HANDLE_T handle,
case VCHIQ_BULK_MODE_CALLBACK: case VCHIQ_BULK_MODE_CALLBACK:
break; break;
case VCHIQ_BULK_MODE_BLOCKING: case VCHIQ_BULK_MODE_BLOCKING:
bulk_waiter = (struct bulk_waiter *)userdata; bulk_waiter = userdata;
init_completion(&bulk_waiter->event); init_completion(&bulk_waiter->event);
bulk_waiter->actual = 0; bulk_waiter->actual = 0;
bulk_waiter->bulk = NULL; bulk_waiter->bulk = NULL;
break; break;
case VCHIQ_BULK_MODE_WAITING: case VCHIQ_BULK_MODE_WAITING:
bulk_waiter = (struct bulk_waiter *)userdata; bulk_waiter = userdata;
bulk = bulk_waiter->bulk; bulk = bulk_waiter->bulk;
goto waiting; goto waiting;
default: default:
...@@ -3624,7 +3624,7 @@ VCHIQ_STATUS_T vchiq_send_remote_use_active(struct vchiq_state *state) ...@@ -3624,7 +3624,7 @@ VCHIQ_STATUS_T vchiq_send_remote_use_active(struct vchiq_state *state)
void vchiq_log_dump_mem(const char *label, u32 addr, const void *void_mem, void vchiq_log_dump_mem(const char *label, u32 addr, const void *void_mem,
size_t num_bytes) size_t num_bytes)
{ {
const u8 *mem = (const u8 *)void_mem; const u8 *mem = void_mem;
size_t offset; size_t offset;
char line_buf[100]; char line_buf[100];
char *s; char *s;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment