Skip to content

Commit

Permalink
linux/modules: ignore checkpatch's MACRO_ARG_UNUSED
Browse files Browse the repository at this point in the history
Linux's checkpatch now reports some warnings:

    WARNING:MACRO_ARG_UNUSED: Argument 'pud' is not used in function-like macro
    #87: FILE: pagetables.c:87:
    +# define pud_large(pud) false

    WARNING:MACRO_ARG_UNUSED: Argument 'pgd' is not used in function-like macro
    #88: FILE: pagetables.c:88:
    +# define pgd_large(pgd) false

    total: 0 errors, 2 warnings, 1019 lines checked

https://docs.kernel.org/dev-tools/checkpatch.html states that "We
advocate for utilizing static inline functions to replace such macros.".
However this would break the simple compatibility across architectures
and kernel versions of this module.

Silence the warning instead.
  • Loading branch information
fishilico committed Aug 13, 2024
1 parent 98f2140 commit 6862fe5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions linux/modules/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ checkpatch:
--ignore LONG_LINE \
--ignore LONG_LINE_COMMENT \
--ignore LONG_LINE_STRING \
--ignore MACRO_ARG_UNUSED \
--ignore REPEATED_WORD

.PHONY: all clean install infos test checkpatch

0 comments on commit 6862fe5

Please sign in to comment.