From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bP4qO-0003Wl-TF for qemu-devel@nongnu.org; Mon, 18 Jul 2016 05:28:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bP4qN-0006WG-1V for qemu-devel@nongnu.org; Mon, 18 Jul 2016 05:28:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49460) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bP4qM-0006WB-S4 for qemu-devel@nongnu.org; Mon, 18 Jul 2016 05:28:06 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7B71865410 for ; Mon, 18 Jul 2016 09:28:06 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u6I9RuJ0025611 for ; Mon, 18 Jul 2016 05:28:05 -0400 From: Paolo Bonzini Date: Mon, 18 Jul 2016 11:27:37 +0200 Message-Id: <1468834075-25669-6-git-send-email-pbonzini@redhat.com> In-Reply-To: <1468834075-25669-1-git-send-email-pbonzini@redhat.com> References: <1468834075-25669-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 05/23] 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