qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel@nongnu.org
Cc: "Kevin Wolf" <kwolf@redhat.com>,
	"Cornelia Huck" <cohuck@redhat.com>,
	"Alex Williamson" <alex.williamson@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	qemu-block@nongnu.org, "David Hildenbrand" <david@redhat.com>,
	"Juan Quintela" <quintela@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	"Max Reitz" <mreitz@redhat.com>,
	"Halil Pasic" <pasic@linux.ibm.com>,
	"Christian Borntraeger" <borntraeger@de.ibm.com>,
	qemu-s390x@nongnu.org, qemu-ppc@nongnu.org,
	"Keith Busch" <kbusch@kernel.org>,
	"Richard Henderson" <rth@twiddle.net>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"David Gibson" <david@gibson.dropbear.id.au>
Subject: [PATCH 09/10] exec: Update coding style to make checkpatch.pl happy
Date: Thu,  7 May 2020 19:39:57 +0200	[thread overview]
Message-ID: <20200507173958.25894-10-philmd@redhat.com> (raw)
In-Reply-To: <20200507173958.25894-1-philmd@redhat.com>

We will move this code in the next commit. Clean it up
first to avoid checkpatch.pl errors.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 include/exec/ram_addr.h | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h
index 0deffad66f..6acde47a0f 100644
--- a/include/exec/ram_addr.h
+++ b/include/exec/ram_addr.h
@@ -95,7 +95,8 @@ static inline bool cpu_physical_memory_all_dirty(ram_addr_t start,
     while (page < end) {
         unsigned long next = MIN(end, base + DIRTY_MEMORY_BLOCK_SIZE);
         unsigned long num = next - base;
-        unsigned long found = find_next_zero_bit(blocks->blocks[idx], num, offset);
+        unsigned long found = find_next_zero_bit(blocks->blocks[idx],
+                                                 num, offset);
         if (found < num) {
             dirty = false;
             break;
@@ -120,14 +121,14 @@ static inline bool cpu_physical_memory_is_clean(ram_addr_t addr)
 {
     bool vga = cpu_physical_memory_get_dirty_flag(addr, DIRTY_MEMORY_VGA);
     bool code = cpu_physical_memory_get_dirty_flag(addr, DIRTY_MEMORY_CODE);
-    bool migration =
-        cpu_physical_memory_get_dirty_flag(addr, DIRTY_MEMORY_MIGRATION);
+    bool migration = cpu_physical_memory_get_dirty_flag(addr,
+                                                        DIRTY_MEMORY_MIGRATION);
     return !(vga && code && migration);
 }
 
 static inline uint8_t cpu_physical_memory_range_includes_clean(ram_addr_t start,
-                                                               ram_addr_t length,
-                                                               uint8_t mask)
+                                                            ram_addr_t length,
+                                                            uint8_t mask)
 {
     uint8_t ret = 0;
 
@@ -272,7 +273,8 @@ static inline void cpu_physical_memory_set_dirty_lebitmap(unsigned long *bitmap,
 
         xen_hvm_modified_memory(start, pages << TARGET_PAGE_BITS);
     } else {
-        uint8_t clients = tcg_enabled() ? DIRTY_CLIENTS_ALL : DIRTY_CLIENTS_NOCODE;
+        uint8_t clients = tcg_enabled()
+                          ? DIRTY_CLIENTS_ALL : DIRTY_CLIENTS_NOCODE;
 
         if (!global_dirty_log) {
             clients &= ~(1 << DIRTY_MEMORY_MIGRATION);
@@ -304,8 +306,11 @@ bool cpu_physical_memory_test_and_clear_dirty(ram_addr_t start,
                                               ram_addr_t length,
                                               unsigned client);
 
-DirtyBitmapSnapshot *cpu_physical_memory_snapshot_and_clear_dirty
-    (MemoryRegion *mr, hwaddr offset, hwaddr length, unsigned client);
+DirtyBitmapSnapshot *cpu_physical_memory_snapshot_and_clear_dirty(
+                                                            MemoryRegion *mr,
+                                                            hwaddr offset,
+                                                            hwaddr length,
+                                                            unsigned client);
 
 bool cpu_physical_memory_snapshot_get_dirty(DirtyBitmapSnapshot *snap,
                                             ram_addr_t start,
@@ -314,7 +319,8 @@ bool cpu_physical_memory_snapshot_get_dirty(DirtyBitmapSnapshot *snap,
 static inline void cpu_physical_memory_clear_dirty_range(ram_addr_t start,
                                                          ram_addr_t length)
 {
-    cpu_physical_memory_test_and_clear_dirty(start, length, DIRTY_MEMORY_MIGRATION);
+    cpu_physical_memory_test_and_clear_dirty(start, length,
+                                             DIRTY_MEMORY_MIGRATION);
     cpu_physical_memory_test_and_clear_dirty(start, length, DIRTY_MEMORY_VGA);
     cpu_physical_memory_test_and_clear_dirty(start, length, DIRTY_MEMORY_CODE);
 }
-- 
2.21.3



  parent reply	other threads:[~2020-05-07 17:47 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-07 17:39 [PATCH 00/10] exec: Shear 'exec/ram_addr.h' and make NVMe device target-agnostic Philippe Mathieu-Daudé
2020-05-07 17:39 ` [PATCH 01/10] exec: Rename qemu_ram_writeback() as qemu_ram_msync() Philippe Mathieu-Daudé
2020-05-08  7:59   ` Juan Quintela
2020-05-07 17:39 ` [PATCH 02/10] exec/ramblock: Add missing 'qemu/rcu.h' include Philippe Mathieu-Daudé
2020-05-08  7:59   ` Juan Quintela
2020-05-07 17:39 ` [PATCH 03/10] exec: Move tb_invalidate_phys_range() to 'exec/exec-all.h' Philippe Mathieu-Daudé
2020-05-07 17:39 ` [PATCH 04/10] exec/memory-internal: Check CONFIG_SOFTMMU instead of CONFIG_USER_ONLY Philippe Mathieu-Daudé
2020-05-08  8:01   ` Juan Quintela
2020-05-07 17:39 ` [PATCH 05/10] exec: Move qemu_minrampagesize/qemu_maxrampagesize to 'qemu-common.h' Philippe Mathieu-Daudé
2020-05-08  8:03   ` Juan Quintela
2020-05-08  9:09   ` Cornelia Huck
2020-05-11  1:32   ` David Gibson
2020-05-07 17:39 ` [PATCH 06/10] exec: Move ramblock_recv_bitmap_offset() to migration/ram.c Philippe Mathieu-Daudé
2020-05-08  8:07   ` Juan Quintela
2020-05-08  9:27     ` Philippe Mathieu-Daudé
2020-05-07 17:39 ` [PATCH 07/10] exec: Move all RAMBlock functions to 'exec/ramblock.h' Philippe Mathieu-Daudé
2020-05-08  8:08   ` Juan Quintela
2020-05-08  9:32   ` Cornelia Huck
2020-05-11  1:33   ` David Gibson
2020-05-07 17:39 ` [PATCH 08/10] hw/block: Let the NVMe emulated device be target-agnostic Philippe Mathieu-Daudé
2020-05-07 17:42   ` Philippe Mathieu-Daudé
2020-05-08  8:09   ` Juan Quintela
2020-05-07 17:39 ` Philippe Mathieu-Daudé [this message]
2020-05-08  9:05   ` [PATCH 09/10] exec: Update coding style to make checkpatch.pl happy Juan Quintela
2020-05-07 17:39 ` [PATCH 10/10] exec: Move cpu_physical_memory_* functions to 'exec/memory-internal.h' Philippe Mathieu-Daudé
2020-05-08  8:12   ` Juan Quintela
2020-05-11  1:35   ` David Gibson
2020-05-07 22:15 ` [PATCH 00/10] exec: Shear 'exec/ram_addr.h' and make NVMe device target-agnostic Paolo Bonzini
2020-05-08  8:21   ` Juan Quintela
2020-05-08  6:19 ` no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200507173958.25894-10-philmd@redhat.com \
    --to=philmd@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=david@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=kbusch@kernel.org \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=mst@redhat.com \
    --cc=pasic@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).