Commit f4c11551 authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: unisys: visorchipset: Get rid of ugly BOOL/TRUE/FALSE usage

Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Tested-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c1f834eb
...@@ -36,13 +36,13 @@ struct parser_context { ...@@ -36,13 +36,13 @@ struct parser_context {
ulong param_bytes; ulong param_bytes;
u8 *curr; u8 *curr;
ulong bytes_remaining; ulong bytes_remaining;
BOOL byte_stream; bool byte_stream;
char data[0]; char data[0];
}; };
static struct parser_context * static struct parser_context *
parser_init_guts(u64 addr, u32 bytes, BOOL local, parser_init_guts(u64 addr, u32 bytes, bool local,
BOOL standard_payload_header, BOOL *retry) bool standard_payload_header, bool *retry)
{ {
int allocbytes = sizeof(struct parser_context) + bytes; int allocbytes = sizeof(struct parser_context) + bytes;
struct parser_context *rc = NULL; struct parser_context *rc = NULL;
...@@ -51,7 +51,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL local, ...@@ -51,7 +51,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL local,
struct spar_controlvm_parameters_header *phdr = NULL; struct spar_controlvm_parameters_header *phdr = NULL;
if (retry) if (retry)
*retry = FALSE; *retry = false;
if (!standard_payload_header) if (!standard_payload_header)
/* alloc and 0 extra byte to ensure payload is /* alloc and 0 extra byte to ensure payload is
* '\0'-terminated * '\0'-terminated
...@@ -60,14 +60,14 @@ parser_init_guts(u64 addr, u32 bytes, BOOL local, ...@@ -60,14 +60,14 @@ parser_init_guts(u64 addr, u32 bytes, BOOL local,
if ((controlvm_payload_bytes_buffered + bytes) if ((controlvm_payload_bytes_buffered + bytes)
> MAX_CONTROLVM_PAYLOAD_BYTES) { > MAX_CONTROLVM_PAYLOAD_BYTES) {
if (retry) if (retry)
*retry = TRUE; *retry = true;
rc = NULL; rc = NULL;
goto cleanup; goto cleanup;
} }
ctx = kzalloc(allocbytes, GFP_KERNEL|__GFP_NORETRY); ctx = kzalloc(allocbytes, GFP_KERNEL|__GFP_NORETRY);
if (!ctx) { if (!ctx) {
if (retry) if (retry)
*retry = TRUE; *retry = true;
rc = NULL; rc = NULL;
goto cleanup; goto cleanup;
} }
...@@ -76,7 +76,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL local, ...@@ -76,7 +76,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL local,
ctx->param_bytes = bytes; ctx->param_bytes = bytes;
ctx->curr = NULL; ctx->curr = NULL;
ctx->bytes_remaining = 0; ctx->bytes_remaining = 0;
ctx->byte_stream = FALSE; ctx->byte_stream = false;
if (local) { if (local) {
void *p; void *p;
...@@ -98,7 +98,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL local, ...@@ -98,7 +98,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL local,
} }
} }
if (!standard_payload_header) { if (!standard_payload_header) {
ctx->byte_stream = TRUE; ctx->byte_stream = true;
rc = ctx; rc = ctx;
goto cleanup; goto cleanup;
} }
...@@ -135,9 +135,9 @@ parser_init_guts(u64 addr, u32 bytes, BOOL local, ...@@ -135,9 +135,9 @@ parser_init_guts(u64 addr, u32 bytes, BOOL local,
} }
struct parser_context * struct parser_context *
parser_init(u64 addr, u32 bytes, BOOL local, BOOL *retry) parser_init(u64 addr, u32 bytes, bool local, bool *retry)
{ {
return parser_init_guts(addr, bytes, local, TRUE, retry); return parser_init_guts(addr, bytes, local, true, retry);
} }
/* Call this instead of parser_init() if the payload area consists of just /* Call this instead of parser_init() if the payload area consists of just
...@@ -146,9 +146,9 @@ parser_init(u64 addr, u32 bytes, BOOL local, BOOL *retry) ...@@ -146,9 +146,9 @@ parser_init(u64 addr, u32 bytes, BOOL local, BOOL *retry)
* parser_byteStream_get() to obtain the data. * parser_byteStream_get() to obtain the data.
*/ */
struct parser_context * struct parser_context *
parser_init_byte_stream(u64 addr, u32 bytes, BOOL local, BOOL *retry) parser_init_byte_stream(u64 addr, u32 bytes, bool local, bool *retry)
{ {
return parser_init_guts(addr, bytes, local, FALSE, retry); return parser_init_guts(addr, bytes, local, false, retry);
} }
/* Obtain '\0'-terminated copy of string in payload area. /* Obtain '\0'-terminated copy of string in payload area.
......
...@@ -30,10 +30,10 @@ typedef enum { ...@@ -30,10 +30,10 @@ typedef enum {
PARSERSTRING_NAME, PARSERSTRING_NAME,
} PARSER_WHICH_STRING; } PARSER_WHICH_STRING;
struct parser_context *parser_init(u64 addr, u32 bytes, BOOL isLocal, struct parser_context *parser_init(u64 addr, u32 bytes, bool isLocal,
BOOL *tryAgain); bool *tryAgain);
struct parser_context *parser_init_byte_stream(u64 addr, u32 bytes, BOOL local, struct parser_context *parser_init_byte_stream(u64 addr, u32 bytes, bool local,
BOOL *retry); bool *retry);
void parser_param_start(struct parser_context *ctx, void parser_param_start(struct parser_context *ctx,
PARSER_WHICH_STRING which_string); PARSER_WHICH_STRING which_string);
void *parser_param_get(struct parser_context *ctx, char *nam, int namesize); void *parser_param_get(struct parser_context *ctx, char *nam, int namesize);
......
...@@ -217,19 +217,19 @@ typedef void (*SPARREPORTEVENT_COMPLETE_FUNC) (struct controlvm_message *msg, ...@@ -217,19 +217,19 @@ typedef void (*SPARREPORTEVENT_COMPLETE_FUNC) (struct controlvm_message *msg,
void visorchipset_device_pause_response(ulong bus_no, ulong dev_no, void visorchipset_device_pause_response(ulong bus_no, ulong dev_no,
int response); int response);
BOOL visorchipset_get_bus_info(ulong bus_no, bool visorchipset_get_bus_info(ulong bus_no,
struct visorchipset_bus_info *bus_info); struct visorchipset_bus_info *bus_info);
BOOL visorchipset_get_device_info(ulong bus_no, ulong dev_no, bool visorchipset_get_device_info(ulong bus_no, ulong dev_no,
struct visorchipset_device_info *dev_info); struct visorchipset_device_info *dev_info);
BOOL visorchipset_set_bus_context(ulong bus_no, void *context); bool visorchipset_set_bus_context(ulong bus_no, void *context);
BOOL visorchipset_set_device_context(ulong bus_no, ulong dev_no, void *context); bool visorchipset_set_device_context(ulong bus_no, ulong dev_no, void *context);
int visorchipset_chipset_ready(void); int visorchipset_chipset_ready(void);
int visorchipset_chipset_selftest(void); int visorchipset_chipset_selftest(void);
int visorchipset_chipset_notready(void); int visorchipset_chipset_notready(void);
void visorchipset_save_message(struct controlvm_message *msg, void visorchipset_save_message(struct controlvm_message *msg,
enum crash_obj_type type); enum crash_obj_type type);
void *visorchipset_cache_alloc(struct kmem_cache *pool, void *visorchipset_cache_alloc(struct kmem_cache *pool,
BOOL ok_to_block, char *fn, int ln); bool ok_to_block, char *fn, int ln);
void visorchipset_cache_free(struct kmem_cache *pool, void *p, void visorchipset_cache_free(struct kmem_cache *pool, void *p,
char *fn, int ln); char *fn, int ln);
......
...@@ -108,7 +108,7 @@ struct visor_livedump_info { ...@@ -108,7 +108,7 @@ struct visor_livedump_info {
struct controlvm_message_header dumpcapture_header; struct controlvm_message_header dumpcapture_header;
struct controlvm_message_header gettextdump_header; struct controlvm_message_header gettextdump_header;
struct controlvm_message_header dumpcomplete_header; struct controlvm_message_header dumpcomplete_header;
BOOL gettextdump_outstanding; bool gettextdump_outstanding;
u32 crc32; u32 crc32;
ulong length; ulong length;
atomic_t buffers_in_use; atomic_t buffers_in_use;
...@@ -123,7 +123,7 @@ static struct visor_livedump_info livedump_info; ...@@ -123,7 +123,7 @@ static struct visor_livedump_info livedump_info;
* process it again the next time controlvm_periodic_work() runs. * process it again the next time controlvm_periodic_work() runs.
*/ */
static struct controlvm_message controlvm_pending_msg; static struct controlvm_message controlvm_pending_msg;
static BOOL controlvm_pending_msg_valid = FALSE; static bool controlvm_pending_msg_valid = false;
/* Pool of struct putfile_buffer_entry, for keeping track of pending (incoming) /* Pool of struct putfile_buffer_entry, for keeping track of pending (incoming)
* TRANSMIT_FILE PutFile payloads. * TRANSMIT_FILE PutFile payloads.
...@@ -776,7 +776,7 @@ static void ...@@ -776,7 +776,7 @@ static void
bus_responder(enum controlvm_id cmd_id, ulong bus_no, int response) bus_responder(enum controlvm_id cmd_id, ulong bus_no, int response)
{ {
struct visorchipset_bus_info *p = NULL; struct visorchipset_bus_info *p = NULL;
BOOL need_clear = FALSE; bool need_clear = false;
p = findbus(&bus_info_list, bus_no); p = findbus(&bus_info_list, bus_no);
if (!p) if (!p)
...@@ -791,7 +791,7 @@ bus_responder(enum controlvm_id cmd_id, ulong bus_no, int response) ...@@ -791,7 +791,7 @@ bus_responder(enum controlvm_id cmd_id, ulong bus_no, int response)
if (cmd_id == CONTROLVM_BUS_CREATE) if (cmd_id == CONTROLVM_BUS_CREATE)
p->state.created = 1; p->state.created = 1;
if (cmd_id == CONTROLVM_BUS_DESTROY) if (cmd_id == CONTROLVM_BUS_DESTROY)
need_clear = TRUE; need_clear = true;
} }
if (p->pending_msg_hdr.id == CONTROLVM_INVALID) if (p->pending_msg_hdr.id == CONTROLVM_INVALID)
...@@ -840,7 +840,7 @@ device_responder(enum controlvm_id cmd_id, ulong bus_no, ulong dev_no, ...@@ -840,7 +840,7 @@ device_responder(enum controlvm_id cmd_id, ulong bus_no, ulong dev_no,
int response) int response)
{ {
struct visorchipset_device_info *p = NULL; struct visorchipset_device_info *p = NULL;
BOOL need_clear = FALSE; bool need_clear = false;
p = finddevice(&dev_info_list, bus_no, dev_no); p = finddevice(&dev_info_list, bus_no, dev_no);
if (!p) if (!p)
...@@ -849,7 +849,7 @@ device_responder(enum controlvm_id cmd_id, ulong bus_no, ulong dev_no, ...@@ -849,7 +849,7 @@ device_responder(enum controlvm_id cmd_id, ulong bus_no, ulong dev_no,
if (cmd_id == CONTROLVM_DEVICE_CREATE) if (cmd_id == CONTROLVM_DEVICE_CREATE)
p->state.created = 1; p->state.created = 1;
if (cmd_id == CONTROLVM_DEVICE_DESTROY) if (cmd_id == CONTROLVM_DEVICE_DESTROY)
need_clear = TRUE; need_clear = true;
} }
if (p->pending_msg_hdr.id == CONTROLVM_INVALID) if (p->pending_msg_hdr.id == CONTROLVM_INVALID)
...@@ -867,9 +867,9 @@ device_responder(enum controlvm_id cmd_id, ulong bus_no, ulong dev_no, ...@@ -867,9 +867,9 @@ device_responder(enum controlvm_id cmd_id, ulong bus_no, ulong dev_no,
static void static void
bus_epilog(u32 bus_no, bus_epilog(u32 bus_no,
u32 cmd, struct controlvm_message_header *msg_hdr, u32 cmd, struct controlvm_message_header *msg_hdr,
int response, BOOL need_response) int response, bool need_response)
{ {
BOOL notified = FALSE; bool notified = false;
struct visorchipset_bus_info *bus_info = findbus(&bus_info_list, struct visorchipset_bus_info *bus_info = findbus(&bus_info_list,
bus_no); bus_no);
...@@ -900,23 +900,23 @@ bus_epilog(u32 bus_no, ...@@ -900,23 +900,23 @@ bus_epilog(u32 bus_no,
* devices */ * devices */
if (busdev_server_notifiers.bus_create) { if (busdev_server_notifiers.bus_create) {
(*busdev_server_notifiers.bus_create) (bus_no); (*busdev_server_notifiers.bus_create) (bus_no);
notified = TRUE; notified = true;
} }
if ((!bus_info->flags.server) /*client */ && if ((!bus_info->flags.server) /*client */ &&
busdev_client_notifiers.bus_create) { busdev_client_notifiers.bus_create) {
(*busdev_client_notifiers.bus_create) (bus_no); (*busdev_client_notifiers.bus_create) (bus_no);
notified = TRUE; notified = true;
} }
break; break;
case CONTROLVM_BUS_DESTROY: case CONTROLVM_BUS_DESTROY:
if (busdev_server_notifiers.bus_destroy) { if (busdev_server_notifiers.bus_destroy) {
(*busdev_server_notifiers.bus_destroy) (bus_no); (*busdev_server_notifiers.bus_destroy) (bus_no);
notified = TRUE; notified = true;
} }
if ((!bus_info->flags.server) /*client */ && if ((!bus_info->flags.server) /*client */ &&
busdev_client_notifiers.bus_destroy) { busdev_client_notifiers.bus_destroy) {
(*busdev_client_notifiers.bus_destroy) (bus_no); (*busdev_client_notifiers.bus_destroy) (bus_no);
notified = TRUE; notified = true;
} }
break; break;
} }
...@@ -935,10 +935,10 @@ bus_epilog(u32 bus_no, ...@@ -935,10 +935,10 @@ bus_epilog(u32 bus_no,
static void static void
device_epilog(u32 bus_no, u32 dev_no, struct spar_segment_state state, u32 cmd, device_epilog(u32 bus_no, u32 dev_no, struct spar_segment_state state, u32 cmd,
struct controlvm_message_header *msg_hdr, int response, struct controlvm_message_header *msg_hdr, int response,
BOOL need_response, BOOL for_visorbus) bool need_response, bool for_visorbus)
{ {
struct visorchipset_busdev_notifiers *notifiers = NULL; struct visorchipset_busdev_notifiers *notifiers = NULL;
BOOL notified = FALSE; bool notified = false;
struct visorchipset_device_info *dev_info = struct visorchipset_device_info *dev_info =
finddevice(&dev_info_list, bus_no, dev_no); finddevice(&dev_info_list, bus_no, dev_no);
...@@ -967,7 +967,7 @@ device_epilog(u32 bus_no, u32 dev_no, struct spar_segment_state state, u32 cmd, ...@@ -967,7 +967,7 @@ device_epilog(u32 bus_no, u32 dev_no, struct spar_segment_state state, u32 cmd,
case CONTROLVM_DEVICE_CREATE: case CONTROLVM_DEVICE_CREATE:
if (notifiers->device_create) { if (notifiers->device_create) {
(*notifiers->device_create) (bus_no, dev_no); (*notifiers->device_create) (bus_no, dev_no);
notified = TRUE; notified = true;
} }
break; break;
case CONTROLVM_DEVICE_CHANGESTATE: case CONTROLVM_DEVICE_CHANGESTATE:
...@@ -978,7 +978,7 @@ device_epilog(u32 bus_no, u32 dev_no, struct spar_segment_state state, u32 cmd, ...@@ -978,7 +978,7 @@ device_epilog(u32 bus_no, u32 dev_no, struct spar_segment_state state, u32 cmd,
if (notifiers->device_resume) { if (notifiers->device_resume) {
(*notifiers->device_resume) (bus_no, (*notifiers->device_resume) (bus_no,
dev_no); dev_no);
notified = TRUE; notified = true;
} }
} }
/* ServerNotReady / ServerLost / SegmentStateStandby */ /* ServerNotReady / ServerLost / SegmentStateStandby */
...@@ -991,7 +991,7 @@ device_epilog(u32 bus_no, u32 dev_no, struct spar_segment_state state, u32 cmd, ...@@ -991,7 +991,7 @@ device_epilog(u32 bus_no, u32 dev_no, struct spar_segment_state state, u32 cmd,
if (notifiers->device_pause) { if (notifiers->device_pause) {
(*notifiers->device_pause) (bus_no, (*notifiers->device_pause) (bus_no,
dev_no); dev_no);
notified = TRUE; notified = true;
} }
} else if (state.alive == segment_state_paused.alive && } else if (state.alive == segment_state_paused.alive &&
state.operating == state.operating ==
...@@ -1013,7 +1013,7 @@ device_epilog(u32 bus_no, u32 dev_no, struct spar_segment_state state, u32 cmd, ...@@ -1013,7 +1013,7 @@ device_epilog(u32 bus_no, u32 dev_no, struct spar_segment_state state, u32 cmd,
case CONTROLVM_DEVICE_DESTROY: case CONTROLVM_DEVICE_DESTROY:
if (notifiers->device_destroy) { if (notifiers->device_destroy) {
(*notifiers->device_destroy) (bus_no, dev_no); (*notifiers->device_destroy) (bus_no, dev_no);
notified = TRUE; notified = true;
} }
break; break;
} }
...@@ -1262,7 +1262,7 @@ my_device_destroy(struct controlvm_message *inmsg) ...@@ -1262,7 +1262,7 @@ my_device_destroy(struct controlvm_message *inmsg)
/* When provided with the physical address of the controlvm channel /* When provided with the physical address of the controlvm channel
* (phys_addr), the offset to the payload area we need to manage * (phys_addr), the offset to the payload area we need to manage
* (offset), and the size of this payload area (bytes), fills in the * (offset), and the size of this payload area (bytes), fills in the
* controlvm_payload_info struct. Returns TRUE for success or FALSE * controlvm_payload_info struct. Returns true for success or false
* for failure. * for failure.
*/ */
static int static int
...@@ -1416,17 +1416,17 @@ chipset_notready(struct controlvm_message_header *msg_hdr) ...@@ -1416,17 +1416,17 @@ chipset_notready(struct controlvm_message_header *msg_hdr)
/* This is your "one-stop" shop for grabbing the next message from the /* This is your "one-stop" shop for grabbing the next message from the
* CONTROLVM_QUEUE_EVENT queue in the controlvm channel. * CONTROLVM_QUEUE_EVENT queue in the controlvm channel.
*/ */
static BOOL static bool
read_controlvm_event(struct controlvm_message *msg) read_controlvm_event(struct controlvm_message *msg)
{ {
if (visorchannel_signalremove(controlvm_channel, if (visorchannel_signalremove(controlvm_channel,
CONTROLVM_QUEUE_EVENT, msg)) { CONTROLVM_QUEUE_EVENT, msg)) {
/* got a message */ /* got a message */
if (msg->hdr.flags.test_message == 1) if (msg->hdr.flags.test_message == 1)
return FALSE; return false;
return TRUE; return true;
} }
return FALSE; return false;
} }
/* /*
...@@ -1637,16 +1637,16 @@ parahotplug_process_message(struct controlvm_message *inmsg) ...@@ -1637,16 +1637,16 @@ parahotplug_process_message(struct controlvm_message *inmsg)
/* Process a controlvm message. /* Process a controlvm message.
* Return result: * Return result:
* FALSE - this function will return FALSE only in the case where the * false - this function will return FALSE only in the case where the
* controlvm message was NOT processed, but processing must be * controlvm message was NOT processed, but processing must be
* retried before reading the next controlvm message; a * retried before reading the next controlvm message; a
* scenario where this can occur is when we need to throttle * scenario where this can occur is when we need to throttle
* the allocation of memory in which to copy out controlvm * the allocation of memory in which to copy out controlvm
* payload data * payload data
* TRUE - processing of the controlvm message completed, * true - processing of the controlvm message completed,
* either successfully or with an error. * either successfully or with an error.
*/ */
static BOOL static bool
handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr) handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr)
{ {
struct controlvm_message_packet *cmd = &inmsg.cmd; struct controlvm_message_packet *cmd = &inmsg.cmd;
...@@ -1659,7 +1659,7 @@ handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr) ...@@ -1659,7 +1659,7 @@ handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr)
/* create parsing context if necessary */ /* create parsing context if necessary */
local_addr = (inmsg.hdr.flags.test_message == 1); local_addr = (inmsg.hdr.flags.test_message == 1);
if (channel_addr == 0) if (channel_addr == 0)
return TRUE; return true;
parm_addr = channel_addr + inmsg.hdr.payload_vm_offset; parm_addr = channel_addr + inmsg.hdr.payload_vm_offset;
parm_bytes = inmsg.hdr.payload_bytes; parm_bytes = inmsg.hdr.payload_bytes;
...@@ -1668,13 +1668,13 @@ handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr) ...@@ -1668,13 +1668,13 @@ handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr)
* makes a difference in how we compute the virtual address. * makes a difference in how we compute the virtual address.
*/ */
if (parm_addr != 0 && parm_bytes != 0) { if (parm_addr != 0 && parm_bytes != 0) {
BOOL retry = FALSE; bool retry = false;
parser_ctx = parser_ctx =
parser_init_byte_stream(parm_addr, parm_bytes, parser_init_byte_stream(parm_addr, parm_bytes,
local_addr, &retry); local_addr, &retry);
if (!parser_ctx && retry) if (!parser_ctx && retry)
return FALSE; return false;
} }
if (!local_addr) { if (!local_addr) {
...@@ -1741,7 +1741,7 @@ handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr) ...@@ -1741,7 +1741,7 @@ handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr)
parser_done(parser_ctx); parser_done(parser_ctx);
parser_ctx = NULL; parser_ctx = NULL;
} }
return TRUE; return true;
} }
static HOSTADDRESS controlvm_get_channel_address(void) static HOSTADDRESS controlvm_get_channel_address(void)
...@@ -1759,8 +1759,8 @@ static void ...@@ -1759,8 +1759,8 @@ static void
controlvm_periodic_work(struct work_struct *work) controlvm_periodic_work(struct work_struct *work)
{ {
struct controlvm_message inmsg; struct controlvm_message inmsg;
BOOL got_command = FALSE; bool got_command = false;
BOOL handle_command_failed = FALSE; bool handle_command_failed = false;
static u64 poll_count; static u64 poll_count;
/* make sure visorbus server is registered for controlvm callbacks */ /* make sure visorbus server is registered for controlvm callbacks */
...@@ -1802,14 +1802,14 @@ controlvm_periodic_work(struct work_struct *work) ...@@ -1802,14 +1802,14 @@ controlvm_periodic_work(struct work_struct *work)
* rather than reading a new one * rather than reading a new one
*/ */
inmsg = controlvm_pending_msg; inmsg = controlvm_pending_msg;
controlvm_pending_msg_valid = FALSE; controlvm_pending_msg_valid = false;
got_command = true; got_command = true;
} else { } else {
got_command = read_controlvm_event(&inmsg); got_command = read_controlvm_event(&inmsg);
} }
} }
handle_command_failed = FALSE; handle_command_failed = false;
while (got_command && (!handle_command_failed)) { while (got_command && (!handle_command_failed)) {
most_recent_message_jiffies = jiffies; most_recent_message_jiffies = jiffies;
if (handle_command(inmsg, if (handle_command(inmsg,
...@@ -1823,9 +1823,9 @@ controlvm_periodic_work(struct work_struct *work) ...@@ -1823,9 +1823,9 @@ controlvm_periodic_work(struct work_struct *work)
* controlvm msg so we will attempt to * controlvm msg so we will attempt to
* reprocess it on our next loop * reprocess it on our next loop
*/ */
handle_command_failed = TRUE; handle_command_failed = true;
controlvm_pending_msg = inmsg; controlvm_pending_msg = inmsg;
controlvm_pending_msg_valid = TRUE; controlvm_pending_msg_valid = true;
} }
} }
...@@ -1996,60 +1996,60 @@ device_resume_response(ulong bus_no, ulong dev_no, int response) ...@@ -1996,60 +1996,60 @@ device_resume_response(ulong bus_no, ulong dev_no, int response)
segment_state_running); segment_state_running);
} }
BOOL bool
visorchipset_get_bus_info(ulong bus_no, struct visorchipset_bus_info *bus_info) visorchipset_get_bus_info(ulong bus_no, struct visorchipset_bus_info *bus_info)
{ {
void *p = findbus(&bus_info_list, bus_no); void *p = findbus(&bus_info_list, bus_no);
if (!p) if (!p)
return FALSE; return false;
memcpy(bus_info, p, sizeof(struct visorchipset_bus_info)); memcpy(bus_info, p, sizeof(struct visorchipset_bus_info));
return TRUE; return true;
} }
EXPORT_SYMBOL_GPL(visorchipset_get_bus_info); EXPORT_SYMBOL_GPL(visorchipset_get_bus_info);
BOOL bool
visorchipset_set_bus_context(ulong bus_no, void *context) visorchipset_set_bus_context(ulong bus_no, void *context)
{ {
struct visorchipset_bus_info *p = findbus(&bus_info_list, bus_no); struct visorchipset_bus_info *p = findbus(&bus_info_list, bus_no);
if (!p) if (!p)
return FALSE; return false;
p->bus_driver_context = context; p->bus_driver_context = context;
return TRUE; return true;
} }
EXPORT_SYMBOL_GPL(visorchipset_set_bus_context); EXPORT_SYMBOL_GPL(visorchipset_set_bus_context);
BOOL bool
visorchipset_get_device_info(ulong bus_no, ulong dev_no, visorchipset_get_device_info(ulong bus_no, ulong dev_no,
struct visorchipset_device_info *dev_info) struct visorchipset_device_info *dev_info)
{ {
void *p = finddevice(&dev_info_list, bus_no, dev_no); void *p = finddevice(&dev_info_list, bus_no, dev_no);
if (!p) if (!p)
return FALSE; return false;
memcpy(dev_info, p, sizeof(struct visorchipset_device_info)); memcpy(dev_info, p, sizeof(struct visorchipset_device_info));
return TRUE; return true;
} }
EXPORT_SYMBOL_GPL(visorchipset_get_device_info); EXPORT_SYMBOL_GPL(visorchipset_get_device_info);
BOOL bool
visorchipset_set_device_context(ulong bus_no, ulong dev_no, void *context) visorchipset_set_device_context(ulong bus_no, ulong dev_no, void *context)
{ {
struct visorchipset_device_info *p = struct visorchipset_device_info *p =
finddevice(&dev_info_list, bus_no, dev_no); finddevice(&dev_info_list, bus_no, dev_no);
if (!p) if (!p)
return FALSE; return false;
p->bus_driver_context = context; p->bus_driver_context = context;
return TRUE; return true;
} }
EXPORT_SYMBOL_GPL(visorchipset_set_device_context); EXPORT_SYMBOL_GPL(visorchipset_set_device_context);
/* Generic wrapper function for allocating memory from a kmem_cache pool. /* Generic wrapper function for allocating memory from a kmem_cache pool.
*/ */
void * void *
visorchipset_cache_alloc(struct kmem_cache *pool, BOOL ok_to_block, visorchipset_cache_alloc(struct kmem_cache *pool, bool ok_to_block,
char *fn, int ln) char *fn, int ln)
{ {
gfp_t gfp; gfp_t gfp;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment