From: Michael Benedict Date: Mon, 3 Jun 2019 08:47:12 +0000 (+1000) Subject: drivers: modem_v1: silence enum-conversion warnings X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ba8ee4c5c2a4e1158afba19e42479224b71a6f8d;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git drivers: modem_v1: silence enum-conversion warnings Signed-off-by: Michael Benedict --- diff --git a/drivers/misc/modem_v1/link_device_memory.h b/drivers/misc/modem_v1/link_device_memory.h index efcfbb99bf24..1c7abece990a 100644 --- a/drivers/misc/modem_v1/link_device_memory.h +++ b/drivers/misc/modem_v1/link_device_memory.h @@ -155,7 +155,7 @@ struct __packed shmem_4mb_phys_map { #ifdef GROUP_MEM_IPC_DEVICE struct mem_ipc_device { - enum dev_format id; + enum legacy_ipc_map id; char name[16]; struct circ_queue txq; @@ -734,17 +734,16 @@ static inline enum dev_format dev_id(enum sipc_ch_id ch) return sipc5_fmt_ch(ch) ? IPC_FMT : IPC_RAW; } -static inline enum dev_format get_mmap_idx(enum sipc_ch_id ch, +static inline enum legacy_ipc_map get_mmap_idx(enum sipc_ch_id ch, struct sk_buff *skb) { if (sipc5_fmt_ch(ch)) return IPC_MAP_FMT; - else #ifdef CONFIG_MODEM_IF_LEGACY_QOS - return (skb->queue_mapping == 1) ? - IPC_MAP_HPRIO_RAW : IPC_MAP_NORM_RAW; + return (skb->queue_mapping == 1) ? + IPC_MAP_HPRIO_RAW : IPC_MAP_NORM_RAW; #else - return IPC_MAP_NORM_RAW; + return IPC_MAP_NORM_RAW; #endif } diff --git a/drivers/misc/modem_v1/link_device_memory_debug.c b/drivers/misc/modem_v1/link_device_memory_debug.c index 6b87776b0b52..f0b965cc3dcd 100644 --- a/drivers/misc/modem_v1/link_device_memory_debug.c +++ b/drivers/misc/modem_v1/link_device_memory_debug.c @@ -62,7 +62,7 @@ void print_req_ack(struct mem_link_device *mld, struct mem_snapshot *mst, #ifdef DEBUG_MODEM_IF_FLOW_CTRL struct link_device *ld = &mld->link_dev; struct modem_ctl *mc = ld->mc; - enum dev_format id = dev->id; + enum legacy_ipc_map id = dev->id; unsigned int qsize = get_size(cq(dev, dir)); unsigned int in = mst->head[id][dir]; unsigned int out = mst->tail[id][dir]; @@ -81,7 +81,7 @@ void print_res_ack(struct mem_link_device *mld, struct mem_snapshot *mst, #ifdef DEBUG_MODEM_IF_FLOW_CTRL struct link_device *ld = &mld->link_dev; struct modem_ctl *mc = ld->mc; - enum dev_format id = dev->id; + enum legacy_ipc_map id = dev->id; enum direction opp_dir = opposite(dir); /* opposite direction */ unsigned int qsize = get_size(cq(dev, opp_dir)); unsigned int in = mst->head[id][opp_dir]; @@ -116,7 +116,7 @@ void print_dev_snapshot(struct mem_link_device *mld, struct mem_snapshot *mst, { #ifdef DEBUG_MODEM_IF struct link_device *ld = &mld->link_dev; - enum dev_format id = dev->id; + enum legacy_ipc_map id = dev->id; if (id > IPC_RAW) return; diff --git a/drivers/misc/modem_v1/link_device_shmem.c b/drivers/misc/modem_v1/link_device_shmem.c index 868a2432625f..fa6fe24e3b93 100644 --- a/drivers/misc/modem_v1/link_device_shmem.c +++ b/drivers/misc/modem_v1/link_device_shmem.c @@ -256,8 +256,22 @@ static void shmem_handle_cp_crash(struct mem_link_device *mld, stop_net_ifaces(ld); purge_txq(mld); - if (cp_online(mc)) - modem_notify_event(state); + if (cp_online(mc)) { + switch (state) { + case STATE_CRASH_RESET: + modem_notify_event(MODEM_EVENT_RESET); + break; + case STATE_CRASH_EXIT: + modem_notify_event(MODEM_EVENT_EXIT); + break; + case STATE_CRASH_WATCHDOG: + modem_notify_event(MODEM_EVENT_WATCHDOG); + break; + default: + mif_err("Invalid state to notify\n"); + break; + } + } if (cp_online(mc) || cp_booting(mc)) set_modem_state(mld, state);