Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752388AbbBKK3w (ORCPT ); Wed, 11 Feb 2015 05:29:52 -0500 Received: from www.osadl.org ([62.245.132.105]:59475 "EHLO www.osadl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751616AbbBKK3v (ORCPT ); Wed, 11 Feb 2015 05:29:51 -0500 From: Nicholas Mc Guire To: Jassi Brar Cc: linux-kernel@vger.kernel.org, Nicholas Mc Guire Subject: [PATCH] mailbox, pl320-ipc: fixup return type of wait_for_completion_timeout Date: Wed, 11 Feb 2015 05:25:45 -0500 Message-Id: <1423650345-11628-1-git-send-email-hofrat@osadl.org> X-Mailer: git-send-email 1.7.10.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1356 Lines: 45 return type of wait_for_completion_timeout is unsigned long not int. A appropriately named variable of type unsigned long is added and the assignments fixed up. Signed-off-by: Nicholas Mc Guire --- Patch was only compile tested with u300_defconfig + CONFIG_MAILBOX=y CONFIG_PL320_MBOX=y Patch is against 3.19.0 (localversion-next is -next-20150211) drivers/mailbox/pl320-ipc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/mailbox/pl320-ipc.c b/drivers/mailbox/pl320-ipc.c index f3755e0..b898264 100644 --- a/drivers/mailbox/pl320-ipc.c +++ b/drivers/mailbox/pl320-ipc.c @@ -88,14 +88,15 @@ static u32 __ipc_rcv(int mbox, u32 *data) int pl320_ipc_transmit(u32 *data) { int ret; + unsigned long time_left; mutex_lock(&ipc_m1_lock); init_completion(&ipc_completion); __ipc_send(IPC_TX_MBOX, data); - ret = wait_for_completion_timeout(&ipc_completion, + time_left = wait_for_completion_timeout(&ipc_completion, msecs_to_jiffies(1000)); - if (ret == 0) { + if (time_left == 0) { ret = -ETIMEDOUT; goto out; } -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/