[PATCH v4 0/2] qemu/atomic.h: rename atomic_ to qatomic_

Philippe Mathieu-Daudé posted 2 patches 3 years, 7 months ago
Test docker-quick@centos7 passed
Test docker-mingw@fedora passed
Test checkpatch failed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200923151901.745277-1-philmd@redhat.com
docs/devel/atomics.rst                        | 134 +++++-----
docs/devel/lockcnt.txt                        |   8 +-
docs/devel/rcu.txt                            |  34 +--
accel/tcg/atomic_template.h                   |  20 +-
include/block/aio-wait.h                      |   4 +-
include/block/aio.h                           |   8 +-
include/exec/cpu_ldst.h                       |   2 +-
include/exec/exec-all.h                       |   6 +-
include/exec/log.h                            |   6 +-
include/exec/memory.h                         |   2 +-
include/exec/ram_addr.h                       |  26 +-
include/exec/ramlist.h                        |   2 +-
include/exec/tb-lookup.h                      |   4 +-
include/hw/core/cpu.h                         |   2 +-
include/qemu/atomic.h                         | 249 +++++++++---------
include/qemu/atomic128.h                      |   6 +-
include/qemu/bitops.h                         |   2 +-
include/qemu/coroutine.h                      |   2 +-
include/qemu/log.h                            |   6 +-
include/qemu/queue.h                          |   7 +-
include/qemu/rcu.h                            |  10 +-
include/qemu/rcu_queue.h                      | 100 +++----
include/qemu/seqlock.h                        |   8 +-
include/qemu/stats64.h                        |  28 +-
include/qemu/thread.h                         |  24 +-
.../infiniband/hw/vmw_pvrdma/pvrdma_ring.h    |  14 +-
linux-user/qemu.h                             |   2 +-
tcg/i386/tcg-target.h                         |   2 +-
tcg/s390/tcg-target.h                         |   2 +-
tcg/tci/tcg-target.h                          |   2 +-
accel/kvm/kvm-all.c                           |  12 +-
accel/tcg/cpu-exec.c                          |  15 +-
accel/tcg/cputlb.c                            |  24 +-
accel/tcg/tcg-all.c                           |   2 +-
accel/tcg/translate-all.c                     |  55 ++--
audio/jackaudio.c                             |  18 +-
block.c                                       |   4 +-
block/block-backend.c                         |  15 +-
block/io.c                                    |  48 ++--
block/nfs.c                                   |   2 +-
block/sheepdog.c                              |   2 +-
block/throttle-groups.c                       |  12 +-
block/throttle.c                              |   4 +-
blockdev.c                                    |   2 +-
blockjob.c                                    |   2 +-
contrib/libvhost-user/libvhost-user.c         |   2 +-
cpus-common.c                                 |  26 +-
dump/dump.c                                   |   8 +-
exec.c                                        |  49 ++--
hw/core/cpu.c                                 |   6 +-
hw/display/qxl.c                              |   4 +-
hw/hyperv/hyperv.c                            |  10 +-
hw/hyperv/vmbus.c                             |   2 +-
hw/i386/xen/xen-hvm.c                         |   2 +-
hw/intc/rx_icu.c                              |  12 +-
hw/intc/sifive_plic.c                         |   4 +-
hw/misc/edu.c                                 |  16 +-
hw/net/virtio-net.c                           |  10 +-
hw/rdma/rdma_backend.c                        |  18 +-
hw/rdma/rdma_rm.c                             |   2 +-
hw/rdma/vmw/pvrdma_dev_ring.c                 |   4 +-
hw/s390x/s390-pci-bus.c                       |   2 +-
hw/s390x/virtio-ccw.c                         |   2 +-
hw/virtio/vhost.c                             |   2 +-
hw/virtio/virtio-mmio.c                       |   6 +-
hw/virtio/virtio-pci.c                        |   6 +-
hw/virtio/virtio.c                            |  16 +-
hw/xtensa/pic_cpu.c                           |   4 +-
iothread.c                                    |   6 +-
linux-user/hppa/cpu_loop.c                    |  11 +-
linux-user/signal.c                           |   8 +-
migration/colo-failover.c                     |   4 +-
migration/migration.c                         |   8 +-
migration/multifd.c                           |  18 +-
migration/postcopy-ram.c                      |  34 +--
migration/rdma.c                              |  34 +--
monitor/hmp.c                                 |   6 +-
monitor/misc.c                                |   2 +-
monitor/monitor.c                             |   6 +-
qemu-nbd.c                                    |   2 +-
qga/commands.c                                |  12 +-
qom/object.c                                  |  20 +-
scsi/qemu-pr-helper.c                         |   4 +-
softmmu/cpu-throttle.c                        |  10 +-
softmmu/cpus.c                                |  42 +--
softmmu/memory.c                              |   6 +-
softmmu/vl.c                                  |   2 +-
target/arm/mte_helper.c                       |   6 +-
target/hppa/op_helper.c                       |   2 +-
target/i386/mem_helper.c                      |   2 +-
target/i386/whpx-all.c                        |   6 +-
target/riscv/cpu_helper.c                     |   2 +-
target/s390x/mem_helper.c                     |   4 +-
target/xtensa/exc_helper.c                    |   4 +-
target/xtensa/op_helper.c                     |   2 +-
tcg/tcg.c                                     |  58 ++--
tcg/tci.c                                     |   2 +-
tests/atomic64-bench.c                        |  14 +-
tests/atomic_add-bench.c                      |  14 +-
tests/iothread.c                              |   2 +-
tests/qht-bench.c                             |  12 +-
tests/rcutorture.c                            |  24 +-
tests/test-aio-multithread.c                  |  52 ++--
tests/test-logging.c                          |   4 +-
tests/test-rcu-list.c                         |  38 +--
tests/test-thread-pool.c                      |  10 +-
util/aio-posix.c                              |  14 +-
util/aio-wait.c                               |   2 +-
util/aio-win32.c                              |   5 +-
util/async.c                                  |  28 +-
util/atomic64.c                               |  10 +-
util/bitmap.c                                 |  15 +-
util/cacheinfo.c                              |   2 +-
util/fdmon-epoll.c                            |   4 +-
util/fdmon-io_uring.c                         |  12 +-
util/lockcnt.c                                |  52 ++--
util/log.c                                    |  10 +-
util/qemu-coroutine-lock.c                    |  18 +-
util/qemu-coroutine-sleep.c                   |   4 +-
util/qemu-coroutine.c                         |   6 +-
util/qemu-sockets.c                           |   4 +-
util/qemu-thread-posix.c                      |  12 +-
util/qemu-thread-win32.c                      |  12 +-
util/qemu-timer.c                             |  12 +-
util/qht.c                                    |  57 ++--
util/qsp.c                                    |  50 ++--
util/rcu.c                                    |  38 +--
util/stats64.c                                |  34 +--
scripts/kernel-doc                            |   2 +-
tcg/aarch64/tcg-target.c.inc                  |   2 +-
tcg/mips/tcg-target.c.inc                     |   2 +-
tcg/ppc/tcg-target.c.inc                      |   6 +-
tcg/sparc/tcg-target.c.inc                    |   5 +-
133 files changed, 1045 insertions(+), 1018 deletions(-)
[PATCH v4 0/2] qemu/atomic.h: rename atomic_ to qatomic_
Posted by Philippe Mathieu-Daudé 3 years, 7 months ago
This is a respin of Stefan's already reviewed patch,
fixing checkpatch.pl issues first.

Philippe Mathieu-Daudé (1):
  qemu/atomic: Update coding style to make checkpatch.pl happier

Stefan Hajnoczi (1):
  qemu/atomic.h: rename atomic_ to qatomic_

 docs/devel/atomics.rst                        | 134 +++++-----
 docs/devel/lockcnt.txt                        |   8 +-
 docs/devel/rcu.txt                            |  34 +--
 accel/tcg/atomic_template.h                   |  20 +-
 include/block/aio-wait.h                      |   4 +-
 include/block/aio.h                           |   8 +-
 include/exec/cpu_ldst.h                       |   2 +-
 include/exec/exec-all.h                       |   6 +-
 include/exec/log.h                            |   6 +-
 include/exec/memory.h                         |   2 +-
 include/exec/ram_addr.h                       |  26 +-
 include/exec/ramlist.h                        |   2 +-
 include/exec/tb-lookup.h                      |   4 +-
 include/hw/core/cpu.h                         |   2 +-
 include/qemu/atomic.h                         | 249 +++++++++---------
 include/qemu/atomic128.h                      |   6 +-
 include/qemu/bitops.h                         |   2 +-
 include/qemu/coroutine.h                      |   2 +-
 include/qemu/log.h                            |   6 +-
 include/qemu/queue.h                          |   7 +-
 include/qemu/rcu.h                            |  10 +-
 include/qemu/rcu_queue.h                      | 100 +++----
 include/qemu/seqlock.h                        |   8 +-
 include/qemu/stats64.h                        |  28 +-
 include/qemu/thread.h                         |  24 +-
 .../infiniband/hw/vmw_pvrdma/pvrdma_ring.h    |  14 +-
 linux-user/qemu.h                             |   2 +-
 tcg/i386/tcg-target.h                         |   2 +-
 tcg/s390/tcg-target.h                         |   2 +-
 tcg/tci/tcg-target.h                          |   2 +-
 accel/kvm/kvm-all.c                           |  12 +-
 accel/tcg/cpu-exec.c                          |  15 +-
 accel/tcg/cputlb.c                            |  24 +-
 accel/tcg/tcg-all.c                           |   2 +-
 accel/tcg/translate-all.c                     |  55 ++--
 audio/jackaudio.c                             |  18 +-
 block.c                                       |   4 +-
 block/block-backend.c                         |  15 +-
 block/io.c                                    |  48 ++--
 block/nfs.c                                   |   2 +-
 block/sheepdog.c                              |   2 +-
 block/throttle-groups.c                       |  12 +-
 block/throttle.c                              |   4 +-
 blockdev.c                                    |   2 +-
 blockjob.c                                    |   2 +-
 contrib/libvhost-user/libvhost-user.c         |   2 +-
 cpus-common.c                                 |  26 +-
 dump/dump.c                                   |   8 +-
 exec.c                                        |  49 ++--
 hw/core/cpu.c                                 |   6 +-
 hw/display/qxl.c                              |   4 +-
 hw/hyperv/hyperv.c                            |  10 +-
 hw/hyperv/vmbus.c                             |   2 +-
 hw/i386/xen/xen-hvm.c                         |   2 +-
 hw/intc/rx_icu.c                              |  12 +-
 hw/intc/sifive_plic.c                         |   4 +-
 hw/misc/edu.c                                 |  16 +-
 hw/net/virtio-net.c                           |  10 +-
 hw/rdma/rdma_backend.c                        |  18 +-
 hw/rdma/rdma_rm.c                             |   2 +-
 hw/rdma/vmw/pvrdma_dev_ring.c                 |   4 +-
 hw/s390x/s390-pci-bus.c                       |   2 +-
 hw/s390x/virtio-ccw.c                         |   2 +-
 hw/virtio/vhost.c                             |   2 +-
 hw/virtio/virtio-mmio.c                       |   6 +-
 hw/virtio/virtio-pci.c                        |   6 +-
 hw/virtio/virtio.c                            |  16 +-
 hw/xtensa/pic_cpu.c                           |   4 +-
 iothread.c                                    |   6 +-
 linux-user/hppa/cpu_loop.c                    |  11 +-
 linux-user/signal.c                           |   8 +-
 migration/colo-failover.c                     |   4 +-
 migration/migration.c                         |   8 +-
 migration/multifd.c                           |  18 +-
 migration/postcopy-ram.c                      |  34 +--
 migration/rdma.c                              |  34 +--
 monitor/hmp.c                                 |   6 +-
 monitor/misc.c                                |   2 +-
 monitor/monitor.c                             |   6 +-
 qemu-nbd.c                                    |   2 +-
 qga/commands.c                                |  12 +-
 qom/object.c                                  |  20 +-
 scsi/qemu-pr-helper.c                         |   4 +-
 softmmu/cpu-throttle.c                        |  10 +-
 softmmu/cpus.c                                |  42 +--
 softmmu/memory.c                              |   6 +-
 softmmu/vl.c                                  |   2 +-
 target/arm/mte_helper.c                       |   6 +-
 target/hppa/op_helper.c                       |   2 +-
 target/i386/mem_helper.c                      |   2 +-
 target/i386/whpx-all.c                        |   6 +-
 target/riscv/cpu_helper.c                     |   2 +-
 target/s390x/mem_helper.c                     |   4 +-
 target/xtensa/exc_helper.c                    |   4 +-
 target/xtensa/op_helper.c                     |   2 +-
 tcg/tcg.c                                     |  58 ++--
 tcg/tci.c                                     |   2 +-
 tests/atomic64-bench.c                        |  14 +-
 tests/atomic_add-bench.c                      |  14 +-
 tests/iothread.c                              |   2 +-
 tests/qht-bench.c                             |  12 +-
 tests/rcutorture.c                            |  24 +-
 tests/test-aio-multithread.c                  |  52 ++--
 tests/test-logging.c                          |   4 +-
 tests/test-rcu-list.c                         |  38 +--
 tests/test-thread-pool.c                      |  10 +-
 util/aio-posix.c                              |  14 +-
 util/aio-wait.c                               |   2 +-
 util/aio-win32.c                              |   5 +-
 util/async.c                                  |  28 +-
 util/atomic64.c                               |  10 +-
 util/bitmap.c                                 |  15 +-
 util/cacheinfo.c                              |   2 +-
 util/fdmon-epoll.c                            |   4 +-
 util/fdmon-io_uring.c                         |  12 +-
 util/lockcnt.c                                |  52 ++--
 util/log.c                                    |  10 +-
 util/qemu-coroutine-lock.c                    |  18 +-
 util/qemu-coroutine-sleep.c                   |   4 +-
 util/qemu-coroutine.c                         |   6 +-
 util/qemu-sockets.c                           |   4 +-
 util/qemu-thread-posix.c                      |  12 +-
 util/qemu-thread-win32.c                      |  12 +-
 util/qemu-timer.c                             |  12 +-
 util/qht.c                                    |  57 ++--
 util/qsp.c                                    |  50 ++--
 util/rcu.c                                    |  38 +--
 util/stats64.c                                |  34 +--
 scripts/kernel-doc                            |   2 +-
 tcg/aarch64/tcg-target.c.inc                  |   2 +-
 tcg/mips/tcg-target.c.inc                     |   2 +-
 tcg/ppc/tcg-target.c.inc                      |   6 +-
 tcg/sparc/tcg-target.c.inc                    |   5 +-
 133 files changed, 1045 insertions(+), 1018 deletions(-)

