On Fri, Oct 9, 2020 at 9:25 PM Paolo Bonzini <
pbonzini@redhat.com> wrote:
>
> On 09/10/20 15:02, 罗勇刚(Yonggang Luo) wrote:
> > We can even using clang-format to format the whole repository.
>
> checkpatch does other checks than formatting.
>
> Reformatting the whole repository has been mentioned many times, people
> were worried of messing up the result of "git blame". But without doing
> that, it's hard to get rid of checkpatch because checkpatch only looks
> at the lines that are touched by the patch.
Make sense, clang-format can also only formatting the changed lines,
checkpatch also does what? do you means about the MAINTAINER? that can be preserved
we can use clang-format as a part of checkpatch.
The current problem with checkpatch is that is doesn't understand C well.
Sometimes will arise werid errors.
For example, what's does this means?
25/30 Checking commit 9e2a36e4c279 (plugin: Getting qemu-plugin.h can be included in multiple source file)
ERROR: storage class should be at the beginning of the declaration
#74: FILE: include/qemu/qemu-plugin.h:432:
+#define qemu_plugin_decl_symbol(symbol_name) extern symbol_name##_t symbol_name
total: 1 errors, 0 warnings, 88 lines checked
Patch 25/30 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
>
> Paolo
>
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo