Skip to contentSkip to conversation

mailbox: fixup return type of wait_for_completion_timeout

PATCH New Nicholas Mc Guire 1 participant 1 message Feb 10, 2015 Mailbox API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mailbox: fixup return type of wait_for_completion_timeout

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.

---

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(-)
drivers/mailbox/mailbox.c +4 -3
index 59aad4d..553b474 100644
@@ -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);
 		}
Signature · 1 line
1.7.10.4