Patchwork [07/30] memory: Replace open-coded memory_region_is_romd

login
register
mail settings
Submitter Paolo Bonzini
Date May 21, 2013, 10:57 a.m.
Message ID <1369133851-1894-8-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/245285/
State New
Headers show

Comments

Paolo Bonzini - May 21, 2013, 10:57 a.m.
From: Jan Kiszka <jan.kiszka@siemens.com>

Improves readability.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 translate-all.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Peter Maydell - May 21, 2013, 11:54 a.m.
On 21 May 2013 11:57, Paolo Bonzini <pbonzini@redhat.com> wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> Improves readability.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
for about the third time.

-- PMM

Patch

diff --git a/translate-all.c b/translate-all.c
index da93608..0d84b0d 100644
--- a/translate-all.c
+++ b/translate-all.c
@@ -1359,7 +1359,7 @@  void tb_invalidate_phys_addr(hwaddr addr)
     section = phys_page_find(address_space_memory.dispatch,
                              addr >> TARGET_PAGE_BITS);
     if (!(memory_region_is_ram(section->mr)
-          || (section->mr->rom_device && section->mr->readable))) {
+          || memory_region_is_romd(section->mr))) {
         return;
     }
     ram_addr = (memory_region_get_ram_addr(section->mr) & TARGET_PAGE_MASK)