search for: _store

Displaying 20 results from an estimated 30 matches for "_store".

Did you mean: store
2008 Dec 25
0
[PATCH 1/4] dom0 linux: Expose HID, UID, SEG, BBN of PCI root bridge via sysfs.
...__FUNCTION__, err); create_sysfs_device_files(device); + acpi_device_setup_files(device); } static void acpi_device_unregister(struct acpi_device *device, int type) @@ -343,10 +374,6 @@ -------------------------------------------------------------------------- */ 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 618fc...
2014 Mar 19
5
[PATCH] virtio-blk: make the queue depth configurable
...#define module_param_call(name, set, get, arg, perm) \ diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 30b2ebee6439..f517e6e488c8 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h @@ -71,7 +71,8 @@ struct attribute_group { */ #define __ATTR(_name, _mode, _show, _store) { \ - .attr = {.name = __stringify(_name), .mode = _mode }, \ + .attr = {.name = __stringify(_name), \ + .mode = VERIFY_OCTAL_PERMISSIONS(_mode) }, \ .show = _show, \ .store = _store, \ }
2014 Mar 19
5
[PATCH] virtio-blk: make the queue depth configurable
...#define module_param_call(name, set, get, arg, perm) \ diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 30b2ebee6439..f517e6e488c8 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h @@ -71,7 +71,8 @@ struct attribute_group { */ #define __ATTR(_name, _mode, _show, _store) { \ - .attr = {.name = __stringify(_name), .mode = _mode }, \ + .attr = {.name = __stringify(_name), \ + .mode = VERIFY_OCTAL_PERMISSIONS(_mode) }, \ .show = _show, \ .store = _store, \ }
2020 Apr 14
0
[PATCH v2 08/33] iommu: Move default domain allocation to iommu_probe_device()
...ce(struct iommu_domain *domain, + struct device *dev); +static int __iommu_attach_group(struct iommu_domain *domain, + struct iommu_group *group); +static void __iommu_detach_group(struct iommu_domain *domain, + struct iommu_group *group); + #define IOMMU_GROUP_ATTR(_name, _mode, _show, _store) \ struct iommu_group_attribute iommu_group_attr_##_name = \ __ATTR(_name, _mode, _show, _store) @@ -221,10 +231,29 @@ int iommu_probe_device(struct device *dev) goto err_free_dev_param; } - if (ops->probe_device) + if (ops->probe_device) { + struct iommu_group *group; + ret =...
2014 Mar 19
0
[PATCH] virtio-blk: make the queue depth configurable
...\ > diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h > index 30b2ebee6439..f517e6e488c8 100644 > --- a/include/linux/sysfs.h > +++ b/include/linux/sysfs.h > @@ -71,7 +71,8 @@ struct attribute_group { > */ > > #define __ATTR(_name, _mode, _show, _store) { \ > - .attr = {.name = __stringify(_name), .mode = _mode }, \ > + .attr = {.name = __stringify(_name), \ > + .mode = VERIFY_OCTAL_PERMISSIONS(_mode) }, \ > .show = _show,...
2019 Sep 23
2
[PATCH 2/6] mdev: introduce device specific ops
...bj, struct device *dev, 7b96953bc640b6 Kirti Wankhede 2016-11-17 72 const char *buf, size_t count); 7b96953bc640b6 Kirti Wankhede 2016-11-17 73 }; 7b96953bc640b6 Kirti Wankhede 2016-11-17 74 7b96953bc640b6 Kirti Wankhede 2016-11-17 75 #define MDEV_TYPE_ATTR(_name, _mode, _show, _store) \ 7b96953bc640b6 Kirti Wankhede 2016-11-17 76 struct mdev_type_attribute mdev_type_attr_##_name = \ 7b96953bc640b6 Kirti Wankhede 2016-11-17 77 __ATTR(_name, _mode, _show, _store) 7b96953bc640b6 Kirti Wankhede 2016-11-17 78 #define MDEV_TYPE_ATTR_RW(_name) \ 7b96953bc640b6 Kirti Wan...
2019 Sep 23
2
[PATCH 2/6] mdev: introduce device specific ops
...bj, struct device *dev, 7b96953bc640b6 Kirti Wankhede 2016-11-17 72 const char *buf, size_t count); 7b96953bc640b6 Kirti Wankhede 2016-11-17 73 }; 7b96953bc640b6 Kirti Wankhede 2016-11-17 74 7b96953bc640b6 Kirti Wankhede 2016-11-17 75 #define MDEV_TYPE_ATTR(_name, _mode, _show, _store) \ 7b96953bc640b6 Kirti Wankhede 2016-11-17 76 struct mdev_type_attribute mdev_type_attr_##_name = \ 7b96953bc640b6 Kirti Wankhede 2016-11-17 77 __ATTR(_name, _mode, _show, _store) 7b96953bc640b6 Kirti Wankhede 2016-11-17 78 #define MDEV_TYPE_ATTR_RW(_name) \ 7b96953bc640b6 Kirti Wan...
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 17
2
[PATCH] virtio-blk: make the queue depth configurable
On Mon, 2014-03-17 at 14:25 +1030, Rusty Russell wrote: > Erk, our tests are 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
2014 Mar 17
2
[PATCH] virtio-blk: make the queue depth configurable
On Mon, 2014-03-17 at 14:25 +1030, Rusty Russell wrote: > Erk, our tests are 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
2018 May 23
3
[PATCH] block drivers/block: Use octal not symbolic permissions
....show = integrity_interval_show, }; static struct integrity_sysfs_entry integrity_verify_entry = { - .attr = { .name = "read_verify", .mode = S_IRUGO | S_IWUSR }, + .attr = { .name = "read_verify", .mode = 0644 }, .show = integrity_verify_show, .store = integrity_verify_store, }; static struct integrity_sysfs_entry integrity_generate_entry = { - .attr = { .name = "write_generate", .mode = S_IRUGO | S_IWUSR }, + .attr = { .name = "write_generate", .mode = 0644 }, .show = integrity_generate_show, .store = integrity_generate_store, }; static...
2018 May 23
3
[PATCH] block drivers/block: Use octal not symbolic permissions
....show = integrity_interval_show, }; static struct integrity_sysfs_entry integrity_verify_entry = { - .attr = { .name = "read_verify", .mode = S_IRUGO | S_IWUSR }, + .attr = { .name = "read_verify", .mode = 0644 }, .show = integrity_verify_show, .store = integrity_verify_store, }; static struct integrity_sysfs_entry integrity_generate_entry = { - .attr = { .name = "write_generate", .mode = S_IRUGO | S_IWUSR }, + .attr = { .name = "write_generate", .mode = 0644 }, .show = integrity_generate_show, .store = integrity_generate_store, }; static...
2019 Sep 23
0
[PATCH 2/6] mdev: introduce device specific ops
...ev, > 7b96953bc640b6 Kirti Wankhede 2016-11-17 72 const char *buf, size_t count); > 7b96953bc640b6 Kirti Wankhede 2016-11-17 73 }; > 7b96953bc640b6 Kirti Wankhede 2016-11-17 74 > 7b96953bc640b6 Kirti Wankhede 2016-11-17 75 #define MDEV_TYPE_ATTR(_name, _mode, _show, _store) \ > 7b96953bc640b6 Kirti Wankhede 2016-11-17 76 struct mdev_type_attribute mdev_type_attr_##_name = \ > 7b96953bc640b6 Kirti Wankhede 2016-11-17 77 __ATTR(_name, _mode, _show, _store) > 7b96953bc640b6 Kirti Wankhede 2016-11-17 78 #define MDEV_TYPE_ATTR_RW(_name) \ > 7b96...
2020 Apr 14
0
[PATCH v2 33/33] iommu: Unexport iommu_group_get_for_dev()
...group(struct iommu_domain *domain, struct iommu_group *group); static int iommu_create_device_direct_mappings(struct iommu_group *group, struct device *dev); +static struct iommu_group *iommu_group_get_for_dev(struct device *dev); #define IOMMU_GROUP_ATTR(_name, _mode, _show, _store) \ struct iommu_group_attribute iommu_group_attr_##_name = \ @@ -1483,7 +1484,7 @@ static int iommu_alloc_default_domain(struct device *dev) * to the returned IOMMU group, which will already include the provided * device. The reference should be released with iommu_group_put(). */ -struct...
2008 Oct 31
0
[PATCH][cfq-cgroups] Interface for parameter of cfq driver data
...++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 58 insertions(+), 1 deletions(-) diff --git a/block/cfq-cgroup.c b/block/cfq-cgroup.c index 4938fa0..776874d 100644 --- a/block/cfq-cgroup.c +++ b/block/cfq-cgroup.c @@ -1028,6 +1028,62 @@ STORE_FUNCTION(cfq_cgroup_slice_async_rq_store, cfq_slice_async_rq, 1, STORE_FUNCTION(cfq_cgroup_ioprio_store, ioprio, 0, CFQ_CGROUP_MAX_IOPRIO, 0); #undef STORE_FUNCTION +static ssize_t +cfq_cgroup_var_show2(unsigned int var, char *page) +{ + return snprintf(page, PAGE_SIZE, "%d\n", var); +} + +static ssize_t +cfq_cgroup_var_stor...
2007 Jun 20
0
[PATCH] linux-2.6.18: utilize SYS_HYPERVISOR config option
...00000 +0200 @@ -12,8 +12,6 @@ #include <linux/kobject.h> #include <xen/hypervisor_sysfs.h> -decl_subsys(hypervisor, NULL, NULL); - static ssize_t hyp_sysfs_show(struct kobject *kobj, struct attribute *attr, char *buffer) @@ -37,7 +35,7 @@ static ssize_t hyp_sysfs_store(struct ko return 0; } -struct sysfs_ops hyp_sysfs_ops = { +static struct sysfs_ops hyp_sysfs_ops = { .show = hyp_sysfs_show, .store = hyp_sysfs_store, }; @@ -52,8 +50,7 @@ static int __init hypervisor_subsys_init return -ENODEV; hypervisor_subsys.kset.kobj.ktype = &hyp_sysfs_ko...
2020 Apr 14
0
[PATCH v2 12/33] iommu: Move iommu_group_create_direct_mappings() out of iommu_group_add_device()
...in *domain, struct iommu_group *group); static void __iommu_detach_group(struct iommu_domain *domain, struct iommu_group *group); +static int iommu_create_device_direct_mappings(struct iommu_group *group, + struct device *dev); #define IOMMU_GROUP_ATTR(_name, _mode, _show, _store) \ struct iommu_group_attribute iommu_group_attr_##_name = \ @@ -243,6 +245,8 @@ static int __iommu_probe_device_helper(struct device *dev) if (group->default_domain) ret = __iommu_attach_device(group->default_domain, dev); + iommu_create_device_direct_mappings(group, dev); + iomm...
2012 Nov 01
15
[RFC PATCH v2 0/3] mm/fs: Implement faster stable page writes on filesystems
Hi all, This patchset makes some key modifications to the original ''stable page writes'' patchset. First, it provides users (devices and filesystems) of a backing_dev_info the ability to declare whether or not it is necessary to ensure that page contents cannot change during writeout, whereas the current code assumes that this is true. Second, it relaxes the
2020 Apr 14
35
[PATCH v2 00/33] iommu: Move iommu_group setup to IOMMU core code
Hi, here is the second version of this patch-set. The first version with some more introductory text can be found here: https://lore.kernel.org/lkml/20200407183742.4344-1-joro at 8bytes.org/ Changes v1->v2: * Rebased to v5.7-rc1 * Re-wrote the arm-smmu changes as suggested by Robin Murphy * Re-worked the Exynos patches to hopefully not break the driver anymore * Fixed a missing