summaryrefslogtreecommitdiffstats
path: root/hw/scsi
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-02-16 08:49:15 +0100
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:45:29 -0600
commitb9d58878b05c8567b20174ed47c4cf7cb58ecb1c (patch)
tree3de9dce7b5ba64ab2cac43b38aabc3dbf711c103 /hw/scsi
parentdb0e02f9e1067f0fb04660bcb76cefd727d8d6a1 (diff)
downloadhqemu-b9d58878b05c8567b20174ed47c4cf7cb58ecb1c.zip
hqemu-b9d58878b05c8567b20174ed47c4cf7cb58ecb1c.tar.gz
mptsas: fix wrong formula
MPI_DOORBELL_WHO_INIT_SHIFT is being repeated twice. Reported by Coverity. Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/scsi')
-rw-r--r--hw/scsi/mptsas.c2
1 files changed, 1 insertions, 1 deletions
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:
OpenPOWER on IntegriCloud