提交 9155b760 编写于 作者: P Paolo Bonzini

mptsas: fix wrong formula

MPI_DOORBELL_WHO_INIT_SHIFT is being repeated twice.  Reported
by Coverity.
Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 18557e64
...@@ -824,7 +824,7 @@ static uint32_t mptsas_doorbell_read(MPTSASState *s) ...@@ -824,7 +824,7 @@ static uint32_t mptsas_doorbell_read(MPTSASState *s)
{ {
uint32_t ret; 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; ret |= s->state;
switch (s->doorbell_state) { switch (s->doorbell_state) {
case DOORBELL_NONE: case DOORBELL_NONE:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册