summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJan Beulich <JBeulich@suse.com>2016-07-07 01:32:35 -0600
committerDavid Vrabel <david.vrabel@citrix.com>2016-07-08 11:50:29 +0100
commite5a79475a7ae171fef82608c6e11f51bb85a6745 (patch)
tree5af6f17112e6419dad5afd1ba5082f455b5e9703 /drivers
parent7469be95a487319514adce2304ad2af3553d2fc9 (diff)
xenbus: simplify xenbus_dev_request_and_reply()
No need to retain a local copy of the full request message, only the type is really needed. Signed-off-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/xen/xenbus/xenbus_xs.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c
index 0bd3d47ad24d..22f7cd711c57 100644
--- a/drivers/xen/xenbus/xenbus_xs.c
+++ b/drivers/xen/xenbus/xenbus_xs.c
@@ -232,10 +232,10 @@ static void transaction_resume(void)
void *xenbus_dev_request_and_reply(struct xsd_sockmsg *msg)
{
void *ret;
- struct xsd_sockmsg req_msg = *msg;
+ enum xsd_sockmsg_type type = msg->type;
int err;
- if (req_msg.type == XS_TRANSACTION_START)
+ if (type == XS_TRANSACTION_START)
transaction_start();
mutex_lock(&xs_state.request_mutex);
@@ -250,8 +250,7 @@ void *xenbus_dev_request_and_reply(struct xsd_sockmsg *msg)
mutex_unlock(&xs_state.request_mutex);
if ((msg->type == XS_TRANSACTION_END) ||
- ((req_msg.type == XS_TRANSACTION_START) &&
- (msg->type == XS_ERROR)))
+ ((type == XS_TRANSACTION_START) && (msg->type == XS_ERROR)))
transaction_end();
return ret;