[9610] wlbt: fix compiler warnings in scsc_mx
authorIvan Priest <i.priest@samsung.com>
Fri, 15 Jun 2018 16:44:50 +0000 (17:44 +0100)
committerYoungsoo Kim <youngss.kim@samsung.com>
Sat, 16 Jun 2018 01:52:26 +0000 (10:52 +0900)
Several enum warnings exposed by clang.

Change-Id: I3e1b87b5d3e726a440f704b44a1b9daadd7f7451
SCSC-Bug-Id: SSB-40929
Signed-off-by: Ivan Priest <i.priest@samsung.com>
drivers/misc/samsung/scsc/mifstream.c
drivers/misc/samsung/scsc/mxman.c
drivers/misc/samsung/scsc/scsc_service.c

index a517ad23eb0fdff17d5900f537ee4c61bc48e689..dac400dc2d6c07a16f7a00e081cede060f03fea5 100644 (file)
@@ -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;
 }
 
index 6c926422c0fd1017aad3a9a1c0271a04b8bbc6bb..adbe5b40408086ecd8d04870951b55aab745156c 100755 (executable)
@@ -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();
index df3638d6e81993b768271045a8af85aa5edf6749..1bc076908119f443e60e284ea18830e8448dd08d 100755 (executable)
@@ -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);