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

2020-09-23 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200923151901.745277-1-phi...@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-phi...@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-phi...@redhat.com -> 
patchew/20200923151901.745277-1-phi...@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-phi...@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-de...@redhat.com

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

2020-09-23 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200923151901.745277-1-phi...@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-phi...@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-phi...@redhat.com -> 
patchew/20200923151901.745277-1-phi...@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-phi...@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-de...@redhat.com

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

2020-09-23 Thread Philippe Mathieu-Daudé
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 +-