diff --git a/drivers/crypto/hisilicon/migration/acc_vf_migration.c b/drivers/crypto/hisilicon/migration/acc_vf_migration.c index 7360536b5c6c871d85c4e9bdd1bdd78bfe9cd903..cdaa55aa8716650fff1feb19c8c3153e368ecb65 100644 --- a/drivers/crypto/hisilicon/migration/acc_vf_migration.c +++ b/drivers/crypto/hisilicon/migration/acc_vf_migration.c @@ -104,7 +104,7 @@ static int qm_wait_mb_finish(struct hisi_qm *qm, struct qm_mailbox *mailbox) { int i = 0; - while (i++) { + while (++i) { qm_mb_read(qm, mailbox); if (!((le16_to_cpu(mailbox->w0) >> QM_MB_BUSY_SHIFT) & 0x1)) break; diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c index 8a3453129de466a2499bee73bfc9361516cd1d64..f428850a376dfb08095f2e57f2ffdaf113e98aff 100644 --- a/drivers/crypto/hisilicon/qm.c +++ b/drivers/crypto/hisilicon/qm.c @@ -666,7 +666,7 @@ static int qm_wait_mb_finish(struct hisi_qm *qm, struct qm_mailbox *mailbox) { int i = 0; - while (i++) { + while (++i) { qm_mb_read(qm, mailbox); if (!((le16_to_cpu(mailbox->w0) >> QM_MB_BUSY_SHIFT) & 0x1)) break;