search for: s_irugo

Displaying 20 results from an estimated 289 matches for "s_irugo".

2018 May 23
3
[PATCH] block drivers/block: Use octal not symbolic permissions
...0570eaf5..6121611e1316 100644 --- a/block/blk-integrity.c +++ b/block/blk-integrity.c @@ -333,34 +333,34 @@ static ssize_t integrity_device_show(struct blk_integrity *bi, char *page) } static struct integrity_sysfs_entry integrity_format_entry = { - .attr = { .name = "format", .mode = S_IRUGO }, + .attr = { .name = "format", .mode = 0444 }, .show = integrity_format_show, }; static struct integrity_sysfs_entry integrity_tag_size_entry = { - .attr = { .name = "tag_size", .mode = S_IRUGO }, + .attr = { .name = "tag_size", .mode = 0444 }, .show = integr...
2018 May 23
3
[PATCH] block drivers/block: Use octal not symbolic permissions
...0570eaf5..6121611e1316 100644 --- a/block/blk-integrity.c +++ b/block/blk-integrity.c @@ -333,34 +333,34 @@ static ssize_t integrity_device_show(struct blk_integrity *bi, char *page) } static struct integrity_sysfs_entry integrity_format_entry = { - .attr = { .name = "format", .mode = S_IRUGO }, + .attr = { .name = "format", .mode = 0444 }, .show = integrity_format_show, }; static struct integrity_sysfs_entry integrity_tag_size_entry = { - .attr = { .name = "tag_size", .mode = S_IRUGO }, + .attr = { .name = "tag_size", .mode = 0444 }, .show = integr...
2018 May 24
3
[PATCH] gpu: Consistently use octal not symbolic permissions
...a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c @@ -830,7 +830,7 @@ int amdgpu_debugfs_regs_init(struct amdgpu_device *adev) for (i = 0; i < ARRAY_SIZE(debugfs_regs); i++) { ent = debugfs_create_file(debugfs_regs_names[i], - S_IFREG | S_IRUGO, root, + S_IFREG | 0444, root, adev, debugfs_regs[i]); if (IS_ERR(ent)) { for (j = 0; j < i; j++) { diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c index b455da487782..fa55d7e9e784 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm...
2018 May 25
0
[PATCH] gpu: Consistently use octal not symbolic permissions
...gpu_debugfs.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c > @@ -830,7 +830,7 @@ int amdgpu_debugfs_regs_init(struct amdgpu_device *adev) > > for (i = 0; i < ARRAY_SIZE(debugfs_regs); i++) { > ent = debugfs_create_file(debugfs_regs_names[i], > - S_IFREG | S_IRUGO, root, > + S_IFREG | 0444, root, > adev, debugfs_regs[i]); > if (IS_ERR(ent)) { > for (j = 0; j < i; j++) { > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c > index b455da487782..fa55d7e9e784 100644 > ---...
2016 Apr 11
0
[PATCH] nouveau: Switch perms from macros to octal notations, module params readable to everyone
...--- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c +++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c @@ -204,7 +204,7 @@ nouveau_debugfs_create_file(struct drm_minor *minor, node->minor = minor; node->info_ent = (const void *)ndf->fops; - node->dent = debugfs_create_file(ndf->name, S_IRUGO | S_IWUSR, + node->dent = debugfs_create_file(ndf->name, 0644, minor->debugfs_root, node, ndf->fops); if (!node->dent) { kfree(node); diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index d06877d..2166bdc 100644 --- a/drivers/gpu...
2014 Mar 19
1
[PATCH] virtio-blk: make the queue depth configurable
Couple more bikesheddy things: Is there ever a reason to use a non __builtin_const_p(perms)? Maybe that should be a BUILD_BUG_ON too BUILD_BUG_ON(!builtin_const_p_perms) My brain of little size gets confused by the BUILD_BUG_ON_ZERO(foo) + vs BUILD_BUG_ON(foo); as it just seems like more text for the same content. Is there any value on the "_ZERO(foo) +" I don't understand?
2014 Mar 19
1
[PATCH] virtio-blk: make the queue depth configurable
Couple more bikesheddy things: Is there ever a reason to use a non __builtin_const_p(perms)? Maybe that should be a BUILD_BUG_ON too BUILD_BUG_ON(!builtin_const_p_perms) My brain of little size gets confused by the BUILD_BUG_ON_ZERO(foo) + vs BUILD_BUG_ON(foo); as it just seems like more text for the same content. Is there any value on the "_ZERO(foo) +" I don't understand?
2012 Jun 18
2
[RFC 1/2] virtio-ring: Use threshold for switching to indirect descriptors
....c b/drivers/block/virtio_blk.c index 693187d..a2c8d97 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -19,6 +19,9 @@ static DEFINE_IDA(vd_index_ida); struct workqueue_struct *virtblk_wq; +static unsigned int indirect_thresh = 0; +module_param(indirect_thresh, uint, S_IRUGO); + struct virtio_blk { spinlock_t lock; @@ -438,6 +441,7 @@ static int __devinit virtblk_probe(struct virtio_device *vdev) mutex_init(&vblk->config_lock); INIT_WORK(&vblk->config_work, virtblk_config_changed_work); vblk->config_enable = true; + vdev->indirect_thresh =...
2012 Jun 18
2
[RFC 1/2] virtio-ring: Use threshold for switching to indirect descriptors
....c b/drivers/block/virtio_blk.c index 693187d..a2c8d97 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -19,6 +19,9 @@ static DEFINE_IDA(vd_index_ida); struct workqueue_struct *virtblk_wq; +static unsigned int indirect_thresh = 0; +module_param(indirect_thresh, uint, S_IRUGO); + struct virtio_blk { spinlock_t lock; @@ -438,6 +441,7 @@ static int __devinit virtblk_probe(struct virtio_device *vdev) mutex_init(&vblk->config_lock); INIT_WORK(&vblk->config_work, virtblk_config_changed_work); vblk->config_enable = true; + vdev->indirect_thresh =...
2016 Apr 10
1
[PATCH] module parameters: permissions as defines, readable to everyone
...r the purposes of the module parameters, specifies the permissions of the corresponding files in sysfs in predefined S_I* form rather than in octal notation. Withal it makes the source code more consistent. Moreover, because all parameters are readable to everyone, it is more user-friendly. $ grep S_IRUGO include/linux/stat.h #define S_IRUGO (S_IRUSR|S_IRGRP|S_IROTH) $ grep 'S_IRUSR\|S_IRGRP\|S_IROTH' include/uapi/linux/stat.h #define S_IRUSR 00400 #define S_IRGRP 00040 #define S_IROTH 00004 $ ls -l /sys/module/nouveau/parameters/ total 0 -r--r--r--. 1 root root 4096 Apr 10 17:43 config -...
2014 Mar 19
5
[PATCH] virtio-blk: make the queue depth configurable
...it a/drivers/pci/slot.c b/drivers/pci/slot.c index 7dd62fa9d0bd..396c200b9ddb 100644 --- a/drivers/pci/slot.c +++ b/drivers/pci/slot.c @@ -116,11 +116,11 @@ static void pci_slot_release(struct kobject *kobj) } static struct pci_slot_attribute pci_slot_attr_address = - __ATTR(address, (S_IFREG | S_IRUGO), address_read_file, NULL); + __ATTR(address, S_IRUGO, address_read_file, NULL); static struct pci_slot_attribute pci_slot_attr_max_speed = - __ATTR(max_bus_speed, (S_IFREG | S_IRUGO), max_speed_read_file, NULL); + __ATTR(max_bus_speed, S_IRUGO, max_speed_read_file, NULL); static struct pci_slot_...
2014 Mar 19
5
[PATCH] virtio-blk: make the queue depth configurable
...it a/drivers/pci/slot.c b/drivers/pci/slot.c index 7dd62fa9d0bd..396c200b9ddb 100644 --- a/drivers/pci/slot.c +++ b/drivers/pci/slot.c @@ -116,11 +116,11 @@ static void pci_slot_release(struct kobject *kobj) } static struct pci_slot_attribute pci_slot_attr_address = - __ATTR(address, (S_IFREG | S_IRUGO), address_read_file, NULL); + __ATTR(address, S_IRUGO, address_read_file, NULL); static struct pci_slot_attribute pci_slot_attr_max_speed = - __ATTR(max_bus_speed, (S_IFREG | S_IRUGO), max_speed_read_file, NULL); + __ATTR(max_bus_speed, S_IRUGO, max_speed_read_file, NULL); static struct pci_slot_...
2012 Aug 28
3
[PATCH v2 1/2] virtio-ring: Use threshold for switching to indirect descriptors
..._blk.c b/drivers/block/virtio_blk.c index 2edfb5c..13b8ae9 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -22,6 +22,9 @@ static DEFINE_IDA(vd_index_ida); struct workqueue_struct *virtblk_wq; +static unsigned int indirect_thresh; +module_param(indirect_thresh, uint, S_IRUGO); + struct virtio_blk { struct virtio_device *vdev; @@ -735,6 +738,7 @@ static int __devinit virtblk_probe(struct virtio_device *vdev) INIT_WORK(&vblk->config_work, virtblk_config_changed_work); vblk->config_enable = true; + vdev->indirect_thresh = indirect_thresh; err =...
2012 Aug 28
3
[PATCH v2 1/2] virtio-ring: Use threshold for switching to indirect descriptors
..._blk.c b/drivers/block/virtio_blk.c index 2edfb5c..13b8ae9 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -22,6 +22,9 @@ static DEFINE_IDA(vd_index_ida); struct workqueue_struct *virtblk_wq; +static unsigned int indirect_thresh; +module_param(indirect_thresh, uint, S_IRUGO); + struct virtio_blk { struct virtio_device *vdev; @@ -735,6 +738,7 @@ static int __devinit virtblk_probe(struct virtio_device *vdev) INIT_WORK(&vblk->config_work, virtblk_config_changed_work); vblk->config_enable = true; + vdev->indirect_thresh = indirect_thresh; err =...
2012 Aug 30
2
[PATCH v3 1/2] virtio-ring: Use threshold for switching to indirect descriptors
..._blk.c b/drivers/block/virtio_blk.c index 2edfb5c..7c63065 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -22,6 +22,9 @@ static DEFINE_IDA(vd_index_ida); struct workqueue_struct *virtblk_wq; +static unsigned int indirect_thresh; +module_param(indirect_thresh, uint, S_IRUGO); + struct virtio_blk { struct virtio_device *vdev; @@ -735,6 +738,7 @@ static int __devinit virtblk_probe(struct virtio_device *vdev) INIT_WORK(&vblk->config_work, virtblk_config_changed_work); vblk->config_enable = true; + vdev->indirect_thresh = indirect_thresh; err =...
2012 Aug 30
2
[PATCH v3 1/2] virtio-ring: Use threshold for switching to indirect descriptors
..._blk.c b/drivers/block/virtio_blk.c index 2edfb5c..7c63065 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -22,6 +22,9 @@ static DEFINE_IDA(vd_index_ida); struct workqueue_struct *virtblk_wq; +static unsigned int indirect_thresh; +module_param(indirect_thresh, uint, S_IRUGO); + struct virtio_blk { struct virtio_device *vdev; @@ -735,6 +738,7 @@ static int __devinit virtblk_probe(struct virtio_device *vdev) INIT_WORK(&vblk->config_work, virtblk_config_changed_work); vblk->config_enable = true; + vdev->indirect_thresh = indirect_thresh; err =...
2017 May 02
1
[PATCH v5 5/5] nouveau_hwmon: Change permissions to numeric
...in Peres <martin.peres at free.fr> > */ > > #ifdef CONFIG_ACPI > @@ -56,7 +56,7 @@ nouveau_hwmon_show_temp1_auto_point1_pwm(struct device *d, > { > return snprintf(buf, PAGE_SIZE, "%d\n", 100); > } > -static SENSOR_DEVICE_ATTR(temp1_auto_point1_pwm, S_IRUGO, > +static SENSOR_DEVICE_ATTR(temp1_auto_point1_pwm, 0444, > nouveau_hwmon_show_temp1_auto_point1_pwm, NULL, 0); > > static ssize_t > @@ -88,7 +88,7 @@ nouveau_hwmon_set_temp1_auto_point1_temp(struct device *d, > > return count; > } > -static SENSOR_DEVICE_A...
2017 Apr 11
2
[PATCH 1/1] nouveau_hwmon: migrate to hwmon_device_register_with_info
...nouveau_drm(dev); struct nvkm_therm *therm = nvxx_therm(&drm->client.device); int temp = nvkm_therm_temp_get(therm); if (temp < 0) return temp; - return snprintf(buf, PAGE_SIZE, "%d\n", temp * 1000); + return (temp * 1000); } -static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, nouveau_hwmon_show_temp, - NULL, 0); static ssize_t nouveau_hwmon_show_temp1_auto_point1_pwm(struct device *d, @@ -60,7 +56,7 @@ nouveau_hwmon_show_temp1_auto_point1_pwm { return snprintf(buf, PAGE_SIZE, "%d\n", 100); } -static SENSOR_DEVICE_ATTR(temp1_auto_point1_pwm, S_I...
2017 Apr 26
0
[PATCH v5 3/5] nouveau_hwmon: Remove old code, add .write/.read operations
...nouveau_drm(dev); struct nvkm_therm *therm = nvxx_therm(&drm->client.device); int temp = nvkm_therm_temp_get(therm); if (temp < 0) return temp; - return snprintf(buf, PAGE_SIZE, "%d\n", temp * 1000); + return (temp * 1000); } -static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, nouveau_hwmon_show_temp, - NULL, 0); static ssize_t nouveau_hwmon_show_temp1_auto_point1_pwm(struct device *d, @@ -129,312 +125,100 @@ static SENSOR_DEVICE_ATTR(temp1_auto_point1_temp_hyst, S_IRUGO | S_IWUSR, nouveau_hwmon_temp1_auto_point1_temp_hyst, nouveau_hwmon_set_temp1...
2017 Apr 26
9
[PATCH v5 0/5] replace hwmon_device_register for hwmon_device_register_with_info
This v5 drops a check for attr_set. Versions: v1 -> v2: * Keep temp attrs as read only v2 -> v3: * Code fix-ups: struct and string as const and add return within switch due to fallthrough * Add Signed-off-by to all commits v3 -> v4: * Rever const to struct attribute. Kbuild complains. v4 -> v5: * Drops a check for attr_set in