PCI: Remove __must_check from definitions
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 12 Apr 2013 17:18:07 +0000 (11:18 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 17 Apr 2013 16:20:58 +0000 (10:20 -0600)
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>
drivers/pci/hotplug/pci_hotplug_core.c
drivers/pci/hotplug/shpchp_sysfs.c

index 9d4c199a64befab7d4a2649cd0d75e9d7687bdad..ec20f74c8981ce1a4790f0d3102759b4c68af8ef 100644 (file)
@@ -517,8 +517,8 @@ int pci_hp_deregister(struct hotplug_slot *hotplug)
  *
  * Returns 0 if successful, anything else for an error.
  */
-int __must_check pci_hp_change_slot_info(struct hotplug_slot *hotplug,
-                                        struct hotplug_slot_info *info)
+int pci_hp_change_slot_info(struct hotplug_slot *hotplug,
+                           struct hotplug_slot_info *info)
 {
        if (!hotplug || !info)
                return -ENODEV;
index eeb23ceae4a890c807e9a0ed630bf2bca91c09f6..e8c31fe20566fbd839c7c236b234ab873f2eb428 100644 (file)
@@ -85,7 +85,7 @@ static ssize_t show_ctrl (struct device *dev, struct device_attribute *attr, cha
 }
 static DEVICE_ATTR (ctrl, S_IRUGO, show_ctrl, NULL);
 
-int __must_check shpchp_create_ctrl_files (struct controller *ctrl)
+int shpchp_create_ctrl_files (struct controller *ctrl)
 {
        return device_create_file (&ctrl->pci_dev->dev, &dev_attr_ctrl);
 }