Commit 527ed4f7 authored by Kefeng Wang's avatar Kefeng Wang Committed by Andrew Morton
Browse files

mm: remove arguments of show_mem()

All callers of show_mem() pass 0 and NULL, so we can remove the two
arguments by directly calling __show_mem(0, NULL, MAX_NR_ZONES - 1) in
show_mem().

Link: https://lkml.kernel.org/r/20230630062253.189440-1-wangkefeng.wang@huawei.com


Signed-off-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 626e98cb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1084,7 +1084,7 @@ cmds(struct pt_regs *excp)
				memzcan();
				break;
			case 'i':
				show_mem(0, NULL);
				show_mem();
				break;
			default:
				termch = cmd;
+1 −1
Original line number Diff line number Diff line
@@ -342,7 +342,7 @@ static const struct sysrq_key_op sysrq_ftrace_dump_op = {

static void sysrq_handle_showmem(int key)
{
	show_mem(0, NULL);
	show_mem();
}
static const struct sysrq_key_op sysrq_showmem_op = {
	.handler	= sysrq_handle_showmem,
+1 −1
Original line number Diff line number Diff line
@@ -606,7 +606,7 @@ static void fn_scroll_back(struct vc_data *vc)

static void fn_show_mem(struct vc_data *vc)
{
	show_mem(0, NULL);
	show_mem();
}

static void fn_show_state(struct vc_data *vc)
+2 −2
Original line number Diff line number Diff line
@@ -3068,9 +3068,9 @@ extern void mem_init(void);
extern void __init mmap_init(void);

extern void __show_mem(unsigned int flags, nodemask_t *nodemask, int max_zone_idx);
static inline void show_mem(unsigned int flags, nodemask_t *nodemask)
static inline void show_mem(void)
{
	__show_mem(flags, nodemask, MAX_NR_ZONES - 1);
	__show_mem(0, NULL, MAX_NR_ZONES - 1);
}
extern long si_mem_available(void);
extern void si_meminfo(struct sysinfo * val);
+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ static void __init error(char *x)
}

#define panic_show_mem(fmt, ...) \
	({ show_mem(0, NULL); panic(fmt, ##__VA_ARGS__); })
	({ show_mem(); panic(fmt, ##__VA_ARGS__); })

/* link hash */

Loading