aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pci.h
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2005-08-09 00:20:10 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-09-09 14:24:31 -0400
commit144a50ea5e1487b8b8e722289b4177713354448a (patch)
tree061183fc40ee173cd9cb3a80c93ea4ef8284093d /include/linux/pci.h
parent7bcf5c0e7fd9ab4ddb9e24d7e91bda2ac23e5678 (diff)
[PATCH] must_check attributes for PCI layer.
Self explanatory really. Some newer gcc's print a warning if a function is used and we don't check its result. We do this for a bunch of things in the kernel already, this extends that to the PCI layer. Based on a patch originally from Arjan van de Ven. Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 6caaba0af469..609499356e07 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -376,32 +376,32 @@ static inline int pci_write_config_dword(struct pci_dev *dev, int where, u32 val
376 return pci_bus_write_config_dword (dev->bus, dev->devfn, where, val); 376 return pci_bus_write_config_dword (dev->bus, dev->devfn, where, val);
377} 377}
378 378
379int pci_enable_device(struct pci_dev *dev); 379int __must_check pci_enable_device(struct pci_dev *dev);
380int pci_enable_device_bars(struct pci_dev *dev, int mask); 380int __must_check pci_enable_device_bars(struct pci_dev *dev, int mask);
381void pci_disable_device(struct pci_dev *dev); 381void pci_disable_device(struct pci_dev *dev);
382void pci_set_master(struct pci_dev *dev); 382void pci_set_master(struct pci_dev *dev);
383#define HAVE_PCI_SET_MWI 383#define HAVE_PCI_SET_MWI
384int pci_set_mwi(struct pci_dev *dev); 384int __must_check pci_set_mwi(struct pci_dev *dev);
385void pci_clear_mwi(struct pci_dev *dev); 385void pci_clear_mwi(struct pci_dev *dev);
386void pci_intx(struct pci_dev *dev, int enable); 386void pci_intx(struct pci_dev *dev, int enable);
387int pci_set_dma_mask(struct pci_dev *dev, u64 mask); 387int __must_check pci_set_dma_mask(struct pci_dev *dev, u64 mask);
388int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); 388int __must_check pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask);
389void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); 389void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno);
390int pci_assign_resource(struct pci_dev *dev, int i); 390int pci_assign_resource(struct pci_dev *dev, int i);
391void pci_restore_bars(struct pci_dev *dev); 391void pci_restore_bars(struct pci_dev *dev);
392 392
393/* ROM control related routines */ 393/* ROM control related routines */
394void __iomem *pci_map_rom(struct pci_dev *pdev, size_t *size); 394void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size);
395void __iomem *pci_map_rom_copy(struct pci_dev *pdev, size_t *size); 395void __iomem __must_check *pci_map_rom_copy(struct pci_dev *pdev, size_t *size);
396void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom); 396void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom);
397void pci_remove_rom(struct pci_dev *pdev); 397void pci_remove_rom(struct pci_dev *pdev);
398 398
399/* Power management related routines */ 399/* Power management related routines */
400int pci_save_state(struct pci_dev *dev); 400int pci_save_state(struct pci_dev *dev);
401int pci_restore_state(struct pci_dev *dev); 401int pci_restore_state(struct pci_dev *dev);
402int pci_set_power_state(struct pci_dev *dev, pci_power_t state); 402int __must_check pci_set_power_state(struct pci_dev *dev, pci_power_t state);
403pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); 403pci_power_t __must_check pci_choose_state(struct pci_dev *dev, pm_message_t state);
404int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable); 404int __must_check pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable);
405 405
406/* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */ 406/* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */
407void pci_bus_assign_resources(struct pci_bus *bus); 407void pci_bus_assign_resources(struct pci_bus *bus);