projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
00cde04
)
mm/swap_state.c: use helper macro K()
author
ZhangPeng
<zhangpeng362@huawei.com>
Fri, 4 Aug 2023 01:25:55 +0000
(09:25 +0800)
committer
Andrew Morton
<akpm@linux-foundation.org>
Mon, 21 Aug 2023 20:37:44 +0000
(13:37 -0700)
Use helper macro K() to improve code readability. No functional
modification involved.
Link:
https://lkml.kernel.org/r/20230804012559.2617515-4-zhangpeng362@huawei.com
Signed-off-by: ZhangPeng <zhangpeng362@huawei.com>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Nanyong Sun <sunnanyong@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/swap_state.c
patch
|
blob
|
history
diff --git
a/mm/swap_state.c
b/mm/swap_state.c
index f8ea7015bad48755140debdcf36072f64ae8f9c2..d157862ba0a6981894058c13d9c3526e8e652b78 100644
(file)
--- a/
mm/swap_state.c
+++ b/
mm/swap_state.c
@@
-63,9
+63,8
@@
static atomic_t swapin_readahead_hits = ATOMIC_INIT(4);
void show_swap_cache_info(void)
{
printk("%lu pages in swap cache\n", total_swapcache_pages());
- printk("Free swap = %ldkB\n",
- get_nr_swap_pages() << (PAGE_SHIFT - 10));
- printk("Total swap = %lukB\n", total_swap_pages << (PAGE_SHIFT - 10));
+ printk("Free swap = %ldkB\n", K(get_nr_swap_pages()));
+ printk("Total swap = %lukB\n", K(total_swap_pages));
}
void *get_shadow_from_swap_cache(swp_entry_t entry)