Re: [PATCH] [SCSI] aic7xxx: Fix warnings with CONFIG_PM=n

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux