* + mm-compaction-use-device_attr_wo-macro.patch added to -mm tree
@ 2021-05-25 0:06 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2021-05-25 0:06 UTC (permalink / raw)
To: akpm, mm-commits, yuehaibing
The patch titled
Subject: mm/compaction: use DEVICE_ATTR_WO macro
has been added to the -mm tree. Its filename is
mm-compaction-use-device_attr_wo-macro.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/mm-compaction-use-device_attr_wo-macro.patch
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/mm-compaction-use-device_attr_wo-macro.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: YueHaibing <yuehaibing@huawei.com>
Subject: mm/compaction: use DEVICE_ATTR_WO macro
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>
---
mm/compaction.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/mm/compaction.c~mm-compaction-use-device_attr_wo-macro
+++ a/mm/compaction.c
@@ -2722,9 +2722,9 @@ int sysctl_compaction_handler(struct ctl
}
#if defined(CONFIG_SYSFS) && defined(CONFIG_NUMA)
-static ssize_t sysfs_compact_node(struct device *dev,
- struct device_attribute *attr,
- const char *buf, size_t count)
+static ssize_t compact_store(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
return count;
}
-static DEVICE_ATTR(compact, 0200, NULL, sysfs_compact_node);
+static DEVICE_ATTR_WO(compact);
int compaction_register_node(struct node *node)
{
_
Patches currently in -mm which might be from yuehaibing@huawei.com are
mm-dmapool-use-device_attr_ro-macro.patch
mm-compaction-use-device_attr_wo-macro.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-25 0:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-25 0:06 + mm-compaction-use-device_attr_wo-macro.patch added to -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.