qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 0/6] calculate downtime for postcopy live migrat


From: no-reply
Subject: Re: [Qemu-devel] [PATCH 0/6] calculate downtime for postcopy live migration
Date: Sun, 16 Apr 2017 19:32:27 -0700 (PDT)

Hi,

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

Type: series
Subject: [Qemu-devel] [PATCH 0/6] calculate downtime for postcopy live migration
Message-id: address@hidden

=== 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'
73cecab migration: detailed traces for postcopy
ba44e58 migration: send postcopy downtime back to source
2187a65 migration: calculate downtime on dst side
313364f migration: add UFFD_FEATURE_THREAD_ID feature support
cd9e8e9 util: introduce glib-helper.c
e347334 userfault: add pid into uffd_msg & update UFFD_FEATURE_*

=== OUTPUT BEGIN ===
Checking PATCH 1/6: userfault: add pid into uffd_msg & update UFFD_FEATURE_*...
Checking PATCH 2/6: util: introduce glib-helper.c...
Checking PATCH 3/6: migration: add UFFD_FEATURE_THREAD_ID feature support...
Checking PATCH 4/6: migration: calculate downtime on dst side...
ERROR: spaces required around that '/' (ctx:VxV)
#121: FILE: migration/migration.c:2144:
+#define SIZE_TO_KEEP_CPUBITS (1 + smp_cpus/sizeof(guint64))
                                           ^

ERROR: braces {} are necessary for all arms of this statement
#138: FILE: migration/migration.c:2161:
+    if (cpu < 0) {
[...]
+    } else
[...]

WARNING: line over 80 characters
#165: FILE: migration/migration.c:2188:
+        /* error_report("Could not populate downtime duration completion time 
\n\

ERROR: unnecessary whitespace before a quoted newline
#165: FILE: migration/migration.c:2188:
+        /* error_report("Could not populate downtime duration completion time 
\n\

ERROR: Error messages should not contain newlines
#165: FILE: migration/migration.c:2188:
+        /* error_report("Could not populate downtime duration completion time 
\n\

WARNING: line over 80 characters
#191: FILE: migration/migration.c:2214:
+        od_begin->cpus = g_memdup(dd->cpus, sizeof(uint64_t) * 
SIZE_TO_KEEP_CPUBITS);

WARNING: line over 80 characters
#200: FILE: migration/migration.c:2223:
+        od_end->cpus = g_memdup(dd->cpus, sizeof(uint64_t) * 
SIZE_TO_KEEP_CPUBITS);

ERROR: braces {} are necessary for all arms of this statement
#207: FILE: migration/migration.c:2230:
+    if (dd->end && dd->begin)
[...]

WARNING: line over 80 characters
#208: FILE: migration/migration.c:2231:
+        trace_split_duration_and_fill_points(dd->end - dd->begin, 
(uint64_t)key);

ERROR: braces {} are necessary for all arms of this statement
#220: FILE: migration/migration.c:2243:
+        if (test_bit(cpu_iter, dd->cpus) && dd->end && dd->begin)
[...]

WARNING: line over 80 characters
#243: FILE: migration/migration.c:2266:
+    unsigned long zero_bit = find_first_zero_bit(b, BITS_PER_LONG * 
SIZE_TO_KEEP_CPUBITS);

ERROR: that open brace { should be on the previous line
#307: FILE: migration/migration.c:2330:
+        for (point_iter = 0; point_iter < smp_cpus; point_iter++)
+        {

ERROR: braces {} are necessary even for single statement blocks
#307: FILE: migration/migration.c:2330:
+        for (point_iter = 0; point_iter < smp_cpus; point_iter++)
+        {
+            trace_downtime_per_cpu(point_iter, downtime_cpu[point_iter]);
+        }

ERROR: braces {} are necessary for all arms of this statement
#328: FILE: migration/migration.c:2351:
+        if (!od || !prev_od)
[...]

ERROR: braces {} are necessary for all arms of this statement
#331: FILE: migration/migration.c:2354:
+        if (!od->is_end || prev_od->is_end)
[...]

ERROR: braces {} are necessary for all arms of this statement
#340: FILE: migration/migration.c:2363:
+            if (!t_od)
[...]

ERROR: braces {} are necessary for all arms of this statement
#343: FILE: migration/migration.c:2366:
+            if (t_od->is_end)
[...]

ERROR: suspect code indent for conditional statements (8, 11)
#409: FILE: migration/postcopy-ram.c:419:
+        if (cpu_iter->thread_id == pid)
+           return cpu_iter->cpu_index;

ERROR: braces {} are necessary for all arms of this statement
#409: FILE: migration/postcopy-ram.c:419:
+        if (cpu_iter->thread_id == pid)
[...]

WARNING: line over 80 characters
#424: FILE: migration/postcopy-ram.c:503:
+                                                rb_offset, 
msg.arg.pagefault.feat.ptid);

WARNING: line over 80 characters
#427: FILE: migration/postcopy-ram.c:506:
+                            
get_mem_fault_cpu_index(msg.arg.pagefault.feat.ptid));

total: 14 errors, 7 warnings, 431 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 5/6: migration: send postcopy downtime back to source...
Checking PATCH 6/6: migration: detailed traces for postcopy...
ERROR: braces {} are necessary for all arms of this statement
#65: FILE: migration/postcopy-ram.c:456:
+        if (str_len <= 0)
[...]

total: 1 errors, 0 warnings, 131 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]