linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: backing-dev: Remove duplicated macro definition
@ 2021-02-09  9:19 Baolin Wang
  0 siblings, 0 replies; only message in thread
From: Baolin Wang @ 2021-02-09  9:19 UTC (permalink / raw)
  To: akpm; +Cc: baolin.wang, linux-mm, linux-kernel

Move the K() macro a little forward to remove the same macro definition.

Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
---
 mm/backing-dev.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index 71a2bf4..576220a 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -33,6 +33,8 @@
 /* bdi_wq serves all asynchronous writeback tasks */
 struct workqueue_struct *bdi_wq;
 
+#define K(x) ((x) << (PAGE_SHIFT - 10))
+
 #ifdef CONFIG_DEBUG_FS
 #include <linux/debugfs.h>
 #include <linux/seq_file.h>
@@ -70,7 +72,6 @@ static int bdi_debug_stats_show(struct seq_file *m, void *v)
 	global_dirty_limits(&background_thresh, &dirty_thresh);
 	wb_thresh = wb_calc_thresh(wb, dirty_thresh);
 
-#define K(x) ((x) << (PAGE_SHIFT - 10))
 	seq_printf(m,
 		   "BdiWriteback:       %10lu kB\n"
 		   "BdiReclaimable:     %10lu kB\n"
@@ -99,7 +100,6 @@ static int bdi_debug_stats_show(struct seq_file *m, void *v)
 		   nr_more_io,
 		   nr_dirty_time,
 		   !list_empty(&bdi->bdi_list), bdi->wb.state);
-#undef K
 
 	return 0;
 }
@@ -147,8 +147,6 @@ static ssize_t read_ahead_kb_store(struct device *dev,
 	return count;
 }
 
-#define K(pages) ((pages) << (PAGE_SHIFT - 10))
-
 #define BDI_SHOW(name, expr)						\
 static ssize_t name##_show(struct device *dev,				\
 			   struct device_attribute *attr, char *buf)	\
-- 
1.8.3.1



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-02-09  9:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-09  9:19 [PATCH] mm: backing-dev: Remove duplicated macro definition Baolin Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox