Displaying 20 results from an estimated 111 matches for "__attr".
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?
2014 Mar 19
5
[PATCH] virtio-blk: make the queue depth configurable
...>> Good idea.
>>
>> > diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
>> []
>> > @@ -188,6 +188,9 @@ struct kparam_array
>> > /* Default value instead of permissions? */ \
>> > static int __param_perm_check_##name __attribute__((unused)) = \
>> > BUILD_BUG_ON_ZERO((perm) < 0 || (perm) > 0777 || ((perm) & 2)) \
>> > + /* User perms >= group perms >= other perms. */ \
>> > + + BUILD_BUG_ON_ZERO(((perm) >> 6) < (((perm) >> 3) & 7)) \
>> > + + B...
2014 Mar 19
5
[PATCH] virtio-blk: make the queue depth configurable
...>> Good idea.
>>
>> > diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
>> []
>> > @@ -188,6 +188,9 @@ struct kparam_array
>> > /* Default value instead of permissions? */ \
>> > static int __param_perm_check_##name __attribute__((unused)) = \
>> > BUILD_BUG_ON_ZERO((perm) < 0 || (perm) > 0777 || ((perm) & 2)) \
>> > + /* User perms >= group perms >= other perms. */ \
>> > + + BUILD_BUG_ON_ZERO(((perm) >> 6) < (((perm) >> 3) & 7)) \
>> > + + B...
2011 Sep 02
3
[PATCH] Staging: hv: vmbus: Show the modalias in /sys/bus/vmbus/devices/*/
...uf, "vmbus:%s\n", alias_name);
} else if (!strcmp(dev_attr->attr.name, "state")) {
return sprintf(buf, "%d\n", device_info.chn_state);
} else if (!strcmp(dev_attr->attr.name, "id")) {
@@ -204,6 +216,7 @@ static struct device_attribute vmbus_dev
__ATTR(class_id, S_IRUGO, vmbus_show_device_attr, NULL),
__ATTR(device_id, S_IRUGO, vmbus_show_device_attr, NULL),
__ATTR(monitor_id, S_IRUGO, vmbus_show_device_attr, NULL),
+ __ATTR(modalias, S_IRUGO, vmbus_show_device_attr, NULL),
__ATTR(server_monitor_pending, S_IRUGO, vmbus_show_device_attr, N...
2011 Sep 02
3
[PATCH] Staging: hv: vmbus: Show the modalias in /sys/bus/vmbus/devices/*/
...uf, "vmbus:%s\n", alias_name);
} else if (!strcmp(dev_attr->attr.name, "state")) {
return sprintf(buf, "%d\n", device_info.chn_state);
} else if (!strcmp(dev_attr->attr.name, "id")) {
@@ -204,6 +216,7 @@ static struct device_attribute vmbus_dev
__ATTR(class_id, S_IRUGO, vmbus_show_device_attr, NULL),
__ATTR(device_id, S_IRUGO, vmbus_show_device_attr, NULL),
__ATTR(monitor_id, S_IRUGO, vmbus_show_device_attr, NULL),
+ __ATTR(modalias, S_IRUGO, vmbus_show_device_attr, NULL),
__ATTR(server_monitor_pending, S_IRUGO, vmbus_show_device_attr, N...
2014 Mar 19
0
[PATCH] virtio-blk: make the queue depth configurable
...> > diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
>>> []
>>> > @@ -188,6 +188,9 @@ struct kparam_array
>>> > /* Default value instead of permissions? */ \
>>> > static int __param_perm_check_##name __attribute__((unused)) = \
>>> > BUILD_BUG_ON_ZERO((perm) < 0 || (perm) > 0777 || ((perm) & 2)) \
>>> > + /* User perms >= group perms >= other perms. */ \
>>> > + + BUILD_BUG_ON_ZERO(((perm) >> 6) < (((perm) >> 3)...
2014 Mar 17
2
[PATCH] virtio-blk: make the queue depth configurable
...insufficient. Testbuilding an allmodconfig with this
> now:
Good idea.
> diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
[]
> @@ -188,6 +188,9 @@ struct kparam_array
> /* Default value instead of permissions? */ \
> static int __param_perm_check_##name __attribute__((unused)) = \
> BUILD_BUG_ON_ZERO((perm) < 0 || (perm) > 0777 || ((perm) & 2)) \
> + /* User perms >= group perms >= other perms. */ \
> + + BUILD_BUG_ON_ZERO(((perm) >> 6) < (((perm) >> 3) & 7)) \
> + + BUILD_BUG_ON_ZERO((((perm) >> 3...
2014 Mar 17
2
[PATCH] virtio-blk: make the queue depth configurable
...insufficient. Testbuilding an allmodconfig with this
> now:
Good idea.
> diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
[]
> @@ -188,6 +188,9 @@ struct kparam_array
> /* Default value instead of permissions? */ \
> static int __param_perm_check_##name __attribute__((unused)) = \
> BUILD_BUG_ON_ZERO((perm) < 0 || (perm) > 0777 || ((perm) & 2)) \
> + /* User perms >= group perms >= other perms. */ \
> + + BUILD_BUG_ON_ZERO(((perm) >> 6) < (((perm) >> 3) & 7)) \
> + + BUILD_BUG_ON_ZERO((((perm) >> 3...
2018 May 23
3
[PATCH] block drivers/block: Use octal not symbolic permissions
...ock/cfq-iosched.c b/block/cfq-iosched.c
index 6b9f6b1cd33b..82b6c27b3245 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -4786,7 +4786,7 @@ USEC_STORE_FUNCTION(cfq_target_latency_us_store, &cfqd->cfq_target_latency, 1, U
#undef USEC_STORE_FUNCTION
#define CFQ_ATTR(name) \
- __ATTR(name, S_IRUGO|S_IWUSR, cfq_##name##_show, cfq_##name##_store)
+ __ATTR(name, 0644, cfq_##name##_show, cfq_##name##_store)
static struct elv_fs_entry cfq_attrs[] = {
CFQ_ATTR(quantum),
diff --git a/block/deadline-iosched.c b/block/deadline-iosched.c
index 9de9f156e203..ef2f1f09e9b3 100644
--- a...
2018 May 23
3
[PATCH] block drivers/block: Use octal not symbolic permissions
...ock/cfq-iosched.c b/block/cfq-iosched.c
index 6b9f6b1cd33b..82b6c27b3245 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -4786,7 +4786,7 @@ USEC_STORE_FUNCTION(cfq_target_latency_us_store, &cfqd->cfq_target_latency, 1, U
#undef USEC_STORE_FUNCTION
#define CFQ_ATTR(name) \
- __ATTR(name, S_IRUGO|S_IWUSR, cfq_##name##_show, cfq_##name##_store)
+ __ATTR(name, 0644, cfq_##name##_show, cfq_##name##_store)
static struct elv_fs_entry cfq_attrs[] = {
CFQ_ATTR(quantum),
diff --git a/block/deadline-iosched.c b/block/deadline-iosched.c
index 9de9f156e203..ef2f1f09e9b3 100644
--- a...
2016 Aug 17
0
[PATCH 09/15] virtio-blk: Pass attribute group to device_add_disk
...-522,10 +522,10 @@ virtblk_cache_type_show(struct device *dev, struct device_attribute *attr,
return snprintf(buf, 40, "%s\n", virtblk_cache_types[writeback]);
}
-static const struct device_attribute dev_attr_cache_type_ro =
+static struct device_attribute dev_attr_cache_type_ro =
__ATTR(cache_type, S_IRUGO,
virtblk_cache_type_show, NULL);
-static const struct device_attribute dev_attr_cache_type_rw =
+static struct device_attribute dev_attr_cache_type_rw =
__ATTR(cache_type, S_IRUGO|S_IWUSR,
virtblk_cache_type_show, virtblk_cache_type_store);
@@ -550,6 +550,2...
2008 Dec 25
0
[PATCH 1/4] dom0 linux: Expose HID, UID, SEG, BBN of PCI root bridge via sysfs.
...------------------------------------------------------------------------- */
static ssize_t acpi_eject_store(struct acpi_device *device,
const char *buf, size_t count);
-
-#define ACPI_DEVICE_ATTR(_name,_mode,_show,_store) \
-static struct acpi_device_attribute acpi_device_attr_##_name = \
- __ATTR(_name, _mode, _show, _store)
ACPI_DEVICE_ATTR(eject, 0200, NULL, acpi_eject_store);
diff -r 618fc299e2f1 -r 4769a6db78f5 include/acpi/acpi_bus.h
--- a/include/acpi/acpi_bus.h Thu Dec 18 11:51:36 2008 +0000
+++ b/include/acpi/acpi_bus.h Thu Dec 25 10:37:52 2008 +0900
@@ -359,6 +359,16 @@
acpi_...
2015 Jan 15
3
[RFC] virtio-mmio: Update the device to OASIS spec version
...vm_dev->base + VIRTIO_MMIO_QUEUE_READY);
> > + }
> >
> > /* Create the vring */
> > vq = vring_new_virtqueue(index, info->num, VIRTIO_MMIO_VRING_ALIGN, vdev,
[...]
> > +static struct device_attribute vm_dev_attr_version =
> > + __ATTR(version, S_IRUGO, vm_dev_attr_version_show, NULL);
> > +
> > static int virtio_mmio_probe(struct platform_device *pdev)
> > {
> > struct virtio_mmio_device *vm_dev;
>
> We already expose feature bits - this one really necessary?
Necessary? Of course not, just...
2015 Jan 15
3
[RFC] virtio-mmio: Update the device to OASIS spec version
...vm_dev->base + VIRTIO_MMIO_QUEUE_READY);
> > + }
> >
> > /* Create the vring */
> > vq = vring_new_virtqueue(index, info->num, VIRTIO_MMIO_VRING_ALIGN, vdev,
[...]
> > +static struct device_attribute vm_dev_attr_version =
> > + __ATTR(version, S_IRUGO, vm_dev_attr_version_show, NULL);
> > +
> > static int virtio_mmio_probe(struct platform_device *pdev)
> > {
> > struct virtio_mmio_device *vm_dev;
>
> We already expose feature bits - this one really necessary?
Necessary? Of course not, just...
2012 Jul 04
1
[PATCH] virtio-blk: allow toggling host cache between writeback and writethrough
...;
> +
> + BUG_ON(writeback >= ARRAY_SIZE(virtblk_cache_types));
> + return snprintf(buf, 40, "%s\n", virtblk_cache_types[writeback]);
Why 40? Why snprintf? A plain sprintf won't do?
> +}
> +
> +static const struct device_attribute dev_attr_cache_type_ro =
> + __ATTR(cache_type, S_IRUGO,
> + virtblk_cache_type_show, NULL);
> +static const struct device_attribute dev_attr_cache_type_rw =
> + __ATTR(cache_type, S_IRUGO|S_IWUSR,
> + virtblk_cache_type_show, virtblk_cache_type_store);
> +
> static int __devinit virtblk_probe(struct...
2012 Jul 04
1
[PATCH] virtio-blk: allow toggling host cache between writeback and writethrough
...;
> +
> + BUG_ON(writeback >= ARRAY_SIZE(virtblk_cache_types));
> + return snprintf(buf, 40, "%s\n", virtblk_cache_types[writeback]);
Why 40? Why snprintf? A plain sprintf won't do?
> +}
> +
> +static const struct device_attribute dev_attr_cache_type_ro =
> + __ATTR(cache_type, S_IRUGO,
> + virtblk_cache_type_show, NULL);
> +static const struct device_attribute dev_attr_cache_type_rw =
> + __ATTR(cache_type, S_IRUGO|S_IWUSR,
> + virtblk_cache_type_show, virtblk_cache_type_store);
> +
> static int __devinit virtblk_probe(struct...
2015 Jan 15
2
[RFC] virtio-mmio: Update the device to OASIS spec version
...VIRTIO_PCI_VRING_ALIGN, &vp_dev->vdev,
> > > > +static struct device_attribute vm_dev_attr_version =
> > > > + __ATTR(version, S_IRUGO, vm_dev_attr_version_show, NULL);
> > > > +
> > > > static int virtio_mmio_probe(struct platform_device *pdev)
> > > > {
> > > > struct virtio_mmio_device *vm_dev;
> > >
> > > We already expose feature bits...
2015 Jan 15
2
[RFC] virtio-mmio: Update the device to OASIS spec version
...VIRTIO_PCI_VRING_ALIGN, &vp_dev->vdev,
> > > > +static struct device_attribute vm_dev_attr_version =
> > > > + __ATTR(version, S_IRUGO, vm_dev_attr_version_show, NULL);
> > > > +
> > > > static int virtio_mmio_probe(struct platform_device *pdev)
> > > > {
> > > > struct virtio_mmio_device *vm_dev;
> > >
> > > We already expose feature bits...
2015 Jan 15
2
[RFC] virtio-mmio: Update the device to OASIS spec version
...> SMP_CACHE_BYTES, &vp_dev->vdev,
Will have a look.
> > > > > > +static struct device_attribute vm_dev_attr_version =
> > > > > > + __ATTR(version, S_IRUGO, vm_dev_attr_version_show, NULL);
> > > > > > +
> > > > > > static int virtio_mmio_probe(struct platform_device *pdev)
> > > > > > {
> > > > > > struct virtio_mmio_device *vm_dev;
> > > > &g...