From: Gabriel C <nix.or.die@googlemail.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Jeff Garzik <jgarzik@pobox.com>, linux-ide@vger.kernel.org
Subject: libata-core.c compile warnings with !CONFIG_PM
Date: Wed, 31 Oct 2007 14:55:28 +0100 [thread overview]
Message-ID: <47288950.3030907@googlemail.com> (raw)
Hi ,
I see this warnings on current git head with !CONFIG_PM :
...
drivers/ata/libata-core.c:768: warning: 'ata_lpm_enable' defined but not used
drivers/ata/libata-core.c:784: warning: 'ata_lpm_disable' defined but not used
...
So far I see ata_lpm_enable() is only used in ata_host_suspend(), ata_lpm_disable() only
in ata_host_resume() which have already #ifdef CONFIG_PM around.
Possible fix is to do the same for ata_lpm_enable() , ata_lpm_disable() and for ata_dev_disable_pm()
which is only used in ata_lpm_enable()
Signed-off-by: Gabriel Craciunescu <nix.or.die@googlemail.com>
---
drivers/ata/libata-core.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 63035d7..7c78810 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -747,6 +747,7 @@ enable_pm_out:
* Locking: Caller.
* Returns: void
*/
+#ifdef CONFIG_PM
static void ata_dev_disable_pm(struct ata_device *dev)
{
struct ata_port *ap = dev->link->ap;
@@ -755,6 +756,7 @@ static void ata_dev_disable_pm(struct ata_device *dev)
if (ap->ops->disable_pm)
ap->ops->disable_pm(ap);
}
+#endif
void ata_lpm_schedule(struct ata_port *ap, enum link_pm policy)
{
@@ -764,6 +766,7 @@ void ata_lpm_schedule(struct ata_port *ap, enum link_pm policy)
ata_port_schedule_eh(ap);
}
+#ifdef CONFIG_PM
static void ata_lpm_enable(struct ata_host *host)
{
struct ata_link *link;
@@ -789,7 +792,7 @@ static void ata_lpm_disable(struct ata_host *host)
ata_lpm_schedule(ap, ap->pm_policy);
}
}
-
+#endif
/**
* ata_devchk - PATA device presence detection
reply other threads:[~2007-10-31 13:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=47288950.3030907@googlemail.com \
--to=nix.or.die@googlemail.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@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).