* [merged] mm-dmapool-use-device_attr_ro-macro.patch removed from -mm tree
@ 2021-07-06 19:13 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2021-07-06 19:13 UTC (permalink / raw)
To: andriy.shevchenko, mm-commits, yuehaibing
The patch titled
Subject: mm/dmapool: use DEVICE_ATTR_RO macro
has been removed from the -mm tree. Its filename was
mm-dmapool-use-device_attr_ro-macro.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: YueHaibing <yuehaibing@huawei.com>
Subject: mm/dmapool: use DEVICE_ATTR_RO macro
Use DEVICE_ATTR_RO() helper instead of plain DEVICE_ATTR(), which makes
the code a bit shorter and easier to read.
Link: https://lkml.kernel.org/r/20210524112852.34716-1-yuehaibing@huawei.com
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/dmapool.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- a/mm/dmapool.c~mm-dmapool-use-device_attr_ro-macro
+++ a/mm/dmapool.c
@@ -62,8 +62,7 @@ struct dma_page { /* cacheable header f
static DEFINE_MUTEX(pools_lock);
static DEFINE_MUTEX(pools_reg_lock);
-static ssize_t
-show_pools(struct device *dev, struct device_attribute *attr, char *buf)
+static ssize_t pools_show(struct device *dev, struct device_attribute *attr, char *buf)
{
unsigned temp;
unsigned size;
@@ -103,7 +102,7 @@ show_pools(struct device *dev, struct de
return PAGE_SIZE - size;
}
-static DEVICE_ATTR(pools, 0444, show_pools, NULL);
+static DEVICE_ATTR_RO(pools);
/**
* dma_pool_create - Creates a pool of consistent memory blocks, for dma.
_
Patches currently in -mm which might be from yuehaibing@huawei.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-07-06 19:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-06 19:13 [merged] mm-dmapool-use-device_attr_ro-macro.patch removed from -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.