From: Randy Dunlap <randy.dunlap@oracle.com>
To: Frank Lichtenheld <frank@lichtenheld.de>
Cc: Hannes Reinecke <hare@suse.de>, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] [SCSI] aic7xxx: Fix warnings with CONFIG_PM=n
Date: Thu, 08 Nov 2007 16:17:25 -0800 [thread overview]
Message-ID: <4733A715.70008@oracle.com> (raw)
In-Reply-To: <20071109001201.GW2961@planck.djpig.de>
Frank Lichtenheld wrote:
> On Thu, Nov 08, 2007 at 03:58:34PM -0800, Randy Dunlap wrote:
>> Hi,
>> The preferred method of fixing this type of warning is to
>> (warning, not a full patch here):
>>
>> a. change the struct pci_driver not to use #ifdef CONFIG_PM/#endif;
>> instead, it always says:
>>
>> .suspend = ahd_linux_pci_dev_suspend,
>> .resume = ahd_linux_pci_dev_resume,
>>
>> and those pointers are built depending on CONFIG_PM like so:
>>
>> #ifdef CONFIG_PM
>> ... functions as they are now ...
>> #else
>> #define ahd_linux_pci_dev_suspend NULL
>> #define ahd_linux_pci_dev_resume NULL
>> #endif
>>
>> so the ifdef/endif blocks are localized to one place in each driver.
>
> Hmm, technically _two_ places since you still need them around both
> declaration and definition of the functions, right?
OK, that's the case without any code movement.
But "ideally" the functions would be defined before the
struct pci_driver data, so the prototypes for them could be removed.
--
~Randy
next prev parent reply other threads:[~2007-11-09 4:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-08 23:03 [PATCH] [SCSI] aic7xxx: Fix warnings with CONFIG_PM=n Frank Lichtenheld
2007-11-08 23:58 ` Randy Dunlap
2007-11-09 0:12 ` Frank Lichtenheld
2007-11-09 0:17 ` Randy Dunlap [this message]
2007-11-09 7:55 ` [PATCH alternative] " Frank Lichtenheld
2007-11-09 16:17 ` Randy Dunlap
2007-11-12 10:23 ` [PATCH] " Frank Lichtenheld
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=4733A715.70008@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=frank@lichtenheld.de \
--cc=hare@suse.de \
--cc=linux-scsi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.