[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/3] mptsas: fix wrong formula
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 3/3] mptsas: fix wrong formula |
Date: |
Tue, 16 Feb 2016 09:05:09 +0100 |
MPI_DOORBELL_WHO_INIT_SHIFT is being repeated twice. Reported
by Coverity.
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/scsi/mptsas.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/scsi/mptsas.c b/hw/scsi/mptsas.c
index 1ce3226..499c146 100644
--- a/hw/scsi/mptsas.c
+++ b/hw/scsi/mptsas.c
@@ -824,7 +824,7 @@ static uint32_t mptsas_doorbell_read(MPTSASState *s)
{
uint32_t ret;
- ret = (s->who_init << MPI_DOORBELL_WHO_INIT_SHIFT) &
MPI_DOORBELL_WHO_INIT_SHIFT;
+ ret = (s->who_init << MPI_DOORBELL_WHO_INIT_SHIFT) &
MPI_DOORBELL_WHO_INIT_MASK;
ret |= s->state;
switch (s->doorbell_state) {
case DOORBELL_NONE:
--
2.5.0