From 7bee9bd21b404a2fa76c1a8e0ff68379aeef2b91 Mon Sep 17 00:00:00 2001 From: Jason Gunthorpe Date: Mon, 25 Jun 2018 16:44:30 -0600 Subject: [PATCH 1/2] clang-format: Set IndentWrappedFunctionNames false The true option causes this indenting for functions: static struct something_very_very_long * function(void *arg) { While a quick survey suggests that the usual Linux fallback is the GNU style: static struct something_very_very_long * function(void *arg) { Eg as seen in: kernel/cpu.c kernel/fork.c etc Acked-by: Joe Perches Signed-off-by: Jason Gunthorpe Signed-off-by: Miguel Ojeda --- .clang-format | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.clang-format b/.clang-format index faffc0d5af4e..1d5da22e0ba5 100644 --- a/.clang-format +++ b/.clang-format @@ -382,7 +382,7 @@ IncludeIsMainRegex: '(Test)?$' IndentCaseLabels: false #IndentPPDirectives: None # Unknown to clang-format-5.0 IndentWidth: 8 -IndentWrappedFunctionNames: true +IndentWrappedFunctionNames: false JavaScriptQuotes: Leave JavaScriptWrapImports: true KeepEmptyLinesAtTheStartOfBlocks: false From 16b7db4c8150ba12e7eb63a5de962e1b05b3b612 Mon Sep 17 00:00:00 2001 From: Miguel Ojeda Date: Mon, 30 Jul 2018 18:24:31 +0200 Subject: [PATCH 2/2] MAINTAINERS: Add .clang-format entry As discussed in https://lkml.org/lkml/2018/6/25/877 Signed-off-by: Miguel Ojeda --- MAINTAINERS | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 32fbc6f732d4..db759f040fcf 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3514,6 +3514,11 @@ M: Dave Goodell S: Supported F: drivers/infiniband/hw/usnic/ +CLANG-FORMAT FILE +M: Miguel Ojeda +S: Maintained +F: .clang-format + CLEANCACHE API M: Konrad Rzeszutek Wilk L: linux-kernel@vger.kernel.org