From: Ivan Priest Date: Fri, 15 Jun 2018 16:44:50 +0000 (+0100) Subject: [9610] wlbt: fix compiler warnings in scsc_mx X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=88b4cf3cc6ca93fec1fc1b2aad3f480e798ebfda;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [9610] wlbt: fix compiler warnings in scsc_mx Several enum warnings exposed by clang. Change-Id: I3e1b87b5d3e726a440f704b44a1b9daadd7f7451 SCSC-Bug-Id: SSB-40929 Signed-off-by: Ivan Priest --- diff --git a/drivers/misc/samsung/scsc/mifstream.c b/drivers/misc/samsung/scsc/mifstream.c index a517ad23eb0f..dac400dc2d6c 100644 --- a/drivers/misc/samsung/scsc/mifstream.c +++ b/drivers/misc/samsung/scsc/mifstream.c @@ -87,7 +87,7 @@ int mif_stream_init(struct mif_stream *stream, enum scsc_mif_abs_target target, return -EINVAL; } stream->direction = direction; - stream->peer = target; + stream->peer = (enum MIF_STREAM_PEER)target; return 0; } @@ -98,10 +98,10 @@ void mif_stream_release(struct mif_stream *stream) intr = scsc_mx_get_intrbit(stream->mx); if (stream->direction == MIF_STREAM_DIRECTION_IN) { mifintrbit_free_tohost(intr, stream->write_bit_idx); - mifintrbit_free_fromhost(intr, stream->read_bit_idx, stream->peer); + mifintrbit_free_fromhost(intr, stream->read_bit_idx, (enum scsc_mif_abs_target)stream->peer); } else { mifintrbit_free_tohost(intr, stream->read_bit_idx); - mifintrbit_free_fromhost(intr, stream->write_bit_idx, stream->peer); + mifintrbit_free_fromhost(intr, stream->write_bit_idx, (enum scsc_mif_abs_target)stream->peer); } cpacketbuffer_release(&stream->buffer); } @@ -114,7 +114,7 @@ uint32_t mif_stream_read(struct mif_stream *stream, void *buf, uint32_t num_byte if (num_bytes_read > 0) /* Signal that the read is finished to anyone interested */ - mif_abs->irq_bit_set(mif_abs, stream->read_bit_idx, stream->peer); + mif_abs->irq_bit_set(mif_abs, stream->read_bit_idx, (enum scsc_mif_abs_target)stream->peer); return num_bytes_read; } @@ -131,7 +131,7 @@ void mif_stream_peek_complete(struct mif_stream *stream, const void *packet) cpacketbuffer_peek_complete(&stream->buffer, packet); /* Signal that the read is finished to anyone interested */ - mif_abs->irq_bit_set(mif_abs, stream->read_bit_idx, stream->peer); + mif_abs->irq_bit_set(mif_abs, stream->read_bit_idx, (enum scsc_mif_abs_target)stream->peer); } bool mif_stream_write(struct mif_stream *stream, const void *buf, uint32_t num_bytes) @@ -142,7 +142,7 @@ bool mif_stream_write(struct mif_stream *stream, const void *buf, uint32_t num_b return false; /* Kick the assigned interrupt to let others know new data is available */ - mif_abs->irq_bit_set(mif_abs, stream->write_bit_idx, stream->peer); + mif_abs->irq_bit_set(mif_abs, stream->write_bit_idx, (enum scsc_mif_abs_target)stream->peer); return true; } @@ -155,7 +155,7 @@ bool mif_stream_write_gather(struct mif_stream *stream, const void **bufs, uint3 return false; /* Kick the assigned interrupt to let others know new data is available */ - mif_abs->irq_bit_set(mif_abs, stream->write_bit_idx, stream->peer); + mif_abs->irq_bit_set(mif_abs, stream->write_bit_idx, (enum scsc_mif_abs_target)stream->peer); return true; } diff --git a/drivers/misc/samsung/scsc/mxman.c b/drivers/misc/samsung/scsc/mxman.c index 6c926422c0fd..adbe5b404080 100755 --- a/drivers/misc/samsung/scsc/mxman.c +++ b/drivers/misc/samsung/scsc/mxman.c @@ -1235,9 +1235,9 @@ static void mxman_failure_work(struct work_struct *work) } /* Signal panic to r4 and m4 processors */ SCSC_TAG_INFO(MXMAN, "Setting MIFINTRBIT_RESERVED_PANIC_R4\n"); - mif->irq_bit_set(mif, MIFINTRBIT_RESERVED_PANIC_R4, SCSC_MIFINTR_TARGET_R4); + mif->irq_bit_set(mif, MIFINTRBIT_RESERVED_PANIC_R4, SCSC_MIF_ABS_TARGET_R4); /* SCSC_MIFINTR_TARGET_R4 */ SCSC_TAG_INFO(MXMAN, "Setting MIFINTRBIT_RESERVED_PANIC_M4\n"); - mif->irq_bit_set(mif, MIFINTRBIT_RESERVED_PANIC_M4, SCSC_MIFINTR_TARGET_M4); + mif->irq_bit_set(mif, MIFINTRBIT_RESERVED_PANIC_M4, SCSC_MIF_ABS_TARGET_M4); /* SCSC_MIFINTR_TARGET_M4 */ srvman_freeze_services(srvman); if (mxman->mxman_state == MXMAN_STATE_FAILED) { mxman->last_panic_time = local_clock(); diff --git a/drivers/misc/samsung/scsc/scsc_service.c b/drivers/misc/samsung/scsc/scsc_service.c index df3638d6e819..1bc076908119 100755 --- a/drivers/misc/samsung/scsc/scsc_service.c +++ b/drivers/misc/samsung/scsc/scsc_service.c @@ -741,7 +741,7 @@ void scsc_service_mifintrbit_bit_set(struct scsc_service *service, int which_bit mif_abs = scsc_mx_get_mif_abs(mx); - return mif_abs->irq_bit_set(mif_abs, which_bit, dir); + return mif_abs->irq_bit_set(mif_abs, which_bit, (enum scsc_mif_abs_target)dir); } EXPORT_SYMBOL(scsc_service_mifintrbit_bit_set); @@ -782,7 +782,7 @@ int scsc_service_mifintrbit_alloc_fromhost(struct scsc_service *service, enum sc { struct scsc_mx *mx = service->mx; - return mifintrbit_alloc_fromhost(scsc_mx_get_intrbit(mx), dir); + return mifintrbit_alloc_fromhost(scsc_mx_get_intrbit(mx), (enum scsc_mif_abs_target)dir); } EXPORT_SYMBOL(scsc_service_mifintrbit_alloc_fromhost); @@ -790,7 +790,7 @@ int scsc_service_mifintrbit_free_fromhost(struct scsc_service *service, int whic { struct scsc_mx *mx = service->mx; - return mifintrbit_free_fromhost(scsc_mx_get_intrbit(mx), which_bit, dir); + return mifintrbit_free_fromhost(scsc_mx_get_intrbit(mx), which_bit, (enum scsc_mif_abs_target)dir); } EXPORT_SYMBOL(scsc_service_mifintrbit_free_fromhost);