From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756418AbcGGHcn (ORCPT ); Thu, 7 Jul 2016 03:32:43 -0400 Received: from prv-mh.provo.novell.com ([137.65.248.74]:43950 "EHLO prv-mh.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756324AbcGGHcg convert rfc822-to-8bit (ORCPT ); Thu, 7 Jul 2016 03:32:36 -0400 Message-Id: <577E21B302000078000FBDB9@prv-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.2.0 Date: Thu, 07 Jul 2016 01:32:35 -0600 From: "Jan Beulich" To: , , "Juergen Gross" Cc: , Subject: [PATCH 2/2] xenbus: simplify xenbus_dev_request_and_reply() References: <577E1FFE02000078000FBD8C@prv-mh.provo.novell.com> In-Reply-To: <577E1FFE02000078000FBD8C@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org No need to retain a local copy of the full request message, only the type is really needed. Signed-off-by: Jan Beulich --- drivers/xen/xenbus/xenbus_xs.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) --- 4.7-rc6-xen.orig/drivers/xen/xenbus/xenbus_xs.c +++ 4.7-rc6-xen/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(struc 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;