diff options
| author | Ye Liu <liuye@kylinos.cn> | 2026-05-13 10:21:16 +0800 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-05-28 21:31:03 -0700 |
| commit | 8d37b8ec7d5914ab4de40ee9e795c3c2b22ee1be (patch) | |
| tree | 3e70d855a8172f2dc399ab9cf382632efa456748 /tools | |
| parent | b4be1eb859f27dffb710693cfe36fe76060516a3 (diff) | |
| download | linux-next-history-8d37b8ec7d5914ab4de40ee9e795c3c2b22ee1be.tar.gz | |
tools/mm/page-types: fix typo in madvise() error message
Patch series "tools/mm/page-types: Fix misc bugs".
This series fixes three issues in tools/mm/page-types.c:
1. Fix two typos in madvise() error messages ("madvice" -> "madvise")
2. Fix operator precedence bug in the sigbus handler where the ternary
operator binds looser than addition, producing incorrect offset
calculation when sigbus_addr is non-NULL
3. Fix --kpageflags option declaration in getopt_long: has_arg should
be 1 (required_argument) since the option requires a file path
This patch (of 3):
Two error messages incorrectly spelled the madvise() function name as
"madvice". Fix the typo in both occurrences.
Link: https://lore.kernel.org/20260513022120.58033-1-ye.liu@linux.dev
Link: https://lore.kernel.org/20260513022120.58033-2-ye.liu@linux.dev
Signed-off-by: Ye Liu <liuye@kylinos.cn>
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Reviewed-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/mm/page-types.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/mm/page-types.c b/tools/mm/page-types.c index d7e5e8902af86..6594245217a8d 100644 --- a/tools/mm/page-types.c +++ b/tools/mm/page-types.c @@ -997,7 +997,7 @@ static void walk_file_range(const char *name, int fd, /* turn off readahead */ if (madvise(ptr, len, MADV_RANDOM)) - fatal("madvice failed: %s", name); + fatal("madvise failed: %s", name); if (sigsetjmp(sigbus_jmp, 1)) { end = off + sigbus_addr ? sigbus_addr - ptr : 0; @@ -1015,7 +1015,7 @@ got_sigbus: /* turn off harvesting reference bits */ if (madvise(ptr, len, MADV_SEQUENTIAL)) - fatal("madvice failed: %s", name); + fatal("madvise failed: %s", name); if (pagemap_read(buf, (unsigned long)ptr / page_size, nr_pages) != nr_pages) |
