Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932182AbbBJIyN (ORCPT ); Tue, 10 Feb 2015 03:54:13 -0500 Received: from www.osadl.org ([62.245.132.105]:49209 "EHLO www.osadl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932095AbbBJIyL (ORCPT ); Tue, 10 Feb 2015 03:54:11 -0500 From: Nicholas Mc Guire To: Jassi Brar Cc: linux-kernel@vger.kernel.org, Nicholas Mc Guire Subject: [PATCH] mailbox: fixup return type of wait_for_completion_timeout Date: Tue, 10 Feb 2015 03:50:06 -0500 Message-Id: <1423558206-30182-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: 1439 Lines: 46 return type of wait_for_completion_timeout is unsigned long not int. The return variable is renamed to reflect its use and the type adjusted to unsigned long. Signed-off-by: Nicholas Mc Guire --- Patch was only compile tested with x86_64_defconfig + CONFIG_MAILBOX=y Patch is against 3.19.0-rc7 (localversion-next is -next-20150209) drivers/mailbox/mailbox.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c index 59aad4d..553b474 100644 --- a/drivers/mailbox/mailbox.c +++ b/drivers/mailbox/mailbox.c @@ -260,15 +260,16 @@ int mbox_send_message(struct mbox_chan *chan, void *mssg) if (chan->cl->tx_block && chan->active_req) { unsigned long wait; - int ret; + unsigned long tx_timeout; if (!chan->cl->tx_tout) /* wait forever */ wait = msecs_to_jiffies(3600000); else wait = msecs_to_jiffies(chan->cl->tx_tout); - ret = wait_for_completion_timeout(&chan->tx_complete, wait); - if (ret == 0) { + tx_timeout = wait_for_completion_timeout(&chan->tx_complete, + wait); + if (tx_timeout == 0) { t = -EIO; tx_tick(chan, -EIO); } -- 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/