From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c5BHe-0000N0-NN for qemu-devel@nongnu.org; Fri, 11 Nov 2016 07:50:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c5BHZ-0005kL-Q9 for qemu-devel@nongnu.org; Fri, 11 Nov 2016 07:50:18 -0500 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:35121) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c5BHZ-0005jy-Hc for qemu-devel@nongnu.org; Fri, 11 Nov 2016 07:50:13 -0500 Received: by mail-wm0-x242.google.com with SMTP id a20so9280157wme.2 for ; Fri, 11 Nov 2016 04:50:13 -0800 (PST) Date: Fri, 11 Nov 2016 12:50:10 +0000 From: Stefan Hajnoczi Message-ID: <20161111125010.GD8930@stefanha-x1.localdomain> References: <20161110152751.4267-2-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="llIrKcgUOe3dCx0c" Content-Disposition: inline In-Reply-To: <20161110152751.4267-2-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH for-2.8] megasas: clean up and fix request completion/cancellation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org --llIrKcgUOe3dCx0c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 10, 2016 at 04:27:51PM +0100, Paolo Bonzini wrote: > megasas_command_cancel is a callback; it should report the abort in > the frame, not try another abort! Compare for instance with > mptsas_request_cancelled. >=20 > So extract the common bits for request completion in a new function > megasas_complete_command, call it from both the .complete and .cancel > callbacks, and remove duplicate pieces from the DCMD path. >=20 > Signed-off-by: Paolo Bonzini > --- > hw/scsi/megasas.c | 53 ++++++++++++++++++++++++++++---------------------= ---- > 1 file changed, 28 insertions(+), 25 deletions(-) Reviewed-by: Stefan Hajnoczi > @@ -2316,7 +2319,7 @@ static const struct SCSIBusInfo megasas_scsi_info = =3D { > .transfer_data =3D megasas_xfer_complete, > .get_sg_list =3D megasas_get_sg_list, > .complete =3D megasas_command_complete, > - .cancel =3D megasas_command_cancel, > + .cancel =3D megasas_command_cancelled, Should .cancel be renamed in a separate patch? --llIrKcgUOe3dCx0c Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJYJb6CAAoJEJykq7OBq3PInFsH/00A+rX1PwkERds/ONRwnCtO Q7toQNCl5I7zGvv0wcxhT/qhBZPeKb87NVSv6A0o3PO5zL8GAlWdKXPrwoxKgDze FBKlMHVNp6aUs3J0ghdUcItL/1mJVez9fdO3OZZhdxqiu0lGFfY15h7OkIuIL0ih kCQy3MFc4IWQVOXh2t7i1v5U5w5xyCUSo2GeTD3nE6+GunDo9mcFtcXN1vHztEqs 6yHhH37ZlMPylQEuZ/WxFyM2jf+vNzBbdmnOWsTgxquqwenumwwT4uz3b+h7QcwB BD7KHuJfAiuuAGISgofM+eSLb1Yf0vf+6qbgsqY0BZGGSVZqCVoecRTSkOA3szc= =bug0 -----END PGP SIGNATURE----- --llIrKcgUOe3dCx0c--