I've experimented with clang-format to reformat ioctl.h. I think it would be possible to use some parts of the reformatting but it got some things pretty wrong. So currently, I don't think we should blindly apply it.
# SPDX-License-Identifier: GPL-2.0
#
# clang-format configuration file. Intended for clang-format >= 11.
#
# For more information, see:
#
# Documentation/dev-tools/clang-format.rst
# https://clang.llvm.org/docs/ClangFormat.html
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
#
---
BasedOnStyle: LLVM
Language: Cpp
IndentWidth: 8
UseTab: Always
TabWidth: 8
BreakBeforeBraces: Linux
IndentCaseLabels: false
AlignTrailingComments: true
AllowShortIfStatementsOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
MaxEmptyLinesToKeep: 2
The above .clang-format above is just my latest version of the configuration while playing with it. So it's likely not really good at all.
I've experimented with clang-format to reformat
ioctl.h. I think it would be possible to use some parts of the reformatting but it got some things pretty wrong. So currently, I don't think we should blindly apply it..clang-format.clang-format-includeThe above
.clang-formatabove is just my latest version of the configuration while playing with it. So it's likely not really good at all.