Commit f30c2c35 authored by Bryan Thompson's avatar Bryan Thompson Committed by Greg Kroah-Hartman

staging: unisys: visorbus: Remove POSTCODE_LINUX_4 macro

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