All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksandr Natalenko <oleksandr@natalenko.name>
To: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
	Wladislav Wiebe <wladislav.kw@gmail.com>
Subject: [PATCH] tools/mm: fix show_page() build error
Date: Thu, 14 Nov 2024 11:01:40 +0100	[thread overview]
Message-ID: <20241114100140.406416-1-oleksandr@natalenko.name> (raw)

At one point I needed mm tools for debugging but couldn't compile them due to the
following error:

gcc -Wall -Wextra -I../lib/ -pthread -o page-types page-types.c ../lib/api/libapi.a -pthread
page-types.c: In function ‘show_page’:
page-types.c:423:49: error: expected ‘;’ before ‘if’
  423 |                 printf("@%" PRIu64 "\t", cgroup)
      |                                                 ^
      |                                                 ;
  424 |         if (opt_list_mapcnt)
      |         ~~
page-types.c:416:65: warning: unused parameter ‘mapcnt’ [-Wunused-parameter]
  416 |                       uint64_t flags, uint64_t cgroup, uint64_t mapcnt)
      |                                                        ~~~~~~~~~^~~~~~
make: *** [Makefile:23: page-types] Error 1

Trailing ; was forgotten, so add it.

Fixes: ece5897e5a10 ("tools/mm: -Werror fixes in page-types/slabinfo")
Signed-off-by: Oleksandr Natalenko <oleksandr@natalenko.name>
---
 tools/mm/page-types.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/mm/page-types.c b/tools/mm/page-types.c
index 6eb17cc1a06c5..bcac7ebfb51fd 100644
--- a/tools/mm/page-types.c
+++ b/tools/mm/page-types.c
@@ -420,7 +420,7 @@ static void show_page(unsigned long voffset, unsigned long offset,
 	if (opt_file)
 		printf("%lx\t", voffset);
 	if (opt_list_cgroup)
-		printf("@%" PRIu64 "\t", cgroup)
+		printf("@%" PRIu64 "\t", cgroup);
 	if (opt_list_mapcnt)
 		printf("%" PRIu64 "\t", mapcnt);
 
-- 
2.47.0



             reply	other threads:[~2024-11-14 10:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-14 10:01 Oleksandr Natalenko [this message]
2024-11-14 19:02 ` [PATCH] tools/mm: fix show_page() build error SeongJae Park
2024-11-14 20:03   ` Oleksandr Natalenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241114100140.406416-1-oleksandr@natalenko.name \
    --to=oleksandr@natalenko.name \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=wladislav.kw@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.