qemu-riscv
[Top][All Lists]
Advanced

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

Re: [PATCH v3] qemu/atomic.h: rename atomic_ to qatomic_


From: no-reply
Subject: Re: [PATCH v3] qemu/atomic.h: rename atomic_ to qatomic_
Date: Wed, 23 Sep 2020 06:31:07 -0700 (PDT)

Patchew URL: 
20200923105646.47864-1-stefanha@redhat.com/">https://patchew.org/QEMU/20200923105646.47864-1-stefanha@redhat.com/



Hi,

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

Type: series
Message-id: 20200923105646.47864-1-stefanha@redhat.com
Subject: [PATCH v3] qemu/atomic.h: rename atomic_ to qatomic_

=== 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 ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 - [tag update]      patchew/20200922210101.4081073-1-jsnow@redhat.com -> 
patchew/20200922210101.4081073-1-jsnow@redhat.com
 * [new tag]         patchew/20200923113900.72718-1-david@redhat.com -> 
patchew/20200923113900.72718-1-david@redhat.com
 * [new tag]         patchew/20200923131829.3849-1-erich.mcmillan@hp.com -> 
patchew/20200923131829.3849-1-erich.mcmillan@hp.com
Switched to a new branch 'test'
07abb8e qemu/atomic.h: rename atomic_ to qatomic_

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

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

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

ERROR: space required before that '*' (ctx:VxB)
#2943: FILE: include/qemu/atomic.h:334:
+#define qatomic_set__nocheck(p, i) ((*(__typeof__(*(p)) volatile*) (p)) = (i))
                                                                 ^

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

ERROR: space required after that ',' (ctx:VxV)
#2948: FILE: include/qemu/atomic.h:337:
+#define qatomic_set(ptr, i)     qatomic_set__nocheck(ptr,i)
                                                         ^

ERROR: memory barrier without comment
#3020: FILE: include/qemu/atomic.h:395:
+#define qatomic_xchg(ptr, i)    (smp_mb(), __sync_lock_test_and_set(ptr, i))

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

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

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

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

total: 7 errors, 4 warnings, 6267 lines checked

Commit 07abb8e79dbe (qemu/atomic.h: rename atomic_ to qatomic_) 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
20200923105646.47864-1-stefanha@redhat.com/testing.checkpatch/?type=message">http://patchew.org/logs/20200923105646.47864-1-stefanha@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

reply via email to

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