From patchwork Fri Sep 18 15:04:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 519406 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B619F140A9A for ; Sat, 19 Sep 2015 01:43:32 +1000 (AEST) Received: from localhost ([::1]:39813 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zcxow-0005Va-F2 for incoming@patchwork.ozlabs.org; Fri, 18 Sep 2015 11:43:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38379) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcxWN-0007Ev-1k for qemu-devel@nongnu.org; Fri, 18 Sep 2015 11:24:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZcxWM-00064A-57 for qemu-devel@nongnu.org; Fri, 18 Sep 2015 11:24:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37507) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcxDU-0001DR-R4 for qemu-devel@nongnu.org; Fri, 18 Sep 2015 11:04:48 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 6D27DAB961; Fri, 18 Sep 2015 15:04:48 +0000 (UTC) Received: from scv.usersys.redhat.com (vpn-48-80.rdu2.redhat.com [10.10.48.80]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t8IF4gwa011024; Fri, 18 Sep 2015 11:04:47 -0400 From: John Snow To: qemu-devel@nongnu.org Date: Fri, 18 Sep 2015 11:04:38 -0400 Message-Id: <1442588681-18564-9-git-send-email-jsnow@redhat.com> In-Reply-To: <1442588681-18564-1-git-send-email-jsnow@redhat.com> References: <1442588681-18564-1-git-send-email-jsnow@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: peter.maydell@linaro.org, jsnow@redhat.com Subject: [Qemu-devel] [PULL 08/11] ahci: remove dead reset code X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This check is dead due to an earlier conditional. AHCI does not currently support hotplugging, so checks to see if devices are present or not are useless. Remove it. Reported-by: Stefan Hajnoczi Signed-off-by: John Snow Reviewed-by: Stefan Hajnoczi Message-id: 1441140641-17631-2-git-send-email-jsnow@redhat.com --- hw/ide/ahci.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index ad05527..0c699a7 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -602,10 +602,7 @@ static void ahci_reset_port(AHCIState *s, int port) } s->dev[port].port_state = STATE_RUN; - if (!ide_state->blk) { - pr->sig = 0; - ide_state->status = SEEK_STAT | WRERR_STAT; - } else if (ide_state->drive_kind == IDE_CD) { + if (ide_state->drive_kind == IDE_CD) { pr->sig = SATA_SIGNATURE_CDROM; ide_state->lcyl = 0x14; ide_state->hcyl = 0xeb;