All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools/vm/page_owner_sort.c: delete invalid duplicate code
@ 2021-12-13  9:57 Yixuan Cao
  0 siblings, 0 replies; only message in thread
From: Yixuan Cao @ 2021-12-13  9:57 UTC (permalink / raw)
  To: akpm
  Cc: broonie, seanga2, weizhenliang, tangbin, zhaochongxi2019,
	zhangyinan2019, linux-kernel, Yixuan Cao

I noticed that there is two invalid lines of duplicate code.
It's better to delete it.

Signed-off-by: Yixuan Cao <caoyixuan2019@email.szu.edu.cn>
---
 tools/vm/page_owner_sort.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tools/vm/page_owner_sort.c b/tools/vm/page_owner_sort.c
index c9fedc1806d5..e76addb2bfe7 100644
--- a/tools/vm/page_owner_sort.c
+++ b/tools/vm/page_owner_sort.c
@@ -229,8 +229,6 @@ static void add_list(char *buf, int len)
 	list[list_size].pid = get_pid(buf);
 	list[list_size].ts_nsec = get_ts_nsec(buf);
 	list[list_size].free_ts_nsec = get_free_ts_nsec(buf);
-	memcpy(list[list_size].txt, buf, len);
-	list[list_size].txt[len] = 0;
 	list_size++;
 	if (list_size % 1000 == 0) {
 		printf("loaded %d\r", list_size);
-- 
2.31.1




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

only message in thread, other threads:[~2021-12-13 10:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-13  9:57 [PATCH] tools/vm/page_owner_sort.c: delete invalid duplicate code Yixuan Cao

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.