[PATCH 06/30] staging: unisys: changes function visorchannel_signalinsert from bool to int

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Erik Arfvidson <erik.arfvidson@xxxxxxxxxx>

This patch changes function from visorchannel_signalinsert from bool to int.
Also, changes to signalinsert_inner had to be change since
visorchannel_signalinsert call that other function which return value was bool
so it was change to int as well.

Signed-off-by: Erik Arfvidson <erik.arfvidson@xxxxxxxxxx>
Signed-off-by: Benjamin Romer <benjamin.romer@xxxxxxxxxx>
---
 drivers/staging/unisys/visorchannel/visorchannel.h     |  2 +-
 .../staging/unisys/visorchannel/visorchannel_funcs.c   | 18 +++++++++---------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/unisys/visorchannel/visorchannel.h b/drivers/staging/unisys/visorchannel/visorchannel.h
index 5b4ff15..e8df58d 100644
--- a/drivers/staging/unisys/visorchannel/visorchannel.h
+++ b/drivers/staging/unisys/visorchannel/visorchannel.h
@@ -54,7 +54,7 @@ int visorchannel_clear(struct visorchannel *channel, ulong offset,
 		       u8 ch, ulong nbytes);
 int visorchannel_signalremove(struct visorchannel *channel, u32 queue,
 			       void *msg);
-BOOL visorchannel_signalinsert(struct visorchannel *channel, u32 queue,
+int visorchannel_signalinsert(struct visorchannel *channel, u32 queue,
 			       void *msg);
 int visorchannel_signalqueue_slots_avail(struct visorchannel *channel,
 					 u32 queue);
diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
index 68befd6..0279e1f 100644
--- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
+++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
@@ -461,13 +461,13 @@ visorchannel_signalremove(struct visorchannel *channel, u32 queue, void *msg)
 }
 EXPORT_SYMBOL_GPL(visorchannel_signalremove);
 
-static BOOL
+static int
 signalinsert_inner(struct visorchannel *channel, u32 queue, void *msg)
 {
 	struct signal_queue_header sig_hdr;
 
 	if (!sig_read_header(channel, queue, &sig_hdr)) {
-		return FALSE;
+		return 0;
 	}
 
 	sig_hdr.head = ((sig_hdr.head + 1) % sig_hdr.max_slots);
@@ -476,12 +476,12 @@ signalinsert_inner(struct visorchannel *channel, u32 queue, void *msg)
 		if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, num_overflows))
 			ERRDRV("visor_memregion_write of NumOverflows failed\n");
 
-		return FALSE;
+		return 0;
 	}
 
 	if (!sig_write_data(channel, queue, &sig_hdr, sig_hdr.head, msg)) {
 		ERRDRV("sig_write_data failed\n");
-		return FALSE;
+		return 0;
 	}
 	sig_hdr.num_sent++;
 
@@ -491,20 +491,20 @@ signalinsert_inner(struct visorchannel *channel, u32 queue, void *msg)
 	mb(); /* required for channel synch */
 	if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, head)) {
 		ERRDRV("visor_memregion_write of Head failed\n");
-		return FALSE;
+		return 0;
 	}
 	if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, num_sent)) {
 		ERRDRV("visor_memregion_write of NumSignalsSent failed\n");
-		return FALSE;
+		return 0;
 	}
 
-	return TRUE;
+	return 1;
 }
 
-BOOL
+int
 visorchannel_signalinsert(struct visorchannel *channel, u32 queue, void *msg)
 {
-	BOOL rc;
+	int rc;
 
 	if (channel->needs_lock) {
 		spin_lock(&channel->insert_lock);
-- 
2.1.0

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux