Skip to contentSkip to conversation

ppc440_uc: Fix a copy/paste error

PATCH Applied Philippe Mathieu-Daudé 3 participants 3 messages Jul 4, 2018 – Jul 5, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc440_uc: Fix a copy/paste error

Missed in 3c409c1927e, hopefully reported by Coverity.

Fixes Coverity CID 1393788 (Copy-paste error)
---
 hw/ppc/ppc440_uc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/ppc/ppc440_uc.c +1 -1
index 0bbaa6844a..09ccda548f 100644
@@ -935,7 +935,7 @@ static void dcr_write_dma(void *opaque, int dcrn, uint32_t val)
                     if (wptr) {
                         cpu_physical_memory_unmap(wptr, wlen, 1, didx);
                     }
-                    if (wptr) {
+                    if (rptr) {
                         cpu_physical_memory_unmap(rptr, rlen, 0, sidx);
                     }
                 }
Signature · 1 line
2.18.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 1 line · Philippe Mathieu-Daudé

Missed in 3c409c1927e, hopefully reported by Coverity.

Apparently Coverity did report it and Paolo already notified me about that. I was about to send a patch but you were faster. Thank you very much.

Quoted 20 lines
Fixes Coverity CID 1393788 (Copy-paste error)

---
hw/ppc/ppc440_uc.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
hw/ppc/ppc440_uc.c +1 -1
index 0bbaa6844a..09ccda548f 100644
@@ -935,7 +935,7 @@ static void dcr_write_dma(void *opaque, int dcrn, uint32_t val)
                    if (wptr) {
                        cpu_physical_memory_unmap(wptr, wlen, 1, didx);
                    }
-                    if (wptr) {
+                    if (rptr) {
                        cpu_physical_memory_unmap(rptr, rlen, 0, sidx);
                    }
                }
Applied
#2 lore raw
Quoted 7 lines · BALATON Zoltan
Quoted 1 line · Philippe Mathieu-Daudé

Missed in 3c409c1927e, hopefully reported by Coverity.

Apparently Coverity did report it and Paolo already notified me about that. I was about to send a patch but you were faster. Thank you very much.

Applied to ppc-for-3.0, thanks.

Quoted 21 lines
Quoted 21 lines
Fixes Coverity CID 1393788 (Copy-paste error)

---
hw/ppc/ppc440_uc.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
hw/ppc/ppc440_uc.c +1 -1
index 0bbaa6844a..09ccda548f 100644
@@ -935,7 +935,7 @@ static void dcr_write_dma(void *opaque, int dcrn, uint32_t val)
                    if (wptr) {
                        cpu_physical_memory_unmap(wptr, wlen, 1, didx);
                    }
-                    if (wptr) {
+                    if (rptr) {
                        cpu_physical_memory_unmap(rptr, rlen, 0, sidx);
                    }
                }
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson