Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drivers: lkdtm: fix clang -Wformat warning
When building with Clang we encounter the following warning (ARCH=hexagon + CONFIG_FRAME_WARN=0): | ../drivers/misc/lkdtm/bugs.c:107:3: error: format specifies type | 'unsigned long' but the argument has type 'int' [-Werror,-Wformat] | REC_STACK_SIZE, recur_count); | ^~~~~~~~~~~~~~ Cast REC_STACK_SIZE to `unsigned long` to match format specifier `%lu` as well as maintain symmetry with `#define REC_STACK_SIZE (_AC(CONFIG_FRAME_WARN, UL) / 2)`. Link: ClangBuiltLinux#378 Reported-by: Nathan Chancellor <[email protected]> Suggested-by: Nathan Chancellor <[email protected]> Suggested-by: Nick Desaulniers <[email protected]> Signed-off-by: Justin Stitt <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Tested-by: Nathan Chancellor <[email protected]> Acked-by: Kees Cook <[email protected]> Fixes: 24cccab ("lkdtm/bugs: Adjust recursion test to avoid elision") Signed-off-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/r/[email protected]
- Loading branch information