提交 d67aed63 编写于 作者: B Bjorn Helgaas

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: NBjorn Helgaas <bhelgaas@google.com>
上级 b638d7e7
...@@ -517,8 +517,8 @@ int pci_hp_deregister(struct hotplug_slot *hotplug) ...@@ -517,8 +517,8 @@ int pci_hp_deregister(struct hotplug_slot *hotplug)
* *
* Returns 0 if successful, anything else for an error. * Returns 0 if successful, anything else for an error.
*/ */
int __must_check pci_hp_change_slot_info(struct hotplug_slot *hotplug, int pci_hp_change_slot_info(struct hotplug_slot *hotplug,
struct hotplug_slot_info *info) struct hotplug_slot_info *info)
{ {
if (!hotplug || !info) if (!hotplug || !info)
return -ENODEV; return -ENODEV;
......
...@@ -85,7 +85,7 @@ static ssize_t show_ctrl (struct device *dev, struct device_attribute *attr, cha ...@@ -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); 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); return device_create_file (&ctrl->pci_dev->dev, &dev_attr_ctrl);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册