linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: jgarzik@pobox.com, alan@lxorguk.ukuu.org.uk, albertcc@tw.ibm.com,
	linux-ide@vger.kernel.org
Cc: Tejun Heo <htejun@gmail.com>
Subject: [PATCH 1/7] libata: implement ata_dev_absent()
Date: Sun, 2 Apr 2006 17:54:46 +0900	[thread overview]
Message-ID: <11439680861163-git-send-email-htejun@gmail.com> (raw)
In-Reply-To: <11439680863256-git-send-email-htejun@gmail.com>

For the time being we cannot use ata_dev_present() as it was renamed
to ata_dev_enabled() but we still need presence test.  Implement
negation of the test.  Conveniently, the negated result is needed in
more places.  This is suggested by Jeff Garzik.

Signed-off-by: Tejun Heo <htejun@gmail.com>

---

 include/linux/libata.h |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

21da2f0caf63d617a633a97635ab5d1ca5a407b1
diff --git a/include/linux/libata.h b/include/linux/libata.h
index c6883ba..0f8e372 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -682,6 +682,11 @@ static inline unsigned int ata_class_dis
 	return class == ATA_DEV_ATA_UNSUP || class == ATA_DEV_ATAPI_UNSUP;
 }
 
+static inline unsigned int ata_class_absent(unsigned int class)
+{
+	return !ata_class_enabled(class) && !ata_class_disabled(class);
+}
+
 static inline unsigned int ata_dev_enabled(const struct ata_device *dev)
 {
 	return ata_class_enabled(dev->class);
@@ -692,6 +697,11 @@ static inline unsigned int ata_dev_disab
 	return ata_class_disabled(dev->class);
 }
 
+static inline unsigned int ata_dev_absent(const struct ata_device *dev)
+{
+	return ata_class_absent(dev->class);
+}
+
 static inline u8 ata_chk_status(struct ata_port *ap)
 {
 	return ap->ops->check_status(ap);
-- 
1.2.4



  reply	other threads:[~2006-04-02  8:54 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-02  8:54 [PATCHSET] libata: improve ata_bus_probe failure handling, take 2 Tejun Heo
2006-04-02  8:54 ` Tejun Heo [this message]
2006-04-02  8:54 ` [PATCH 5/7] libata: implement ata_down_xfermask_limit() Tejun Heo
2006-04-02  8:54 ` [PATCH 2/7] libata: implement ap->sata_spd_limit and helpers Tejun Heo
2006-04-02 10:43   ` Jeff Garzik
2006-04-02 11:04     ` Tejun Heo
2006-04-02 11:18       ` Jeff Garzik
2006-04-02 11:53         ` Tejun Heo
2006-04-02  8:54 ` [PATCH 6/7] libata: improve ata_bus_probe() Tejun Heo
2006-04-02 10:47   ` Jeff Garzik
2006-04-02  8:54 ` [PATCH 4/7] libata: add 5s sleep between resets Tejun Heo
2006-04-02 11:55   ` Tejun Heo
2006-04-02  8:54 ` [PATCH 3/7] libata: use SATA speed down in ata_drive_probe_reset() Tejun Heo
2006-04-02  8:54 ` [PATCH 7/7] libata: consider disabled devices in ata_dev_xfermask() Tejun Heo
2006-04-02 14:35 ` [PATCHSET] libata: improve ata_bus_probe failure handling, take 2 Jeff Garzik
2006-04-03  9:37   ` Albert Lee
2006-04-03 10:38     ` Jeff Garzik
2006-04-03 14:37       ` Greg Freemyer
2006-04-03 16:20         ` Jeff Garzik
2006-04-04 13:02           ` Greg Freemyer
2006-04-04 13:11             ` Jeff Garzik
2006-04-04  5:02       ` Albert Lee
2006-04-03  9:43   ` [PATCH] libata-dev: irq-pio minor fix Albert Lee
2006-04-04 12:42     ` Jeff Garzik
2006-04-03 10:31   ` [PATCH] libata-dev: irq-pio minor fix 2 Albert Lee

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=11439680861163-git-send-email-htejun@gmail.com \
    --to=htejun@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=albertcc@tw.ibm.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    /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).