8000 xenbus: simplify xenbus_dev_request_and_reply() · bsd-unix/linux@e5a7947 · GitHub
[go: up one dir, main page]

Skip to content {"props":{"docsUrl":"https://docs.github.com/get-started/accessibility/keyboard-shortcuts"}}

Commit e5a7947

Browse files
jbeulichDavid Vrabel
authored andcommitted
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>
1 parent 7469be9 commit e5a7947

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/xen/xenbus/xenbus_xs.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,10 @@ static void transaction_resume(void)
232232
void *xenbus_dev_request_and_reply(struct xsd_sockmsg *msg)
233233
{
234234
void *ret;
235-
struct xsd_sockmsg req_msg = *msg;
235+
enum xsd_sockmsg_type type = msg->type;
236236
int err;
237237

238-
if (req_msg.type == XS_TRANSACTION_START)
238+
if (type == XS_TRANSACTION_START)
239239
transaction_start();
240240

241241
mutex_lock(&xs_state.request_mutex);
@@ -250,8 +250,7 @@ void *xenbus_dev_request_and_reply(struct xsd_sockmsg *msg)
250250
mutex_unlock(&xs_state.request_mutex);
251251

252252
if ((msg->type == XS_TRANSACTION_END) ||
253-
((req_msg.type == XS_TRANSACTION_START) &&
254-
(msg->type == XS_ERROR)))
253+
((type == XS_TRANSACTION_START) && (msg->type == XS_ERROR)))
255254
transaction_end();
256255

257256
return ret;

0 commit comments

Comments
 (0)
0