diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2016-02-16 08:49:15 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-02-16 16:41:22 +0100 |
commit | 9155b7606a17967b1e056aa5d0433a047f23ae51 (patch) | |
tree | 154863a21ff8ccee54639e2b58e36a9783bf3e34 | |
parent | 18557e646b9df9d60755f2fab151642d8b81affb (diff) | |
download | qemu-9155b7606a17967b1e056aa5d0433a047f23ae51.zip qemu-9155b7606a17967b1e056aa5d0433a047f23ae51.tar.gz qemu-9155b7606a17967b1e056aa5d0433a047f23ae51.tar.bz2 |
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>
-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: |