Thread (36 messages) 36 messages, 5 authors, 2025-09-10

Re: [PATCH v2 02/18] mm/ksw: add ksw_config struct and parser

From: Jinchao Wang <hidden>
Date: 2025-09-08 05:58:41
Also in: linux-mm, linux-perf-users, lkml

On Thu, Sep 04, 2025 at 10:47:07AM +0300, Mike Rapoport wrote:
On Thu, Sep 04, 2025 at 08:20:59AM +0800, Jinchao Wang wrote:
quoted
Add struct ksw_config and ksw_parse_config() to parse user string.

Update `Makefile` to pass compilation.

Signed-off-by: Jinchao Wang <redacted>
---
 mm/kstackwatch/Makefile      |  2 ++
 mm/kstackwatch/kernel.c      | 70 +++++++++++++++++++++++++++++++++++-
 mm/kstackwatch/kstackwatch.h | 34 ++++++++++++++++++
 3 files changed, 105 insertions(+), 1 deletion(-)
diff --git a/mm/kstackwatch/Makefile b/mm/kstackwatch/Makefile
index 84a46cb9a766..d422f0e114dd 100644
--- a/mm/kstackwatch/Makefile
+++ b/mm/kstackwatch/Makefile
@@ -1,2 +1,4 @@
 obj-$(CONFIG_KSTACK_WATCH)	+= kstackwatch.o
 kstackwatch-y := kernel.o stack.o watch.o
+
+CFLAGS_kernel.o := -Wno-error=unused-function
Can't you just add the function along with the code that uses it?
Thanks for the feedback.

The function ksw_parse_config is called deeply in a later patch, so the
'error: ununsed function' would persist even if I added the caller now.

To keep this patch clean for review, I only include functions that form
a self-contained unit.

I will add a TODO comment to indicate that the CFLAGS addition is
temporary for this patch only and will be removed in a follow-up patch.
-- 
Sincerely yours,
Mike.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help