[sheepdog] [PATCH v2] qemu/atomic.h: prefix qemu_ to solve <stdatomic.h> collisions

no-reply at patchew.org no-reply at patchew.org
Tue Sep 22 11:30:16 CEST 2020


Patchew URL: https://patchew.org/QEMU/20200922085838.230505-1-stefanha@redhat.com/



Hi,

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

Type: series
Message-id: 20200922085838.230505-1-stefanha at redhat.com
Subject: [PATCH v2] qemu/atomic.h: prefix qemu_ to solve <stdatomic.h> collisions

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

From https://github.com/patchew-project/qemu
 * [new tag]         patchew/20200922085838.230505-1-stefanha at redhat.com -> patchew/20200922085838.230505-1-stefanha at redhat.com
Switched to a new branch 'test'
1e6457d qemu/atomic.h: prefix qemu_ to solve <stdatomic.h> collisions

=== OUTPUT BEGIN ===
WARNING: Block comments use a trailing */ on a separate line
#2501: FILE: hw/virtio/vhost.c:92:
+         * but it's easier to use qemu_atomic_* than roll our own. */

ERROR: Macros with multiple statements should be enclosed in a do - while loop
#2973: FILE: include/qemu/atomic.h:152:
+#define qemu_atomic_rcu_read__nocheck(ptr, valptr)      \
     __atomic_load(ptr, valptr, __ATOMIC_RELAXED);       \
     smp_read_barrier_depends();

ERROR: space required before that '*' (ctx:VxB)
#3128: FILE: include/qemu/atomic.h:347:
+#define qemu_atomic_read__nocheck(p) (*(__typeof__(*(p)) volatile*) (p))
                                                                  ^

ERROR: Use of volatile is usually wrong, please add a comment
#3128: FILE: include/qemu/atomic.h:347:
+#define qemu_atomic_read__nocheck(p) (*(__typeof__(*(p)) volatile*) (p))

ERROR: space required before that '*' (ctx:VxB)
#3130: FILE: include/qemu/atomic.h:349:
+    ((*(__typeof__(*(p)) volatile*) (p)) = (i))
                                  ^

ERROR: Use of volatile is usually wrong, please add a comment
#3130: FILE: include/qemu/atomic.h:349:
+    ((*(__typeof__(*(p)) volatile*) (p)) = (i))

ERROR: space required after that ',' (ctx:VxV)
#3135: FILE: include/qemu/atomic.h:352:
+#define qemu_atomic_set(ptr, i)     qemu_atomic_set__nocheck(ptr,i)
                                                                 ^

ERROR: memory barrier without comment
#3210: FILE: include/qemu/atomic.h:410:
+#define qemu_atomic_xchg(ptr, i) (smp_mb(), __sync_lock_test_and_set(ptr, i))

WARNING: Block comments use a leading /* on a separate line
#3285: FILE: include/qemu/atomic.h:462:
+/* qemu_atomic_mb_read/set semantics map Java volatile variables. They are

WARNING: Block comments use a leading /* on a separate line
#6402: FILE: util/bitmap.c:214:
+        /* If we avoided the full barrier in qemu_atomic_or(), issue a

WARNING: Block comments use a leading /* on a separate line
#7438: FILE: util/rcu.c:85:
+        /* Instead of using qemu_atomic_mb_set for index->waiting, and

WARNING: Block comments use a leading /* on a separate line
#7464: FILE: util/rcu.c:154:
+        /* In either case, the qemu_atomic_mb_set below blocks stores that free

total: 7 errors, 5 warnings, 6520 lines checked

Commit 1e6457dfb499 (qemu/atomic.h: prefix qemu_ to solve <stdatomic.h> collisions) 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


The full log is available at
http://patchew.org/logs/20200922085838.230505-1-stefanha@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel at redhat.com


More information about the sheepdog mailing list