[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/4] checkpatch: adapt some tests to QEMU
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 3/4] checkpatch: adapt some tests to QEMU |
Date: |
Thu, 17 Sep 2015 15:24:46 +0100 |
On 7 September 2015 at 10:53, Paolo Bonzini <address@hidden> wrote:
> Mostly change severity levels, but some tests can also be adjusted to refer
> to QEMU APIs or data structures.
>
> Signed-off-by: Paolo Bonzini <address@hidden>
> @@ -1956,9 +1941,14 @@ sub process {
> ERROR("open brace '{' following $1 go on the same
> line\n" . $hereprev);
> }
>
> +# ... however, open braces on typedef lines should be avoided.
> + if ($line =~
> /^.\s*typedef\s+(enum|union|struct)(?:\s+$Ident\b)?.*[^;]$/) {
> + ERROR("typedefs should be separate from struct
> declaration\n" . $herecurr);
> + }
> +
> # missing space after union, struct or enum definition
Can we revert this one, please? Checkpatch now warns about constructs
like
typedef struct MyDevice {
DeviceState parent;
int reg0, reg1, reg2;
} MyDevice;
which I think are common practice throughout QEMU (recommended
as part of the examples in include/qom/object.h and
in http://wiki.qemu.org/QOMConventions, for instance).
$ git grep 'typedef struct.*{' |wc -l
1884
thanks
-- PMM
- Re: [Qemu-devel] [PATCH 2/4] CODING_STYLE, checkpatch: update line length rules, (continued)
- Re: [Qemu-devel] [PATCH 2/4] CODING_STYLE, checkpatch: update line length rules, Eduardo Habkost, 2015/09/09
- Re: [Qemu-devel] [PATCH 2/4] CODING_STYLE, checkpatch: update line length rules, Paolo Bonzini, 2015/09/09
- Re: [Qemu-devel] [PATCH 2/4] CODING_STYLE, checkpatch: update line length rules, Eduardo Habkost, 2015/09/09
- Re: [Qemu-devel] [PATCH 2/4] CODING_STYLE, checkpatch: update line length rules, Thomas Huth, 2015/09/07
- Re: [Qemu-devel] [PATCH 2/4] CODING_STYLE, checkpatch: update line length rules, Eduardo Habkost, 2015/09/09
Re: [Qemu-devel] [PATCH 2/4] CODING_STYLE, checkpatch: update line length rules, Markus Armbruster, 2015/09/07
[Qemu-devel] [PATCH 3/4] checkpatch: adapt some tests to QEMU, Paolo Bonzini, 2015/09/07
- Re: [Qemu-devel] [PATCH 3/4] checkpatch: adapt some tests to QEMU, Stefan Hajnoczi, 2015/09/09
- Re: [Qemu-devel] [PATCH 3/4] checkpatch: adapt some tests to QEMU,
Peter Maydell <=
- Re: [Qemu-devel] [PATCH 3/4] checkpatch: adapt some tests to QEMU, Paolo Bonzini, 2015/09/17
- Re: [Qemu-devel] [PATCH 3/4] checkpatch: adapt some tests to QEMU, Peter Maydell, 2015/09/17
- Re: [Qemu-devel] [PATCH 3/4] checkpatch: adapt some tests to QEMU, Paolo Bonzini, 2015/09/17
- Re: [Qemu-devel] [PATCH 3/4] checkpatch: adapt some tests to QEMU, Eric Blake, 2015/09/17
- Re: [Qemu-devel] [PATCH 3/4] checkpatch: adapt some tests to QEMU, Markus Armbruster, 2015/09/18
[Qemu-devel] [PATCH 4/4] checkpatch: remove tests that are not relevant outside the kernel, Paolo Bonzini, 2015/09/07