linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: jeff@garzik.org, mjg59@srcf.ucam.org, rdunlap@xenotime.net,
	alan@lxorguk.ukuu.org.uk, forrest.zhao@gmail.com,
	lenb@kernel.org, linux-acpi@vger.kernel.org, hare@suse.de,
	linux-ide@vger.kernel.org
Cc: Tejun Heo <htejun@gmail.com>
Subject: [PATCH 10/11] libata-acpi: remove redundant checks
Date: Sat, 5 May 2007 23:50:39 +0900	[thread overview]
Message-ID: <11783766392074-git-send-email-htejun@gmail.com> (raw)
In-Reply-To: <11783766373569-git-send-email-htejun@gmail.com>

Remove remaining unnecessary feature and status checks.

Signed-off-by: Tejun Heo <htejun@gmail.com>
---
 drivers/ata/libata-acpi.c |   23 -----------------------
 1 files changed, 0 insertions(+), 23 deletions(-)

diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c
index e09df44..78db2e6 100644
--- a/drivers/ata/libata-acpi.c
+++ b/drivers/ata/libata-acpi.c
@@ -134,22 +134,10 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf,
 	output.length = ACPI_ALLOCATE_BUFFER;
 	output.pointer = NULL;	/* ACPI-CA sets this; save/free it later */
 
-	if (!dev->acpi_handle)
-		goto out_free;
-
 	if (ata_msg_probe(ap))
 		ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER: port#: %d\n",
 			       __FUNCTION__, ap->port_no);
 
-	if (!ata_dev_enabled(dev) || (ap->flags & ATA_FLAG_DISABLED)) {
-		if (ata_msg_probe(ap))
-			ata_dev_printk(dev, KERN_DEBUG, "%s: ERR: "
-				"ata_dev_present: %d, PORT_DISABLED: %lu\n",
-				__FUNCTION__, ata_dev_enabled(dev),
-				ap->flags & ATA_FLAG_DISABLED);
-		goto out_free;
-	}
-
 	/* _GTF has no input parameters */
 	status = acpi_evaluate_object(dev->acpi_handle, "_GTF", NULL, &output);
 
@@ -340,21 +328,10 @@ static int ata_acpi_push_id(struct ata_device *dev)
 	struct acpi_object_list input;
 	union acpi_object in_params[1];
 
-	if (!dev->acpi_handle)
-		return 0;
-
 	if (ata_msg_probe(ap))
 		ata_dev_printk(dev, KERN_DEBUG, "%s: ix = %d, port#: %d\n",
 			       __FUNCTION__, dev->devno, ap->port_no);
 
-	/* Don't continue if not a SATA device. */
-	if (!(ap->flags & ATA_FLAG_ACPI_SATA)) {
-		if (ata_msg_probe(ap))
-			ata_dev_printk(dev, KERN_DEBUG,
-				"%s: Not a SATA device\n", __FUNCTION__);
-		return 0;
-	}
-
 	/* Give the drive Identify data to the drive via the _SDD method */
 	/* _SDD: set up input parameters */
 	input.count = 1;
-- 
1.5.0.3



  parent reply	other threads:[~2007-05-05 14:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-05 14:50 [PATCHSET] libata: improve ATA ACPI support, take#2 Tejun Heo
2007-05-05 14:50 ` [PATCH 01/11] libata: separate out ata_dev_reread_id() Tejun Heo
2007-05-05 14:50 ` [PATCH 02/11] libata: during revalidation, check n_sectors after device is configured Tejun Heo
2007-05-05 14:50 ` [PATCH 06/11] libata-acpi: implement ata_acpi_associate() Tejun Heo
2007-05-05 14:50 ` [PATCH 03/11] libata-acpi: s/CONFIG_SATA_ACPI/CONFIG_ATA_ACPI/ Tejun Heo
2007-05-11 22:13   ` Jeff Garzik
2007-05-05 14:50 ` [PATCH 05/11] libata-acpi: add ATA_FLAG_ACPI_SATA port flag Tejun Heo
2007-05-05 14:50 ` [PATCH 04/11] libata-acpi: clean up parameters and misc stuff Tejun Heo
2007-05-05 14:50 ` [PATCH 07/11] libata-acpi: clean up ata_acpi_exec_tfs() Tejun Heo
2007-05-05 14:50 ` [PATCH 11/11] libata-acpi: implement _GTM/_STM support Tejun Heo
2007-05-05 14:50 ` Tejun Heo [this message]
2007-05-05 14:50 ` [PATCH 09/11] libata: reimplement ACPI invocation Tejun Heo
2007-05-05 14:50 ` [PATCH 08/11] libata-acpi: miscellaneous cleanups Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11783766392074-git-send-email-htejun@gmail.com \
    --to=htejun@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=forrest.zhao@gmail.com \
    --cc=hare@suse.de \
    --cc=jeff@garzik.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=rdunlap@xenotime.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).