aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys
diff options
context:
space:
mode:
authorDavid Kershner <david.kershner@unisys.com>2017-08-30 13:36:13 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-08-31 18:17:38 +0200
commit800da5fb3f9770c27c5b24e5a7e265f5ea51e98e (patch)
tree7550cdde9d7c9cc0fd6776c04dcc8ac2ddc71a31 /drivers/staging/unisys
parentstaging: unisys: visornic: Fix miscellaneous block comment format issues. (diff)
downloadlinux-dev-800da5fb3f9770c27c5b24e5a7e265f5ea51e98e.tar.xz
linux-dev-800da5fb3f9770c27c5b24e5a7e265f5ea51e98e.zip
staging: unisys: visorbus: Clean up vmcall address function.
The function vmcall address needed to be cleaned up. The structure vmcall_controlvm_addr was not needed so it was removed and was replaced with vmcall_io_controlvm_addr_params since it needs to be allocated on the heap for DMA access. With the structure removed and the fields as local variables, it helped clean up the formatting of the function. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys')
-rw-r--r--drivers/staging/unisys/visorbus/visorchipset.c27
1 files changed, 11 insertions, 16 deletions
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index e296df78c835..7423c9e6f94a 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -86,12 +86,6 @@ struct vmcall_io_controlvm_addr_params {
u8 unused[4];
} __packed;
-struct vmcall_controlvm_addr {
- struct vmcall_io_controlvm_addr_params params;
- int err;
- u64 physaddr;
-};
-
struct visorchipset_device {
struct acpi_device *acpi_device;
unsigned long poll_jiffies;
@@ -109,7 +103,7 @@ struct visorchipset_device {
*/
struct controlvm_message controlvm_pending_msg;
bool controlvm_pending_msg_valid;
- struct vmcall_controlvm_addr controlvm_addr;
+ struct vmcall_io_controlvm_addr_params controlvm_params;
};
static struct visorchipset_device *chipset_dev;
@@ -1341,15 +1335,16 @@ error:
static unsigned int issue_vmcall_io_controlvm_addr(u64 *control_addr,
u32 *control_bytes)
{
- chipset_dev->controlvm_addr.physaddr = virt_to_phys(
- &chipset_dev->controlvm_addr.params);
- chipset_dev->controlvm_addr.err = unisys_vmcall(VMCALL_CONTROLVM_ADDR,
- chipset_dev->controlvm_addr.physaddr);
- if (chipset_dev->controlvm_addr.err)
- return chipset_dev->controlvm_addr.err;
-
- *control_addr = chipset_dev->controlvm_addr.params.address;
- *control_bytes = chipset_dev->controlvm_addr.params.channel_bytes;
+ u64 physaddr;
+ int err;
+
+ physaddr = virt_to_phys(&chipset_dev->controlvm_params);
+ err = unisys_vmcall(VMCALL_CONTROLVM_ADDR, physaddr);
+ if (err)
+ return err;
+
+ *control_addr = chipset_dev->controlvm_params.address;
+ *control_bytes = chipset_dev->controlvm_params.channel_bytes;
return 0;
}