* [PATCH] sparse: increase MAX_STRING to 4096*3
@ 2026-06-13 14:53 Oleg Nesterov
0 siblings, 0 replies; only message in thread
From: Oleg Nesterov @ 2026-06-13 14:53 UTC (permalink / raw)
To: Chris Li, Luc Van Oostenryck; +Cc: Alexey Gladkov, linux-sparse
Sure, 12288 is just another "random" value, but with this change the
following command
$ make C=2 CHECK="semind add --"
no longer emits the errors like
./include/trace/events/vmscan.h:122:17: error: too long token expansion
It is not clear why (before this change) MAX_STRING is odd. I guess this
comes from the initial commit 7601387b02d9 ("C99 says strings should be up
to 4095 bytes."), but I don't think this is relevant at least after another
commit fbc8230fa8c4 ("Larger buffer size for token concatenation") which
increased MAX_STRING to 4096*2-1. And struct string / __alloc_string() do
not depend on the hardcoded constants anyway.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
token.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/token.h b/token.h
index 9000e0cb..720ad0c3 100644
--- a/token.h
+++ b/token.h
@@ -197,7 +197,7 @@ struct token {
};
};
-#define MAX_STRING 8191
+#define MAX_STRING (4096*3)
static inline struct token *containing_token(struct token **p)
{
--
2.52.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-13 14:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-13 14:53 [PATCH] sparse: increase MAX_STRING to 4096*3 Oleg Nesterov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox