projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2a03085
)
mm/compaction: use DEVICE_ATTR_WO macro
author
YueHaibing
<yuehaibing@huawei.com>
Thu, 1 Jul 2021 01:50:48 +0000
(18:50 -0700)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Thu, 1 Jul 2021 03:47:29 +0000
(20:47 -0700)
Use DEVICE_ATTR_WO helper instead of plain DEVICE_ATTR, which makes the
code a bit shorter and easier to read.
Link:
https://lkml.kernel.org/r/20210523064521.32912-1-yuehaibing@huawei.com
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/compaction.c
patch
|
blob
|
blame
|
history
diff --git
a/mm/compaction.c
b/mm/compaction.c
index 7d41b58fb17c872f703480484a50bd9c15d0cb93..b7fb991dee1bc7b41ec2e27dba7c2cdcabbf4de4 100644
(file)
--- a/
mm/compaction.c
+++ b/
mm/compaction.c
@@
-2722,9
+2722,9
@@
int sysctl_compaction_handler(struct ctl_table *table, int write,
}
#if defined(CONFIG_SYSFS) && defined(CONFIG_NUMA)
-static ssize_t
sysfs_compact_nod
e(struct device *dev,
- struct device_attribute *attr,
- const char *buf, size_t count)
+static ssize_t
compact_stor
e(struct device *dev,
+
struct device_attribute *attr,
+
const char *buf, size_t count)
{
int nid = dev->id;
@@
-2737,7
+2737,7
@@
static ssize_t sysfs_compact_node(struct device *dev,
return count;
}
-static DEVICE_ATTR
(compact, 0200, NULL, sysfs_compact_node
);
+static DEVICE_ATTR
_WO(compact
);
int compaction_register_node(struct node *node)
{