Skip to content
Commit 4e2b7943 authored by Kelsey Skunberg's avatar Kelsey Skunberg Committed by Bjorn Helgaas
Browse files

PCI: sysfs: Change DEVICE_ATTR() to DEVICE_ATTR_WO()

DEVICE_ATTR() should only be used when files have unusual permissions.
Change DEVICE_ATTR() with '0220' write-only permissions to
DEVICE_ATTR_WO(), e.g.,

  - static DEVICE_ATTR(_name, (S_IWUSR | S_IWGRP), NULL, _store);
  + static DEVICE_ATTR_WO(_name);

Since _store is no longer passed, make the _name passed by DEVICE_ATTR_WO()
and the related _name##_store() name match with each other, e.g.,

  DEVICE_ATTR_WO(bus_rescan) must be able to call bus_rescan_store()

Link: https://lore.kernel.org/r/20190815153352.86143-4-skunberg.kelsey@gmail.com


Signed-off-by: default avatarKelsey Skunberg <skunberg.kelsey@gmail.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: default avatarDonald Dutile <ddutile@redhat.com>
parent 8bdfa145
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment