[PATCH 12/30] staging: unisys: change visorchipset/parse.[ch] 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 visorchipset variables from bool to int.

Signed-off-by: Erik Arfvidson <erik.arfvidson@xxxxxxxxxx>
Signed-off-by: Benjamin Romer <benjamin.romer@xxxxxxxxxx>
---
 drivers/staging/unisys/visorchipset/parser.c | 24 ++++++++++++------------
 drivers/staging/unisys/visorchipset/parser.h |  6 +++---
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/unisys/visorchipset/parser.c b/drivers/staging/unisys/visorchipset/parser.c
index 9edbd3b..2f997af 100644
--- a/drivers/staging/unisys/visorchipset/parser.c
+++ b/drivers/staging/unisys/visorchipset/parser.c
@@ -36,13 +36,13 @@ struct PARSER_CONTEXT_Tag {
 	ulong param_bytes;
 	u8 *curr;
 	ulong bytes_remaining;
-	BOOL byte_stream;
+	int byte_stream;
 	char data[0];
 };
 
 static PARSER_CONTEXT *
-parser_init_guts(u64 addr, u32 bytes, BOOL isLocal,
-		 BOOL hasStandardPayloadHeader, BOOL *tryAgain)
+parser_init_guts(u64 addr, u32 bytes, int isLocal,
+		 int hasStandardPayloadHeader, int *tryAgain)
 {
 	int allocbytes = sizeof(PARSER_CONTEXT) + bytes;
 	PARSER_CONTEXT *rc = NULL;
@@ -51,7 +51,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal,
 	struct spar_controlvm_parameters_header *phdr = NULL;
 
 	if (tryAgain)
-		*tryAgain = FALSE;
+		*tryAgain = 0;
 	if (!hasStandardPayloadHeader)
 		/* alloc and 0 extra byte to ensure payload is
 		 * '\0'-terminated
@@ -63,7 +63,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal,
 		       __func__, __FILE__, __LINE__, allocbytes,
 		       MAX_CONTROLVM_PAYLOAD_BYTES);
 		if (tryAgain)
-			*tryAgain = TRUE;
+			*tryAgain = 1;
 		rc = NULL;
 		goto Away;
 	}
@@ -72,7 +72,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal,
 		ERRDRV("%s (%s:%d) - failed to allocate %d bytes",
 		       __func__, __FILE__, __LINE__, allocbytes);
 		if (tryAgain)
-			*tryAgain = TRUE;
+			*tryAgain = 1;
 		rc = NULL;
 		goto Away;
 	}
@@ -81,7 +81,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal,
 	ctx->param_bytes = bytes;
 	ctx->curr = NULL;
 	ctx->bytes_remaining = 0;
-	ctx->byte_stream = FALSE;
+	ctx->byte_stream = 0;
 	if (isLocal) {
 		void *p;
 
@@ -106,7 +106,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal,
 		}
 	}
 	if (!hasStandardPayloadHeader) {
-		ctx->byte_stream = TRUE;
+		ctx->byte_stream = 1;
 		rc = ctx;
 		goto Away;
 	}
@@ -155,9 +155,9 @@ Away:
 }
 
 PARSER_CONTEXT *
-parser_init(u64 addr, u32 bytes, BOOL isLocal, BOOL *tryAgain)
+parser_init(u64 addr, u32 bytes, int isLocal, int *tryAgain)
 {
-	return parser_init_guts(addr, bytes, isLocal, TRUE, tryAgain);
+	return parser_init_guts(addr, bytes, isLocal, 1, tryAgain);
 }
 
 /* Call this instead of parser_init() if the payload area consists of just
@@ -166,9 +166,9 @@ parser_init(u64 addr, u32 bytes, BOOL isLocal, BOOL *tryAgain)
  * parser_byteStream_get() to obtain the data.
  */
 PARSER_CONTEXT *
-parser_init_byteStream(u64 addr, u32 bytes, BOOL isLocal, BOOL *tryAgain)
+parser_init_byteStream(u64 addr, u32 bytes, int isLocal, int *tryAgain)
 {
-	return parser_init_guts(addr, bytes, isLocal, FALSE, tryAgain);
+	return parser_init_guts(addr, bytes, isLocal, 0, tryAgain);
 }
 
 /* Obtain '\0'-terminated copy of string in payload area.
diff --git a/drivers/staging/unisys/visorchipset/parser.h b/drivers/staging/unisys/visorchipset/parser.h
index 9fbe3b5..fceb1ef 100644
--- a/drivers/staging/unisys/visorchipset/parser.h
+++ b/drivers/staging/unisys/visorchipset/parser.h
@@ -33,9 +33,9 @@ typedef enum {
 
 typedef struct PARSER_CONTEXT_Tag PARSER_CONTEXT;
 
-PARSER_CONTEXT *parser_init(u64 addr, u32 bytes, BOOL isLocal, BOOL *tryAgain);
-PARSER_CONTEXT *parser_init_byteStream(u64 addr, u32 bytes, BOOL isLocal,
-				       BOOL *tryAgain);
+PARSER_CONTEXT *parser_init(u64 addr, u32 bytes, int isLocal, int *tryAgain);
+PARSER_CONTEXT *parser_init_byteStream(u64 addr, u32 bytes, int isLocal,
+				       int *tryAgain);
 void parser_param_start(PARSER_CONTEXT *ctx, PARSER_WHICH_STRING which_string);
 void *parser_param_get(PARSER_CONTEXT *ctx, char *nam, int namesize);
 void *parser_string_get(PARSER_CONTEXT *ctx);
-- 
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