sparse: increase MAX_STRING to 4096*3
PATCH 1/1 sparse: increase MAX_STRING to 4096*3
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 <[email protected]>
--- token.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
token.h +1 -1
@@ -197,7 +197,7 @@ struct token { }; }; -#define MAX_STRING 8191 +#define MAX_STRING (4096*3)static inline struct token *containing_token (struct token **p) {
Signature · 1 line
2.52.0