qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH 0/3] Preparing the build system for libtcg


From: no-reply
Subject: Re: [Qemu-devel] [RFC PATCH 0/3] Preparing the build system for libtcg
Date: Sat, 21 Jan 2017 01:01:17 -0800 (PST)

Hi,

Your series seems to have some coding style problems. See output below for
more information:

Subject: [Qemu-devel] [RFC PATCH 0/3] Preparing the build system for libtcg
Message-id: address@hidden
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

# Useful git options
git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
4be8b33 Introduce libtcg infrastructure
1264cba *-user targets object files decoupling
5130643 Factor out {linux,bsd}-user/qemu.h

=== OUTPUT BEGIN ===
Checking PATCH 1/3: Factor out {linux,bsd}-user/qemu.h...
ERROR: line over 90 characters
#439: FILE: qemu-user-common.h:15:
+                            (type == VERIFY_READ) ? PAGE_READ : (PAGE_READ | 
PAGE_WRITE)) == 0;

ERROR: code indent should never use tabs
#481: FILE: qemu-user-common.h:57:
+#define put_user(x, gaddr, target_type)^I^I^I^I^I\$

ERROR: code indent should never use tabs
#482: FILE: qemu-user-common.h:58:
+({^I^I^I^I^I^I^I^I^I\$

ERROR: code indent should never use tabs
#483: FILE: qemu-user-common.h:59:
+    abi_ulong __gaddr = (gaddr);^I^I^I^I^I\$

ERROR: code indent should never use tabs
#484: FILE: qemu-user-common.h:60:
+    target_type *__hptr;^I^I^I^I^I^I\$

ERROR: code indent should never use tabs
#485: FILE: qemu-user-common.h:61:
+    abi_long __ret = 0;^I^I^I^I^I^I^I\$

ERROR: do not use assignment in if condition
#486: FILE: qemu-user-common.h:62:
+    if ((__hptr = lock_user(VERIFY_WRITE, __gaddr, sizeof(target_type), 0))) { 
\

ERROR: braces {} are necessary for all arms of this statement
#486: FILE: qemu-user-common.h:62:
+    if ((__hptr = lock_user(VERIFY_WRITE, __gaddr, sizeof(target_type), 0))) { 
\
[...]
+    } else                                                             \
[...]

ERROR: code indent should never use tabs
#487: FILE: qemu-user-common.h:63:
+        __put_user((x), __hptr);^I^I^I^I\$

ERROR: code indent should never use tabs
#488: FILE: qemu-user-common.h:64:
+        unlock_user(__hptr, __gaddr, sizeof(target_type));^I^I\$

ERROR: code indent should never use tabs
#489: FILE: qemu-user-common.h:65:
+    } else^I^I^I^I^I^I^I^I\$

ERROR: code indent should never use tabs
#490: FILE: qemu-user-common.h:66:
+        __ret = -TARGET_EFAULT;^I^I^I^I^I^I\$

ERROR: code indent should never use tabs
#491: FILE: qemu-user-common.h:67:
+    __ret;^I^I^I^I^I^I^I^I\$

ERROR: code indent should never use tabs
#494: FILE: qemu-user-common.h:70:
+#define get_user(x, gaddr, target_type)^I^I^I^I^I\$

ERROR: code indent should never use tabs
#495: FILE: qemu-user-common.h:71:
+({^I^I^I^I^I^I^I^I^I\$

ERROR: code indent should never use tabs
#496: FILE: qemu-user-common.h:72:
+    abi_ulong __gaddr = (gaddr);^I^I^I^I^I\$

ERROR: code indent should never use tabs
#497: FILE: qemu-user-common.h:73:
+    target_type *__hptr;^I^I^I^I^I^I\$

ERROR: code indent should never use tabs
#498: FILE: qemu-user-common.h:74:
+    abi_long __ret = 0;^I^I^I^I^I^I^I\$

ERROR: do not use assignment in if condition
#499: FILE: qemu-user-common.h:75:
+    if ((__hptr = lock_user(VERIFY_READ, __gaddr, sizeof(target_type), 1))) { \

ERROR: code indent should never use tabs
#500: FILE: qemu-user-common.h:76:
+        __get_user((x), __hptr);^I^I^I^I\$

ERROR: code indent should never use tabs
#501: FILE: qemu-user-common.h:77:
+        unlock_user(__hptr, __gaddr, 0);^I^I^I^I\$

ERROR: code indent should never use tabs
#502: FILE: qemu-user-common.h:78:
+    } else {^I^I^I^I^I^I^I^I\$

ERROR: code indent should never use tabs
#503: FILE: qemu-user-common.h:79:
+        /* avoid warning */^I^I^I^I^I^I\$

ERROR: code indent should never use tabs
#504: FILE: qemu-user-common.h:80:
+        (x) = 0;^I^I^I^I^I^I^I\$

ERROR: code indent should never use tabs
#505: FILE: qemu-user-common.h:81:
+        __ret = -TARGET_EFAULT;^I^I^I^I^I^I\$

ERROR: code indent should never use tabs
#506: FILE: qemu-user-common.h:82:
+    }^I^I^I^I^I^I^I^I^I\$

ERROR: code indent should never use tabs
#507: FILE: qemu-user-common.h:83:
+    __ret;^I^I^I^I^I^I^I^I\$

WARNING: line over 80 characters
#547: FILE: qemu-user-common.h:123:
+static inline void *lock_user(int type, abi_ulong guest_addr, long len, int 
copy)

ERROR: braces {} are necessary for all arms of this statement
#549: FILE: qemu-user-common.h:125:
+    if (!access_ok(type, guest_addr, len))
[...]

ERROR: braces {} are necessary for all arms of this statement
#555: FILE: qemu-user-common.h:131:
+        if (copy)
[...]
+        else
[...]

ERROR: braces {} are necessary for all arms of this statement
#574: FILE: qemu-user-common.h:150:
+    if (!host_ptr)
[...]

ERROR: braces {} are necessary for all arms of this statement
#576: FILE: qemu-user-common.h:152:
+    if (host_ptr == g2h(guest_addr))
[...]

ERROR: braces {} are necessary for all arms of this statement
#578: FILE: qemu-user-common.h:154:
+    if (len > 0)
[...]

ERROR: braces {} are necessary for all arms of this statement
#593: FILE: qemu-user-common.h:169:
+    if (len < 0)
[...]

ERROR: code indent should never use tabs
#599: FILE: qemu-user-common.h:175:
+#define lock_user_struct(type, host_ptr, guest_addr, copy)^I\$

ERROR: code indent should never use tabs
#601: FILE: qemu-user-common.h:177:
+#define unlock_user_struct(host_ptr, guest_addr, copy)^I^I\$

ERROR: Missing Signed-off-by: line(s)

total: 36 errors, 1 warnings, 575 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 2/3: *-user targets object files decoupling...
ERROR: spaces required around that '=' (ctx:VxV)
#109: FILE: target/arm/cpu.c:313:
+    for(i=0;i<16;i++) {
          ^

ERROR: space required after that ';' (ctx:VxV)
#109: FILE: target/arm/cpu.c:313:
+    for(i=0;i<16;i++) {
            ^

ERROR: spaces required around that '<' (ctx:VxV)
#109: FILE: target/arm/cpu.c:313:
+    for(i=0;i<16;i++) {
              ^

ERROR: space required after that ';' (ctx:VxV)
#109: FILE: target/arm/cpu.c:313:
+    for(i=0;i<16;i++) {
                 ^

ERROR: space required before the open parenthesis '('
#109: FILE: target/arm/cpu.c:313:
+    for(i=0;i<16;i++) {

ERROR: braces {} are necessary for all arms of this statement
#111: FILE: target/arm/cpu.c:315:
+        if ((i % 4) == 3)
[...]
+        else
[...]

ERROR: braces {} are necessary for all arms of this statement
#210: FILE: target/arm/cpu.h:1130:
+    if (host_bits & float_flag_invalid)
[...]

ERROR: braces {} are necessary for all arms of this statement
#212: FILE: target/arm/cpu.h:1132:
+    if (host_bits & float_flag_divbyzero)
[...]

ERROR: braces {} are necessary for all arms of this statement
#214: FILE: target/arm/cpu.h:1134:
+    if (host_bits & float_flag_overflow)
[...]

ERROR: braces {} are necessary for all arms of this statement
#216: FILE: target/arm/cpu.h:1136:
+    if (host_bits & (float_flag_underflow | float_flag_output_denormal))
[...]

ERROR: braces {} are necessary for all arms of this statement
#218: FILE: target/arm/cpu.h:1138:
+    if (host_bits & float_flag_inexact)
[...]

ERROR: braces {} are necessary for all arms of this statement
#220: FILE: target/arm/cpu.h:1140:
+    if (host_bits & float_flag_input_denormal)
[...]

ERROR: that open brace { should be on the previous line
#592: FILE: target/m68k/op_helper.c:159:
+    for (i = 0; i < 8; i++)
+      {

ERROR: space prohibited between function name and open parenthesis '('
#599: FILE: target/m68k/op_helper.c:166:
+    cpu_fprintf (f, "PC = %08x   ", env->pc);

ERROR: space prohibited between function name and open parenthesis '('
#604: FILE: target/m68k/op_helper.c:171:
+    cpu_fprintf (f, "FPRESULT = %12g\n", *(double *)&env->fp_result);

ERROR: Missing Signed-off-by: line(s)

total: 16 errors, 0 warnings, 808 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 3/3: Introduce libtcg infrastructure...
ERROR: externs should be avoided in .c files
#529: FILE: libtcg/tcg.c:32:
+void tb_link_page(TranslationBlock *tb, tb_page_addr_t phys_pc,

ERROR: externs should be avoided in .c files
#532: FILE: libtcg/tcg.c:35:
+void test(void);

ERROR: open brace '{' following function declarations go on the next line
#533: FILE: libtcg/tcg.c:36:
+void test(void) {

ERROR: do not use C99 // comments
#538: FILE: libtcg/tcg.c:41:
+  // cpu_init("");

ERROR: do not use C99 // comments
#549: FILE: libtcg/tcg.c:52:
+  // x = &target_mmap;

ERROR: externs should be avoided in .c files
#997: FILE: translate-all.c:1242:
+void tb_link_page(TranslationBlock *tb, tb_page_addr_t phys_pc,

ERROR: Missing Signed-off-by: line(s)

total: 7 errors, 0 warnings, 689 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]