-- 
2.26.2

Re: [PATCH v4 0/2] qemu/atomic.h: rename atomic_ to qatomic_
Posted by no-reply@patchew.org 3 years, 7 months ago
Patchew URL: https://patchew.org/QEMU/20200923151901.745277-1-philmd@redhat.com/



Hi,

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

Type: series
Message-id: 20200923151901.745277-1-philmd@redhat.com
Subject: [PATCH v4 0/2] 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 ===

From https://github.com/patchew-project/qemu
 * [new tag]         patchew/20200923151901.745277-1-philmd@redhat.com -> patchew/20200923151901.745277-1-philmd@redhat.com
Switched to a new branch 'test'
1661a2c qemu/atomic.h: rename atomic_ to qatomic_
b27980b qemu/atomic: Update coding style to make checkpatch.pl happier

=== OUTPUT BEGIN ===
1/2 Checking commit b27980bf1db5 (qemu/atomic: Update coding style to make checkpatch.pl happier)
ERROR: Use of volatile is usually wrong, please add a comment
#23: FILE: include/qemu/atomic.h:328:
+#define atomic_read__nocheck(p)   (*(__typeof__(*(p)) volatile *) (p))

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

total: 2 errors, 0 warnings, 50 lines checked

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

2/2 Checking commit 1661a2c48e6c (qemu/atomic.h: rename atomic_ to qatomic_)
ERROR: Macros with multiple statements should be enclosed in a do - while loop
#2801: FILE: include/qemu/atomic.h:152:
+#define qatomic_rcu_read__nocheck(ptr, valptr)           \
+    __atomic_load(ptr, valptr, __ATOMIC_RELAXED);        \
     smp_read_barrier_depends();

