Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI: Remove __must_check from definitions

The __must_check (gcc "warn_unused_result") attribute only makes sense
when compiling the *caller* of the function, so the attribute should
appear on the declaration in the header file, not on the definition.

The declarations of these functions are already annotated with
__must_check.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

+3 -3
+2 -2
drivers/pci/hotplug/pci_hotplug_core.c
··· 517 517 * 518 518 * Returns 0 if successful, anything else for an error. 519 519 */ 520 - int __must_check pci_hp_change_slot_info(struct hotplug_slot *hotplug, 521 - struct hotplug_slot_info *info) 520 + int pci_hp_change_slot_info(struct hotplug_slot *hotplug, 521 + struct hotplug_slot_info *info) 522 522 { 523 523 if (!hotplug || !info) 524 524 return -ENODEV;
+1 -1
drivers/pci/hotplug/shpchp_sysfs.c
··· 85 85 } 86 86 static DEVICE_ATTR (ctrl, S_IRUGO, show_ctrl, NULL); 87 87 88 - int __must_check shpchp_create_ctrl_files (struct controller *ctrl) 88 + int shpchp_create_ctrl_files (struct controller *ctrl) 89 89 { 90 90 return device_create_file (&ctrl->pci_dev->dev, &dev_attr_ctrl); 91 91 }