You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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;
|
||||
|
||||
+3
-3
@@ -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);
|
||||
|
||||
+2
-2
@@ -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;
|
||||
|
||||
+5
-5
@@ -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);
|
||||
|
||||
@@ -1042,7 +1042,7 @@ static void dummy_proc_init(struct snd_dummy *chip)
|
||||
if (!snd_card_proc_new(chip->card, "dummy_pcm", &entry)) {
|
||||
snd_info_set_text_ops(entry, chip, dummy_proc_read);
|
||||
entry->c.text.write = dummy_proc_write;
|
||||
entry->mode |= S_IWUSR;
|
||||
entry->mode |= 0200;
|
||||
entry->private_data = chip;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,11 +41,11 @@ static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
|
||||
static struct platform_device *platform_devices[SNDRV_CARDS];
|
||||
static int device_count;
|
||||
|
||||
module_param_array(index, int, NULL, S_IRUGO);
|
||||
module_param_array(index, int, NULL, 0444);
|
||||
MODULE_PARM_DESC(index, "Index value for " CARD_NAME " soundcard.");
|
||||
module_param_array(id, charp, NULL, S_IRUGO);
|
||||
module_param_array(id, charp, NULL, 0444);
|
||||
MODULE_PARM_DESC(id, "ID string for " CARD_NAME " soundcard.");
|
||||
module_param_array(enable, bool, NULL, S_IRUGO);
|
||||
module_param_array(enable, bool, NULL, 0444);
|
||||
MODULE_PARM_DESC(enable, "Enable " CARD_NAME " soundcard.");
|
||||
|
||||
MODULE_AUTHOR("Matthias Koenig <mk@phasorlab.de>");
|
||||
|
||||
@@ -104,7 +104,7 @@ int snd_opl4_create_proc(struct snd_opl4 *opl4)
|
||||
if (entry) {
|
||||
if (opl4->hardware < OPL3_HW_OPL4_ML) {
|
||||
/* OPL4 can access 4 MB external ROM/SRAM */
|
||||
entry->mode |= S_IWUSR;
|
||||
entry->mode |= 0200;
|
||||
entry->size = 4 * 1024 * 1024;
|
||||
} else {
|
||||
/* OPL4-ML has 1 MB internal ROM */
|
||||
|
||||
@@ -60,11 +60,11 @@ static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
|
||||
static struct platform_device *platform_devices[SNDRV_CARDS];
|
||||
static int device_count;
|
||||
|
||||
module_param_array(index, int, NULL, S_IRUGO);
|
||||
module_param_array(index, int, NULL, 0444);
|
||||
MODULE_PARM_DESC(index, "Index value for " CARD_NAME " soundcard.");
|
||||
module_param_array(id, charp, NULL, S_IRUGO);
|
||||
module_param_array(id, charp, NULL, 0444);
|
||||
MODULE_PARM_DESC(id, "ID string for " CARD_NAME " soundcard.");
|
||||
module_param_array(enable, bool, NULL, S_IRUGO);
|
||||
module_param_array(enable, bool, NULL, 0444);
|
||||
MODULE_PARM_DESC(enable, "Enable " CARD_NAME " soundcard.");
|
||||
|
||||
MODULE_AUTHOR("Levent Guendogdu, Tobias Gehrig, Matthias Koenig");
|
||||
|
||||
@@ -183,7 +183,7 @@ void snd_bebob_proc_init(struct snd_bebob *bebob)
|
||||
bebob->card->proc_root);
|
||||
if (root == NULL)
|
||||
return;
|
||||
root->mode = S_IFDIR | S_IRUGO | S_IXUGO;
|
||||
root->mode = S_IFDIR | 0555;
|
||||
if (snd_info_register(root) < 0) {
|
||||
snd_info_free_entry(root);
|
||||
return;
|
||||
|
||||
@@ -305,7 +305,7 @@ void snd_dice_create_proc(struct snd_dice *dice)
|
||||
dice->card->proc_root);
|
||||
if (!root)
|
||||
return;
|
||||
root->mode = S_IFDIR | S_IRUGO | S_IXUGO;
|
||||
root->mode = S_IFDIR | 0555;
|
||||
if (snd_info_register(root) < 0) {
|
||||
snd_info_free_entry(root);
|
||||
return;
|
||||
|
||||
@@ -79,7 +79,7 @@ void snd_dg00x_proc_init(struct snd_dg00x *dg00x)
|
||||
if (root == NULL)
|
||||
return;
|
||||
|
||||
root->mode = S_IFDIR | S_IRUGO | S_IXUGO;
|
||||
root->mode = S_IFDIR | 0555;
|
||||
if (snd_info_register(root) < 0) {
|
||||
snd_info_free_entry(root);
|
||||
return;
|
||||
|
||||
@@ -52,7 +52,7 @@ void snd_ff_proc_init(struct snd_ff *ff)
|
||||
ff->card->proc_root);
|
||||
if (root == NULL)
|
||||
return;
|
||||
root->mode = S_IFDIR | S_IRUGO | S_IXUGO;
|
||||
root->mode = S_IFDIR | 0555;
|
||||
if (snd_info_register(root) < 0) {
|
||||
snd_info_free_entry(root);
|
||||
return;
|
||||
|
||||
@@ -219,7 +219,7 @@ void snd_efw_proc_init(struct snd_efw *efw)
|
||||
efw->card->proc_root);
|
||||
if (root == NULL)
|
||||
return;
|
||||
root->mode = S_IFDIR | S_IRUGO | S_IXUGO;
|
||||
root->mode = S_IFDIR | 0555;
|
||||
if (snd_info_register(root) < 0) {
|
||||
snd_info_free_entry(root);
|
||||
return;
|
||||
|
||||
@@ -107,7 +107,7 @@ void snd_motu_proc_init(struct snd_motu *motu)
|
||||
motu->card->proc_root);
|
||||
if (root == NULL)
|
||||
return;
|
||||
root->mode = S_IFDIR | S_IRUGO | S_IXUGO;
|
||||
root->mode = S_IFDIR | 0555;
|
||||
if (snd_info_register(root) < 0) {
|
||||
snd_info_free_entry(root);
|
||||
return;
|
||||
|
||||
@@ -103,7 +103,7 @@ void snd_oxfw_proc_init(struct snd_oxfw *oxfw)
|
||||
oxfw->card->proc_root);
|
||||
if (root == NULL)
|
||||
return;
|
||||
root->mode = S_IFDIR | S_IRUGO | S_IXUGO;
|
||||
root->mode = S_IFDIR | 0555;
|
||||
if (snd_info_register(root) < 0) {
|
||||
snd_info_free_entry(root);
|
||||
return;
|
||||
|
||||
@@ -78,7 +78,7 @@ void snd_tscm_proc_init(struct snd_tscm *tscm)
|
||||
tscm->card->proc_root);
|
||||
if (root == NULL)
|
||||
return;
|
||||
root->mode = S_IFDIR | S_IRUGO | S_IXUGO;
|
||||
root->mode = S_IFDIR | 0555;
|
||||
if (snd_info_register(root) < 0) {
|
||||
snd_info_free_entry(root);
|
||||
return;
|
||||
|
||||
@@ -757,9 +757,9 @@ static int snd_msnd_pinnacle_cfg_reset(int cfg)
|
||||
static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */
|
||||
static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */
|
||||
|
||||
module_param_array(index, int, NULL, S_IRUGO);
|
||||
module_param_array(index, int, NULL, 0444);
|
||||
MODULE_PARM_DESC(index, "Index value for msnd_pinnacle soundcard.");
|
||||
module_param_array(id, charp, NULL, S_IRUGO);
|
||||
module_param_array(id, charp, NULL, 0444);
|
||||
MODULE_PARM_DESC(id, "ID string for msnd_pinnacle soundcard.");
|
||||
|
||||
static long io[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;
|
||||
@@ -801,22 +801,22 @@ MODULE_LICENSE("GPL");
|
||||
MODULE_FIRMWARE(INITCODEFILE);
|
||||
MODULE_FIRMWARE(PERMCODEFILE);
|
||||
|
||||
module_param_hw_array(io, long, ioport, NULL, S_IRUGO);
|
||||
module_param_hw_array(io, long, ioport, NULL, 0444);
|
||||
MODULE_PARM_DESC(io, "IO port #");
|
||||
module_param_hw_array(irq, int, irq, NULL, S_IRUGO);
|
||||
module_param_hw_array(mem, long, iomem, NULL, S_IRUGO);
|
||||
module_param_array(write_ndelay, int, NULL, S_IRUGO);
|
||||
module_param(calibrate_signal, int, S_IRUGO);
|
||||
module_param_hw_array(irq, int, irq, NULL, 0444);
|
||||
module_param_hw_array(mem, long, iomem, NULL, 0444);
|
||||
module_param_array(write_ndelay, int, NULL, 0444);
|
||||
module_param(calibrate_signal, int, 0444);
|
||||
#ifndef MSND_CLASSIC
|
||||
module_param_array(digital, int, NULL, S_IRUGO);
|
||||
module_param_hw_array(cfg, long, ioport, NULL, S_IRUGO);
|
||||
module_param_array(reset, int, 0, S_IRUGO);
|
||||
module_param_hw_array(mpu_io, long, ioport, NULL, S_IRUGO);
|
||||
module_param_hw_array(mpu_irq, int, irq, NULL, S_IRUGO);
|
||||
module_param_hw_array(ide_io0, long, ioport, NULL, S_IRUGO);
|
||||
module_param_hw_array(ide_io1, long, ioport, NULL, S_IRUGO);
|
||||
module_param_hw_array(ide_irq, int, irq, NULL, S_IRUGO);
|
||||
module_param_hw_array(joystick_io, long, ioport, NULL, S_IRUGO);
|
||||
module_param_array(digital, int, NULL, 0444);
|
||||
module_param_hw_array(cfg, long, ioport, NULL, 0444);
|
||||
module_param_array(reset, int, 0, 0444);
|
||||
module_param_hw_array(mpu_io, long, ioport, NULL, 0444);
|
||||
module_param_hw_array(mpu_irq, int, irq, NULL, 0444);
|
||||
module_param_hw_array(ide_io0, long, ioport, NULL, 0444);
|
||||
module_param_hw_array(ide_io1, long, ioport, NULL, 0444);
|
||||
module_param_hw_array(ide_irq, int, irq, NULL, 0444);
|
||||
module_param_hw_array(joystick_io, long, ioport, NULL, 0444);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user