Received: from eggs.gnu.org ([2001:4830:134:3::10]:51599) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d43gC-0001Jy-Aw for qemu-devel@nongnu.org; Fri, 28 Apr 2017 07:03:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d43g9-0000rb-5Y for qemu-devel@nongnu.org; Fri, 28 Apr 2017 07:03:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36710) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d43g8-0000r1-VW for qemu-devel@nongnu.org; Fri, 28 Apr 2017 07:03:13 -0400 Date: Fri, 28 Apr 2017 16:33:05 +0530 (IST) From: P J P In-Reply-To: <5e640542-7e44-dac9-85af-e11f893dbd75@redhat.com> Message-ID: References: <20170424120634.12268-1-ppandit@redhat.com> <5e640542-7e44-dac9-85af-e11f893dbd75@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Subject: Re: [Qemu-devel] [PATCH] scsi: avoid an off-by-one error in megasas_mmio_write List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Qemu Developers , YY Z +-- On Fri, 28 Apr 2017, Paolo Bonzini wrote --+ | > | /* Magic sequence to start ADP reset */ | > | - if (adp_reset_seq[s->adp_reset] == val) { | > | - s->adp_reset++; | > | + if (adp_reset_seq[s->adp_reset++] == val) { | > | + if (s->adp_reset == 6) { | > | + s->adp_reset = 0; | > | + s->diag = MFI_DIAG_WRITE_ENABLE; | > | + } | > | } else { | > | s->adp_reset = 0; | > | s->diag = 0; | > | } | > | - if (s->adp_reset == 6) { | > | - s->diag = MFI_DIAG_WRITE_ENABLE; | > | - } | > | break; | | I've already queued this patch. Oh, okay. Thank you. -- Prasad J Pandit / Red Hat Product Security Team 47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F