forked from Minki/linux
staging: unisys: visorbus: Remove POSTCODE_LINUX_4 macro
Call POSTCODE_LINUX directly instead of passing through POSTCODE_LINUX_4. Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6daa8205e1
commit
f30c2c355c
@ -607,8 +607,8 @@ create_visor_device(struct visor_device *dev)
|
||||
u32 chipset_bus_no = dev->chipset_bus_no;
|
||||
u32 chipset_dev_no = dev->chipset_dev_no;
|
||||
|
||||
POSTCODE_LINUX_4(DEVICE_CREATE_ENTRY_PC, chipset_dev_no, chipset_bus_no,
|
||||
POSTCODE_SEVERITY_INFO);
|
||||
POSTCODE_LINUX(DEVICE_CREATE_ENTRY_PC, chipset_dev_no, chipset_bus_no,
|
||||
POSTCODE_SEVERITY_INFO);
|
||||
|
||||
mutex_init(&dev->visordriver_callback_lock);
|
||||
dev->device.bus = &visorbus_type;
|
||||
@ -1120,18 +1120,18 @@ chipset_device_create(struct visor_device *dev_info)
|
||||
u32 bus_no = dev_info->chipset_bus_no;
|
||||
u32 dev_no = dev_info->chipset_dev_no;
|
||||
|
||||
POSTCODE_LINUX_4(DEVICE_CREATE_ENTRY_PC, dev_no, bus_no,
|
||||
POSTCODE_SEVERITY_INFO);
|
||||
POSTCODE_LINUX(DEVICE_CREATE_ENTRY_PC, dev_no, bus_no,
|
||||
POSTCODE_SEVERITY_INFO);
|
||||
|
||||
rc = create_visor_device(dev_info);
|
||||
device_create_response(dev_info, rc);
|
||||
|
||||
if (rc < 0)
|
||||
POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
|
||||
POSTCODE_SEVERITY_ERR);
|
||||
POSTCODE_LINUX(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
|
||||
POSTCODE_SEVERITY_ERR);
|
||||
else
|
||||
POSTCODE_LINUX_4(DEVICE_CREATE_SUCCESS_PC, dev_no, bus_no,
|
||||
POSTCODE_SEVERITY_INFO);
|
||||
POSTCODE_LINUX(DEVICE_CREATE_SUCCESS_PC, dev_no, bus_no,
|
||||
POSTCODE_SEVERITY_INFO);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -729,9 +729,9 @@ bus_create(struct controlvm_message *inmsg)
|
||||
pmsg_hdr = kzalloc(sizeof(*pmsg_hdr),
|
||||
GFP_KERNEL);
|
||||
if (!pmsg_hdr) {
|
||||
POSTCODE_LINUX_4(MALLOC_FAILURE_PC, cmd,
|
||||
bus_info->chipset_bus_no,
|
||||
POSTCODE_SEVERITY_ERR);
|
||||
POSTCODE_LINUX(MALLOC_FAILURE_PC, cmd,
|
||||
bus_info->chipset_bus_no,
|
||||
POSTCODE_SEVERITY_ERR);
|
||||
err = -ENOMEM;
|
||||
goto err_free_bus_info;
|
||||
}
|
||||
@ -798,9 +798,9 @@ bus_destroy(struct controlvm_message *inmsg)
|
||||
if (inmsg->hdr.flags.response_expected == 1) {
|
||||
pmsg_hdr = kzalloc(sizeof(*pmsg_hdr), GFP_KERNEL);
|
||||
if (!pmsg_hdr) {
|
||||
POSTCODE_LINUX_4(MALLOC_FAILURE_PC, cmd,
|
||||
bus_info->chipset_bus_no,
|
||||
POSTCODE_SEVERITY_ERR);
|
||||
POSTCODE_LINUX(MALLOC_FAILURE_PC, cmd,
|
||||
bus_info->chipset_bus_no,
|
||||
POSTCODE_SEVERITY_ERR);
|
||||
err = -ENOMEM;
|
||||
goto err_respond;
|
||||
}
|
||||
@ -888,31 +888,31 @@ my_device_create(struct controlvm_message *inmsg)
|
||||
|
||||
bus_info = visorbus_get_device_by_id(bus_no, BUS_ROOT_DEVICE, NULL);
|
||||
if (!bus_info) {
|
||||
POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
|
||||
POSTCODE_SEVERITY_ERR);
|
||||
POSTCODE_LINUX(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
|
||||
POSTCODE_SEVERITY_ERR);
|
||||
rc = -CONTROLVM_RESP_ERROR_BUS_INVALID;
|
||||
goto out_respond;
|
||||
}
|
||||
|
||||
if (bus_info->state.created == 0) {
|
||||
POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
|
||||
POSTCODE_SEVERITY_ERR);
|
||||
POSTCODE_LINUX(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
|
||||
POSTCODE_SEVERITY_ERR);
|
||||
rc = -CONTROLVM_RESP_ERROR_BUS_INVALID;
|
||||
goto out_respond;
|
||||
}
|
||||
|
||||
dev_info = visorbus_get_device_by_id(bus_no, dev_no, NULL);
|
||||
if (dev_info && (dev_info->state.created == 1)) {
|
||||
POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
|
||||
POSTCODE_SEVERITY_ERR);
|
||||
POSTCODE_LINUX(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
|
||||
POSTCODE_SEVERITY_ERR);
|
||||
rc = -CONTROLVM_RESP_ERROR_ALREADY_DONE;
|
||||
goto out_respond;
|
||||
}
|
||||
|
||||
dev_info = kzalloc(sizeof(*dev_info), GFP_KERNEL);
|
||||
if (!dev_info) {
|
||||
POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
|
||||
POSTCODE_SEVERITY_ERR);
|
||||
POSTCODE_LINUX(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
|
||||
POSTCODE_SEVERITY_ERR);
|
||||
rc = -CONTROLVM_RESP_ERROR_KMALLOC_FAILED;
|
||||
goto out_respond;
|
||||
}
|
||||
@ -924,8 +924,8 @@ my_device_create(struct controlvm_message *inmsg)
|
||||
/* not sure where the best place to set the 'parent' */
|
||||
dev_info->device.parent = &bus_info->device;
|
||||
|
||||
POSTCODE_LINUX_4(DEVICE_CREATE_ENTRY_PC, dev_no, bus_no,
|
||||
POSTCODE_SEVERITY_INFO);
|
||||
POSTCODE_LINUX(DEVICE_CREATE_ENTRY_PC, dev_no, bus_no,
|
||||
POSTCODE_SEVERITY_INFO);
|
||||
|
||||
visorchannel =
|
||||
visorchannel_create_with_lock(cmd->create_device.channel_addr,
|
||||
@ -934,8 +934,8 @@ my_device_create(struct controlvm_message *inmsg)
|
||||
cmd->create_device.data_type_uuid);
|
||||
|
||||
if (!visorchannel) {
|
||||
POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
|
||||
POSTCODE_SEVERITY_ERR);
|
||||
POSTCODE_LINUX(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
|
||||
POSTCODE_SEVERITY_ERR);
|
||||
rc = -CONTROLVM_RESP_ERROR_KMALLOC_FAILED;
|
||||
goto out_free_dev_info;
|
||||
}
|
||||
@ -958,8 +958,8 @@ my_device_create(struct controlvm_message *inmsg)
|
||||
}
|
||||
/* Chipset_device_create will send response */
|
||||
chipset_device_create(dev_info);
|
||||
POSTCODE_LINUX_4(DEVICE_CREATE_EXIT_PC, dev_no, bus_no,
|
||||
POSTCODE_SEVERITY_INFO);
|
||||
POSTCODE_LINUX(DEVICE_CREATE_EXIT_PC, dev_no, bus_no,
|
||||
POSTCODE_SEVERITY_INFO);
|
||||
return;
|
||||
|
||||
out_free_dev_info:
|
||||
@ -983,14 +983,14 @@ my_device_changestate(struct controlvm_message *inmsg)
|
||||
|
||||
dev_info = visorbus_get_device_by_id(bus_no, dev_no, NULL);
|
||||
if (!dev_info) {
|
||||
POSTCODE_LINUX_4(DEVICE_CHANGESTATE_FAILURE_PC, dev_no, bus_no,
|
||||
POSTCODE_SEVERITY_ERR);
|
||||
POSTCODE_LINUX(DEVICE_CHANGESTATE_FAILURE_PC, dev_no, bus_no,
|
||||
POSTCODE_SEVERITY_ERR);
|
||||
rc = -CONTROLVM_RESP_ERROR_DEVICE_INVALID;
|
||||
goto err_respond;
|
||||
}
|
||||
if (dev_info->state.created == 0) {
|
||||
POSTCODE_LINUX_4(DEVICE_CHANGESTATE_FAILURE_PC, dev_no, bus_no,
|
||||
POSTCODE_SEVERITY_ERR);
|
||||
POSTCODE_LINUX(DEVICE_CHANGESTATE_FAILURE_PC, dev_no, bus_no,
|
||||
POSTCODE_SEVERITY_ERR);
|
||||
rc = -CONTROLVM_RESP_ERROR_DEVICE_INVALID;
|
||||
goto err_respond;
|
||||
}
|
||||
|
@ -241,7 +241,6 @@ enum event_pc { /* POSTCODE event identifier tuples */
|
||||
* entered/exited from.
|
||||
*/
|
||||
|
||||
/* BASE FUNCTIONS */
|
||||
#define POSTCODE_LINUX(EVENT_PC, pc16bit1, pc16bit2, severity) \
|
||||
do { \
|
||||
unsigned long long post_code_temp; \
|
||||
@ -253,8 +252,4 @@ do { \
|
||||
ISSUE_IO_VMCALL_POSTCODE_SEVERITY(post_code_temp, severity); \
|
||||
} while (0)
|
||||
|
||||
/* MOST COMMON */
|
||||
#define POSTCODE_LINUX_4(EVENT_PC, pc16bit1, pc16bit2, severity) \
|
||||
POSTCODE_LINUX(EVENT_PC, pc16bit1, pc16bit2, severity)
|
||||
|
||||
#endif /* __IOMONINTF_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user