Skip to content

Commit d67aed6

Browse files
committed
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>
1 parent b638d7e commit d67aed6

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎drivers/pci/hotplug/pci_hotplug_core.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,8 @@ int pci_hp_deregister(struct hotplug_slot *hotplug)
517517
*
518518
* Returns 0 if successful, anything else for an error.
519519
*/
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)
522522
{
523523
if (!hotplug || !info)
524524
return -ENODEV;

‎drivers/pci/hotplug/shpchp_sysfs.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ static ssize_t show_ctrl (struct device *dev, struct device_attribute *attr, cha
8585
}
8686
static DEVICE_ATTR (ctrl, S_IRUGO, show_ctrl, NULL);
8787

88-
int __must_check shpchp_create_ctrl_files (struct controller *ctrl)
88+
int shpchp_create_ctrl_files (struct controller *ctrl)
8989
{
9090
return device_create_file (&ctrl->pci_dev->dev, &dev_attr_ctrl);
9191
}

0 commit comments

Comments
 (0)