From 9fc5f0f8ad28405145b30fd3b905e368063ee14c Mon Sep 17 00:00:00 2001 From: Tomas Winkler Date: Mon, 23 Jul 2018 13:21:22 +0300 Subject: mei: cleanup slots to data conversions Cleanup conversions between slots and data. Define MEI_SLOT_SIZE instead of using 4 or sizeof(u32) across the source code. Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman --- drivers/misc/mei/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/misc/mei/client.c') diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c index 5a673d09585f..79e200d71652 100644 --- a/drivers/misc/mei/client.c +++ b/drivers/misc/mei/client.c @@ -1597,7 +1597,7 @@ int mei_cl_irq_write(struct mei_cl *cl, struct mei_cl_cb *cb, /* Split the message only if we can write the whole host buffer */ } else if ((u32)slots == dev->hbuf_depth) { msg_slots = slots; - len = (slots * sizeof(u32)) - sizeof(struct mei_msg_hdr); + len = mei_slots2data(slots) - sizeof(struct mei_msg_hdr); mei_hdr.length = len; mei_hdr.msg_complete = 0; } else { -- cgit v1.2.3