driver: base: Replace symbolic permissions with octal permissions
authorJinchao Wang <wjc@cdjrlc.com>
Sat, 26 Jun 2021 09:46:06 +0000 (17:46 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Jul 2021 12:56:00 +0000 (14:56 +0200)
Resolve following checkpatch issue,
Replace symbolic permissions with octal permissions

Signed-off-by: Jinchao Wang <wjc@cdjrlc.com>
Link: https://lore.kernel.org/r/20210626094606.53152-1-wjc@cdjrlc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/bus.c
drivers/base/power/wakeup.c

index 1f6b4bd610561a9bfc8bfb67327f15e13e229dd3..bdc98c5713d5ea16b97b275548a096aaa635d1f9 100644 (file)
@@ -195,7 +195,7 @@ static ssize_t unbind_store(struct device_driver *drv, const char *buf,
        bus_put(bus);
        return err;
 }
-static DRIVER_ATTR_IGNORE_LOCKDEP(unbind, S_IWUSR, NULL, unbind_store);
+static DRIVER_ATTR_IGNORE_LOCKDEP(unbind, 0200, NULL, unbind_store);
 
 /*
  * Manually attach a device to a driver.
@@ -221,7 +221,7 @@ static ssize_t bind_store(struct device_driver *drv, const char *buf,
        bus_put(bus);
        return err;
 }
-static DRIVER_ATTR_IGNORE_LOCKDEP(bind, S_IWUSR, NULL, bind_store);
+static DRIVER_ATTR_IGNORE_LOCKDEP(bind, 0200, NULL, bind_store);
 
 static ssize_t drivers_autoprobe_show(struct bus_type *bus, char *buf)
 {
@@ -767,7 +767,7 @@ static ssize_t bus_uevent_store(struct bus_type *bus,
  * DEVICE_ATTR_WO(uevent), which would cause a clash with the with the store
  * function name.
  */
-static struct bus_attribute bus_attr_uevent = __ATTR(uevent, S_IWUSR, NULL,
+static struct bus_attribute bus_attr_uevent = __ATTR(uevent, 0200, NULL,
                                                     bus_uevent_store);
 
 /**
index f0b37c1885142b364ec7079e4e66f3b2f6cc9f5d..99bda0da23a8264354a79631fb0590c75bb12e9f 100644 (file)
@@ -1180,7 +1180,7 @@ static const struct file_operations wakeup_sources_stats_fops = {
 
 static int __init wakeup_sources_debugfs_init(void)
 {
-       debugfs_create_file("wakeup_sources", S_IRUGO, NULL, NULL,
+       debugfs_create_file("wakeup_sources", 0444, NULL, NULL,
                            &wakeup_sources_stats_fops);
        return 0;
 }