From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPQU1-00062u-Gy for qemu-devel@nongnu.org; Tue, 19 Jul 2016 04:34:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPQTz-0003Lz-LA for qemu-devel@nongnu.org; Tue, 19 Jul 2016 04:34:28 -0400 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:36458) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPQTz-0003Lk-EC for qemu-devel@nongnu.org; Tue, 19 Jul 2016 04:34:27 -0400 Received: by mail-wm0-x241.google.com with SMTP id x83so2004128wma.3 for ; Tue, 19 Jul 2016 01:34:27 -0700 (PDT) Received: from donizetti.lan (94-39-158-5.adsl-ull.clienti.tiscali.it. [94.39.158.5]) by smtp.gmail.com with ESMTPSA id o142sm20886055wme.20.2016.07.19.01.34.25 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Jul 2016 01:34:25 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 19 Jul 2016 10:34:12 +0200 Message-Id: <1468917259-8475-6-git-send-email-pbonzini@redhat.com> In-Reply-To: <1468917259-8475-1-git-send-email-pbonzini@redhat.com> References: <1468917259-8475-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 05/12] megasas: remove useless check for cmd->frame List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org megasas_enqueue_frame always returns with non-NULL cmd->frame. Remove the "else" part as it is dead code. Signed-off-by: Paolo Bonzini --- hw/scsi/megasas.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index 52a4123..e968302 100644 --- a/hw/scsi/megasas.c +++ b/hw/scsi/megasas.c @@ -1981,11 +1981,7 @@ static void megasas_handle_frame(MegasasState *s, uint64_t frame_addr, break; } if (frame_status != MFI_STAT_INVALID_STATUS) { - if (cmd->frame) { - cmd->frame->header.cmd_status = frame_status; - } else { - megasas_frame_set_cmd_status(s, frame_addr, frame_status); - } + cmd->frame->header.cmd_status = frame_status; megasas_unmap_frame(s, cmd); megasas_complete_frame(s, cmd->context); } -- 2.7.4