[Qemu-devel] [PATCH] ppc440_pcix: Fix a typo in setting a register (Coverity CID1390577)

BALATON Zoltan posted 1 patch 7 years, 5 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/39f72851afe39e24596a4aa328f4e9672cd37fd8.1525423550.git.balaton@eik.bme.hu
Test checkpatch passed
Test docker-build@min-glib passed
Test docker-mingw@fedora passed
Test s390x passed
hw/ppc/ppc440_pcix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[Qemu-devel] [PATCH] ppc440_pcix: Fix a typo in setting a register (Coverity CID1390577)
Posted by BALATON Zoltan 7 years, 5 months ago
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
 hw/ppc/ppc440_pcix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/ppc/ppc440_pcix.c b/hw/ppc/ppc440_pcix.c
index b1307e6..d8af04b 100644
--- a/hw/ppc/ppc440_pcix.c
+++ b/hw/ppc/ppc440_pcix.c
@@ -257,7 +257,7 @@ static void ppc440_pcix_reg_write4(void *opaque, hwaddr addr,
         break;
     case PCIX0_PIM2SAL:
         s->pim[2].sa &= 0xffffffff00000000ULL;
-        s->pim[2].sa = val;
+        s->pim[2].sa |= val;
         ppc440_pcix_update_pim(s, 2);
         break;
     case PCIX0_PIM2LAL:
-- 
2.7.6


Re: [Qemu-devel] [PATCH] ppc440_pcix: Fix a typo in setting a register (Coverity CID1390577)
Posted by David Gibson 7 years, 5 months ago
On Fri, May 04, 2018 at 10:45:50AM +0200, BALATON Zoltan wrote:
> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>

Applied to ppc-for-2.13.  There won't be a pull request until after
I'm back from holidays in a month, though. Sorry.

> ---
>  hw/ppc/ppc440_pcix.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/ppc/ppc440_pcix.c b/hw/ppc/ppc440_pcix.c
> index b1307e6..d8af04b 100644
> --- a/hw/ppc/ppc440_pcix.c
> +++ b/hw/ppc/ppc440_pcix.c
> @@ -257,7 +257,7 @@ static void ppc440_pcix_reg_write4(void *opaque, hwaddr addr,
>          break;
>      case PCIX0_PIM2SAL:
>          s->pim[2].sa &= 0xffffffff00000000ULL;
> -        s->pim[2].sa = val;
> +        s->pim[2].sa |= val;
>          ppc440_pcix_update_pim(s, 2);
>          break;
>      case PCIX0_PIM2LAL:

-- 
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