mirror of https://gitee.com/openkylin/qemu.git
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>
This commit is contained in:
parent
18557e646b
commit
9155b7606a
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue