linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: nigel@nigel.suspend2.net
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	linux-ide@vger.kernel.org, jgarzik@pobox.com,
	linux-pm@lists.osdl.org, stable@kernel.org,
	Alan <alan@lxorguk.ukuu.org.uk>,
	linux-kernel@vger.kernel.org
Subject: Re: [linux-pm] [PATCH 2/2 -stable] libata: add missing CONFIG_PM in LLDs
Date: Sat, 03 Mar 2007 12:20:35 +0900	[thread overview]
Message-ID: <45E8E983.5030109@gmail.com> (raw)
In-Reply-To: <1172881095.18544.108.camel@nigel.suspend2.net>

Hello, Nigel.

Nigel Cunningham wrote:
>> Index: work1/drivers/ata/ahci.c
>> ===================================================================
>> --- work1.orig/drivers/ata/ahci.c
>> +++ work1/drivers/ata/ahci.c
>> @@ -225,10 +225,12 @@ static void ahci_thaw(struct ata_port *a
>>  static void ahci_error_handler(struct ata_port *ap);
>>  static void ahci_vt8251_error_handler(struct ata_port *ap);
>>  static void ahci_post_internal_cmd(struct ata_queued_cmd *qc);
>> +#ifdef CONFIG_PM
>>  static int ahci_port_suspend(struct ata_port *ap, pm_message_t mesg);
>>  static int ahci_port_resume(struct ata_port *ap);
>>  static int ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg);
>>  static int ahci_pci_device_resume(struct pci_dev *pdev);
> 
> Wouldn't it be simpler to add
> 
> #else
> #define ahci_port_suspend(port, message) (NULL)
> 
> etc (or something similar)?

ahci_port_suspend() is used to fill ata_port_ops vector, so it needs to
be a function.  If you're talking about defining NULL function, yeah,
that will remove half of CONFIG_PMs but would require dummy definitions
for all functions.  I think both are ugly.  :-)

I'm working on a linker trick.  Please take a look at the following thread.

  http://thread.gmane.org/gmane.linux.ide/16475

-- 
tejun

  reply	other threads:[~2007-03-03  3:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20061122172841.0b90f042@localhost.localdomain>
     [not found] ` <Pine.LNX.4.60.0702262150460.5079@poirot.grange>
     [not found]   ` <Pine.LNX.4.60.0702282201250.8832@poirot.grange>
2007-03-01 22:11     ` [PATCH] pata_sil680 suspend/resume Guennadi Liakhovetski
2007-03-02  8:45       ` [PATCH 1/2 -stable] libata: add missing PM callbacks Tejun Heo
2007-03-02  8:46         ` [PATCH 2/2 -stable] libata: add missing CONFIG_PM in LLDs Tejun Heo
2007-03-03  0:18           ` Nigel Cunningham
2007-03-03  3:20             ` Tejun Heo [this message]
2007-03-03  5:34               ` [linux-pm] " Nigel Cunningham
2007-03-02 22:42         ` [PATCH 1/2 -stable] libata: add missing PM callbacks Guennadi Liakhovetski

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=45E8E983.5030109@gmail.com \
    --to=htejun@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=g.liakhovetski@gmx.de \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.osdl.org \
    --cc=nigel@nigel.suspend2.net \
    --cc=stable@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).