diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2016-02-16 08:49:15 +0100 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineering.com> | 2019-11-29 19:45:29 -0600 |
commit | b9d58878b05c8567b20174ed47c4cf7cb58ecb1c (patch) | |
tree | 3de9dce7b5ba64ab2cac43b38aabc3dbf711c103 /hw/scsi | |
parent | db0e02f9e1067f0fb04660bcb76cefd727d8d6a1 (diff) | |
download | hqemu-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.c | 2 |
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: |