Skip to content

Commit

Permalink
nvmem: use octal permissions instead of constants
Browse files Browse the repository at this point in the history
Checkpatch emits a warning when using symbolic permissions. Use octal
permissions instead.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
brgl authored and gregkh committed Sep 28, 2018
1 parent 48f63a2 commit e7e07f4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/nvmem/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ static ssize_t bin_attr_nvmem_write(struct file *filp, struct kobject *kobj,
static struct bin_attribute bin_attr_rw_nvmem = {
.attr = {
.name = "nvmem",
.mode = S_IWUSR | S_IRUGO,
.mode = 0644,
},
.read = bin_attr_nvmem_read,
.write = bin_attr_nvmem_write,
Expand All @@ -178,7 +178,7 @@ static const struct attribute_group *nvmem_rw_dev_groups[] = {
static struct bin_attribute bin_attr_ro_nvmem = {
.attr = {
.name = "nvmem",
.mode = S_IRUGO,
.mode = 0444,
},
.read = bin_attr_nvmem_read,
};
Expand All @@ -201,7 +201,7 @@ static const struct attribute_group *nvmem_ro_dev_groups[] = {
static struct bin_attribute bin_attr_rw_root_nvmem = {
.attr = {
.name = "nvmem",
.mode = S_IWUSR | S_IRUSR,
.mode = 0600,
},
.read = bin_attr_nvmem_read,
.write = bin_attr_nvmem_write,
Expand All @@ -225,7 +225,7 @@ static const struct attribute_group *nvmem_rw_root_dev_groups[] = {
static struct bin_attribute bin_attr_ro_root_nvmem = {
.attr = {
.name = "nvmem",
.mode = S_IRUSR,
.mode = 0400,
},
.read = bin_attr_nvmem_read,
};
Expand Down

0 comments on commit e7e07f4

Please sign in to comment.