sound: Use octal not symbolic permissions
Convert the S_<FOO> symbolic permissions to their octal equivalents as using octal and not symbolic permissions is preferred by many as more readable. see: https://lkml.org/lkml/2016/8/2/1945 Done with automated conversion via: $ ./scripts/checkpatch.pl -f --types=SYMBOLIC_PERMS --fix-inplace <files...> Miscellanea: o Wrapped one multi-line call to a single line Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:

committed by
Takashi Iwai

parent
84eaaef2ae
commit
6a73cf46ce
@@ -1001,7 +1001,7 @@ static int snd_compress_proc_init(struct snd_compr *compr)
|
||||
compr->card->proc_root);
|
||||
if (!entry)
|
||||
return -ENOMEM;
|
||||
entry->mode = S_IFDIR | S_IRUGO | S_IXUGO;
|
||||
entry->mode = S_IFDIR | 0555;
|
||||
if (snd_info_register(entry) < 0) {
|
||||
snd_info_free_entry(entry);
|
||||
return -ENOMEM;
|
||||
|
@@ -454,7 +454,7 @@ static struct snd_info_entry *create_subdir(struct module *mod,
|
||||
entry = snd_info_create_module_entry(mod, name, NULL);
|
||||
if (!entry)
|
||||
return NULL;
|
||||
entry->mode = S_IFDIR | S_IRUGO | S_IXUGO;
|
||||
entry->mode = S_IFDIR | 0555;
|
||||
if (snd_info_register(entry) < 0) {
|
||||
snd_info_free_entry(entry);
|
||||
return NULL;
|
||||
@@ -470,7 +470,7 @@ int __init snd_info_init(void)
|
||||
snd_proc_root = snd_info_create_entry("asound", NULL);
|
||||
if (!snd_proc_root)
|
||||
return -ENOMEM;
|
||||
snd_proc_root->mode = S_IFDIR | S_IRUGO | S_IXUGO;
|
||||
snd_proc_root->mode = S_IFDIR | 0555;
|
||||
snd_proc_root->p = proc_mkdir("asound", NULL);
|
||||
if (!snd_proc_root->p)
|
||||
goto error;
|
||||
@@ -716,7 +716,7 @@ snd_info_create_entry(const char *name, struct snd_info_entry *parent)
|
||||
kfree(entry);
|
||||
return NULL;
|
||||
}
|
||||
entry->mode = S_IFREG | S_IRUGO;
|
||||
entry->mode = S_IFREG | 0444;
|
||||
entry->content = SNDRV_INFO_CONTENT_TEXT;
|
||||
mutex_init(&entry->access);
|
||||
INIT_LIST_HEAD(&entry->children);
|
||||
|
@@ -703,7 +703,7 @@ card_id_store_attr(struct device *dev, struct device_attribute *attr,
|
||||
return count;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(id, S_IRUGO | S_IWUSR, card_id_show_attr, card_id_store_attr);
|
||||
static DEVICE_ATTR(id, 0644, card_id_show_attr, card_id_store_attr);
|
||||
|
||||
static ssize_t
|
||||
card_number_show_attr(struct device *dev,
|
||||
@@ -713,7 +713,7 @@ card_number_show_attr(struct device *dev,
|
||||
return scnprintf(buf, PAGE_SIZE, "%i\n", card->number);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(number, S_IRUGO, card_number_show_attr, NULL);
|
||||
static DEVICE_ATTR(number, 0444, card_number_show_attr, NULL);
|
||||
|
||||
static struct attribute *card_dev_attrs[] = {
|
||||
&dev_attr_id.attr,
|
||||
|
@@ -1247,7 +1247,7 @@ static void snd_mixer_oss_proc_init(struct snd_mixer_oss *mixer)
|
||||
if (! entry)
|
||||
return;
|
||||
entry->content = SNDRV_INFO_CONTENT_TEXT;
|
||||
entry->mode = S_IFREG | S_IRUGO | S_IWUSR;
|
||||
entry->mode = S_IFREG | 0644;
|
||||
entry->c.text.read = snd_mixer_oss_proc_read;
|
||||
entry->c.text.write = snd_mixer_oss_proc_write;
|
||||
entry->private_data = mixer;
|
||||
|
@@ -3045,7 +3045,7 @@ static void snd_pcm_oss_proc_init(struct snd_pcm *pcm)
|
||||
continue;
|
||||
if ((entry = snd_info_create_card_entry(pcm->card, "oss", pstr->proc_root)) != NULL) {
|
||||
entry->content = SNDRV_INFO_CONTENT_TEXT;
|
||||
entry->mode = S_IFREG | S_IRUGO | S_IWUSR;
|
||||
entry->mode = S_IFREG | 0644;
|
||||
entry->c.text.read = snd_pcm_oss_proc_read;
|
||||
entry->c.text.write = snd_pcm_oss_proc_write;
|
||||
entry->private_data = pstr;
|
||||
|
@@ -530,7 +530,7 @@ static int snd_pcm_stream_proc_init(struct snd_pcm_str *pstr)
|
||||
pcm->card->proc_root);
|
||||
if (!entry)
|
||||
return -ENOMEM;
|
||||
entry->mode = S_IFDIR | S_IRUGO | S_IXUGO;
|
||||
entry->mode = S_IFDIR | 0555;
|
||||
if (snd_info_register(entry) < 0) {
|
||||
snd_info_free_entry(entry);
|
||||
return -ENOMEM;
|
||||
@@ -552,7 +552,7 @@ static int snd_pcm_stream_proc_init(struct snd_pcm_str *pstr)
|
||||
if (entry) {
|
||||
entry->c.text.read = snd_pcm_xrun_debug_read;
|
||||
entry->c.text.write = snd_pcm_xrun_debug_write;
|
||||
entry->mode |= S_IWUSR;
|
||||
entry->mode |= 0200;
|
||||
entry->private_data = pstr;
|
||||
if (snd_info_register(entry) < 0) {
|
||||
snd_info_free_entry(entry);
|
||||
@@ -590,7 +590,7 @@ static int snd_pcm_substream_proc_init(struct snd_pcm_substream *substream)
|
||||
substream->pstr->proc_root);
|
||||
if (!entry)
|
||||
return -ENOMEM;
|
||||
entry->mode = S_IFDIR | S_IRUGO | S_IXUGO;
|
||||
entry->mode = S_IFDIR | 0555;
|
||||
if (snd_info_register(entry) < 0) {
|
||||
snd_info_free_entry(entry);
|
||||
return -ENOMEM;
|
||||
@@ -647,7 +647,7 @@ static int snd_pcm_substream_proc_init(struct snd_pcm_substream *substream)
|
||||
entry->private_data = substream;
|
||||
entry->c.text.read = NULL;
|
||||
entry->c.text.write = snd_pcm_xrun_injection_write;
|
||||
entry->mode = S_IFREG | S_IWUSR;
|
||||
entry->mode = S_IFREG | 0200;
|
||||
if (snd_info_register(entry) < 0) {
|
||||
snd_info_free_entry(entry);
|
||||
entry = NULL;
|
||||
@@ -1087,7 +1087,7 @@ static ssize_t show_pcm_class(struct device *dev,
|
||||
return snprintf(buf, PAGE_SIZE, "%s\n", str);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(pcm_class, S_IRUGO, show_pcm_class, NULL);
|
||||
static DEVICE_ATTR(pcm_class, 0444, show_pcm_class, NULL);
|
||||
static struct attribute *pcm_dev_attrs[] = {
|
||||
&dev_attr_pcm_class.attr,
|
||||
NULL
|
||||
|
@@ -201,7 +201,7 @@ static inline void preallocate_info_init(struct snd_pcm_substream *substream)
|
||||
if ((entry = snd_info_create_card_entry(substream->pcm->card, "prealloc", substream->proc_root)) != NULL) {
|
||||
entry->c.text.read = snd_pcm_lib_preallocate_proc_read;
|
||||
entry->c.text.write = snd_pcm_lib_preallocate_proc_write;
|
||||
entry->mode |= S_IWUSR;
|
||||
entry->mode |= 0200;
|
||||
entry->private_data = substream;
|
||||
if (snd_info_register(entry) < 0) {
|
||||
snd_info_free_entry(entry);
|
||||
|
Reference in New Issue
Block a user