[PATCH 2/4] PCI: Symbolic permissions 'S_IRUGO' are not preferred

From: Aakash Hemadri
Date: Sat Aug 14 2021 - 16:12:37 EST


Fix checkpatch.pl WARNING: Symbolic permissions 'S_IRUGO' are not
preferred. Consider using octal permission '0444'

Signed-off-by: Aakash Hemadri <aakashhemadri123@xxxxxxxxx>
---
drivers/pci/slot.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/slot.c b/drivers/pci/slot.c
index 6ee4ccaf30b3..a9678589ed23 100644
--- a/drivers/pci/slot.c
+++ b/drivers/pci/slot.c
@@ -86,11 +86,11 @@ static void pci_slot_release(struct kobject *kobj)
}

static struct pci_slot_attribute pci_slot_attr_address =
- __ATTR(address, S_IRUGO, address_read_file, NULL);
+ __ATTR(address, 0444, address_read_file, NULL);
static struct pci_slot_attribute pci_slot_attr_max_speed =
- __ATTR(max_bus_speed, S_IRUGO, max_speed_read_file, NULL);
+ __ATTR(max_bus_speed, 0444, max_speed_read_file, NULL);
static struct pci_slot_attribute pci_slot_attr_cur_speed =
- __ATTR(cur_bus_speed, S_IRUGO, cur_speed_read_file, NULL);
+ __ATTR(cur_bus_speed, 0444, cur_speed_read_file, NULL);

static struct attribute *pci_slot_default_attrs[] = {
&pci_slot_attr_address.attr,
--
2.32.0