ERROR: Use of volatile is usually wrong, please add a comment
#2946: 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
#2947: FILE: include/qemu/atomic.h:334:
+#define qatomic_set__nocheck(p, i) ((*(__typeof__(*(p)) volatile *) (p)) = (i))

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

total: 4 errors, 0 warnings, 6269 lines checked

Patch 2/2 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/20200923151901.745277-1-philmd@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Re: [PATCH v4 0/2] qemu/atomic.h: rename atomic_ to qatomic_
Posted by no-reply@patchew.org 3 years, 7 months ago
Patchew URL: https://patchew.org/QEMU/20200923151901.745277-1-philmd@redhat.com/



Hi,

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

Type: series
Message-id: 20200923151901.745277-1-philmd@redhat.com
Subject: [PATCH v4 0/2] 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 ===

From https://github.com/patchew-project/qemu
 - [tag update]      patchew/20200923151901.745277-1-philmd@redhat.com -> patchew/20200923151901.745277-1-philmd@redhat.com
Switched to a new branch 'test'
424f21a qemu/atomic.h: rename atomic_ to qatomic_
90bd4fa qemu/atomic: Update coding style to make checkpatch.pl happier

=== OUTPUT BEGIN ===
1/2 Checking commit 90bd4facd2bb (qemu/atomic: Update coding style to make checkpatch.pl happier)
ERROR: Use of volatile is usually wrong, please add a comment
#23: FILE: include/qemu/atomic.h:328:
+#define atomic_read__nocheck(p)   (*(__typeof__(*(p)) volatile *) (p))

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

total: 2 errors, 0 warnings, 50 lines checked

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

2/2 Checking commit 424f21a3295e (qemu/atomic.h: rename atomic_ to qatomic_)
ERROR: Macros with multiple statements should be enclosed in a do - while loop
#2801: FILE: include/qemu/atomic.h:152:
+#define qatomic_rcu_read__nocheck(ptr, valptr)           \
+    __atomic_load(ptr, valptr, __ATOMIC_RELAXED);        \
     smp_read_barrier_depends();

ERROR: Use of volatile is usually wrong, please add a comment
#2946: 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
#2947: FILE: include/qemu/atomic.h:334:
+#define qatomic_set__nocheck(p, i) ((*(__typeof__(*(p)) volatile *) (p)) = (i))

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

total: 4 errors, 0 warnings, 6269 lines checked

Patch 2/2 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/20200923151901.745277-1-philmd@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com