Add target "format" to the makefile to format all source files with clang-format. This currently assumes all architectures want to opt-in to formatting with clang-format. Maybe they don't want that, then we can move the target to architecture-specific folders. Signed-off-by: Nico Boehr <nrb@xxxxxxxxxxxxx> --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 602910dda11b..b5509c74ad5b 100644 --- a/Makefile +++ b/Makefile @@ -147,3 +147,6 @@ tags: check-kerneldoc: find . -name '*.[ch]' -exec scripts/kernel-doc -none {} + + +format: + find . -name '*.[ch]' ! -type l -exec clang-format -i {} + -- 2.41.0