diff options
Diffstat (limited to 'drivers/staging/unisys/visorbus')
-rw-r--r-- | drivers/staging/unisys/visorbus/periodic_work.c | 8 | ||||
-rw-r--r-- | drivers/staging/unisys/visorbus/visorchannel.c | 8 | ||||
-rw-r--r-- | drivers/staging/unisys/visorbus/visorchipset.c | 2 | ||||
-rw-r--r-- | drivers/staging/unisys/visorbus/vmcallinterface.h | 54 |
4 files changed, 10 insertions, 62 deletions
diff --git a/drivers/staging/unisys/visorbus/periodic_work.c b/drivers/staging/unisys/visorbus/periodic_work.c index a3631c359..115b7aa95 100644 --- a/drivers/staging/unisys/visorbus/periodic_work.c +++ b/drivers/staging/unisys/visorbus/periodic_work.c @@ -86,8 +86,8 @@ bool visor_periodic_work_nextperiod(struct periodic_work *pw) pw->want_to_stop = false; rc = true; /* yes, true; see visor_periodic_work_stop() */ goto unlock; - } else if (queue_delayed_work(pw->workqueue, &pw->work, - pw->jiffy_interval) < 0) { + } else if (!queue_delayed_work(pw->workqueue, &pw->work, + pw->jiffy_interval)) { pw->is_scheduled = false; rc = false; goto unlock; @@ -117,8 +117,8 @@ bool visor_periodic_work_start(struct periodic_work *pw) goto unlock; } INIT_DELAYED_WORK(&pw->work, &periodic_work_func); - if (queue_delayed_work(pw->workqueue, &pw->work, - pw->jiffy_interval) < 0) { + if (!queue_delayed_work(pw->workqueue, &pw->work, + pw->jiffy_interval)) { rc = false; goto unlock; } diff --git a/drivers/staging/unisys/visorbus/visorchannel.c b/drivers/staging/unisys/visorbus/visorchannel.c index 2693c46af..a4e117f10 100644 --- a/drivers/staging/unisys/visorbus/visorchannel.c +++ b/drivers/staging/unisys/visorbus/visorchannel.c @@ -279,7 +279,7 @@ visorchannel_clear(struct visorchannel *channel, ulong offset, u8 ch, int written = 0; u8 *buf; - buf = (u8 *) __get_free_page(GFP_KERNEL); + buf = (u8 *)__get_free_page(GFP_KERNEL); if (!buf) return -ENOMEM; @@ -301,7 +301,7 @@ visorchannel_clear(struct visorchannel *channel, ulong offset, u8 ch, err = 0; cleanup: - free_page((unsigned long) buf); + free_page((unsigned long)buf); return err; } EXPORT_SYMBOL_GPL(visorchannel_clear); @@ -332,7 +332,7 @@ EXPORT_SYMBOL_GPL(visorchannel_get_header); */ #define SIG_WRITE_FIELD(channel, queue, sig_hdr, FIELD) \ (visorchannel_write(channel, \ - SIG_QUEUE_OFFSET(&channel->chan_hdr, queue)+ \ + SIG_QUEUE_OFFSET(&channel->chan_hdr, queue) +\ offsetof(struct signal_queue_header, FIELD), \ &((sig_hdr)->FIELD), \ sizeof((sig_hdr)->FIELD)) >= 0) @@ -468,7 +468,7 @@ signalinsert_inner(struct visorchannel *channel, u32 queue, void *msg) SIG_QUEUE_OFFSET(&channel->chan_hdr, queue) + offsetof(struct signal_queue_header, num_overflows), - &(sig_hdr.num_overflows), + &sig_hdr.num_overflows, sizeof(sig_hdr.num_overflows)); return false; } diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c index 94419c36d..07594f438 100644 --- a/drivers/staging/unisys/visorbus/visorchipset.c +++ b/drivers/staging/unisys/visorbus/visorchipset.c @@ -696,7 +696,7 @@ struct visor_busdev { static int match_visorbus_dev_by_id(struct device *dev, void *data) { struct visor_device *vdev = to_visor_device(dev); - struct visor_busdev *id = (struct visor_busdev *)data; + struct visor_busdev *id = data; u32 bus_no = id->bus_no; u32 dev_no = id->dev_no; diff --git a/drivers/staging/unisys/visorbus/vmcallinterface.h b/drivers/staging/unisys/visorbus/vmcallinterface.h index 7abd27a61..c8d8483bd 100644 --- a/drivers/staging/unisys/visorbus/vmcallinterface.h +++ b/drivers/staging/unisys/visorbus/vmcallinterface.h @@ -46,21 +46,13 @@ enum vmcall_monitor_interface_method_tuple { /* VMCALL identification tuples */ VMCALL_IO_CONTROLVM_ADDR = 0x0501, /* used by all Guests, not just * IO */ - VMCALL_IO_DIAG_ADDR = 0x0508, - VMCALL_IO_VISORSERIAL_ADDR = 0x0509, VMCALL_QUERY_GUEST_VIRTUAL_TIME_OFFSET = 0x0708, /* Allow caller to * query virtual time * offset */ - VMCALL_CHANNEL_VERSION_MISMATCH = 0x0709, VMCALL_POST_CODE_LOGEVENT = 0x070B, /* LOGEVENT Post Code (RDX) with * specified subsystem mask (RCX * - monitor_subsystems.h) and * severity (RDX) */ - VMCALL_GENERIC_SURRENDER_QUANTUM_FOREVER = 0x0802, /* Yield the - * remainder & all - * future quantums of - * the caller */ - VMCALL_MEASUREMENT_DO_NOTHING = 0x0901, VMCALL_UPDATE_PHYSICAL_TIME = 0x0a02 /* Allow * ULTRA_SERVICE_CAPABILITY_TIME * capable guest to make @@ -90,9 +82,6 @@ enum vmcall_monitor_interface_method_tuple { /* VMCALL identification tuples */ /* Structures for IO VMCALLs */ -/* ///////////// BEGIN PRAGMA PACK PUSH 1 ///////////////////////// */ -/* ///////////// ONLY STRUCT TYPE SHOULD BE BELOW */ -#pragma pack(push, 1) /* Parameters to VMCALL_IO_CONTROLVM_ADDR interface */ struct vmcall_io_controlvm_addr_params { /* The Guest-relative physical address of the ControlVm channel. @@ -102,47 +91,6 @@ struct vmcall_io_controlvm_addr_params { * in with the appropriate address. */ u32 channel_bytes; /* contents provided by this VMCALL (OUT) */ u8 unused[4]; /* Unused Bytes in the 64-Bit Aligned Struct */ -}; - -#pragma pack(pop) -/* ///////////// END PRAGMA PACK PUSH 1 /////////////////////////// */ - -/* ///////////// BEGIN PRAGMA PACK PUSH 1 ///////////////////////// */ -/* ///////////// ONLY STRUCT TYPE SHOULD BE BELOW */ -#pragma pack(push, 1) -/* Parameters to VMCALL_IO_DIAG_ADDR interface */ -struct vmcall_io_diag_addr_params { - /* The Guest-relative physical address of the diagnostic channel. - * This VMCall fills this in with the appropriate address. */ - u64 address; /* contents provided by this VMCALL (OUT) */ -}; - -#pragma pack(pop) -/* ///////////// END PRAGMA PACK PUSH 1 /////////////////////////// */ - -/* ///////////// BEGIN PRAGMA PACK PUSH 1 ///////////////////////// */ -/* ///////////// ONLY STRUCT TYPE SHOULD BE BELOW */ -#pragma pack(push, 1) -/* Parameters to VMCALL_IO_VISORSERIAL_ADDR interface */ -struct vmcall_io_visorserial_addr_params { - /* The Guest-relative physical address of the serial console - * channel. This VMCall fills this in with the appropriate - * address. */ - u64 address; /* contents provided by this VMCALL (OUT) */ -}; - -#pragma pack(pop) -/* ///////////// END PRAGMA PACK PUSH 1 /////////////////////////// */ - -/* Parameters to VMCALL_CHANNEL_MISMATCH interface */ -struct vmcall_channel_version_mismatch_params { - u8 chname[32]; /* Null terminated string giving name of channel - * (IN) */ - u8 item_name[32]; /* Null terminated string giving name of - * mismatched item (IN) */ - u32 line_no; /* line# where invoked. (IN) */ - u8 file_name[36]; /* source code where invoked - Null terminated - * string (IN) */ -}; +} __packed; #endif /* __IOMONINTF_H__ */ |