diff --git a/drivers/mailbox/gunyah-msgq.c b/drivers/mailbox/gunyah-msgq.c index d16c523901ac..2cd05719c827 100644 --- a/drivers/mailbox/gunyah-msgq.c +++ b/drivers/mailbox/gunyah-msgq.c @@ -80,7 +80,7 @@ static int gh_msgq_send_data(struct mbox_chan *chan, void *data) * framework, then no other messages can be sent and nobody will know * to retry this message. */ - msgq->last_ret = gh_remap_error(gh_error); + msgq->last_ret = gh_error_remap(gh_error); /** * This message was successfully sent, but message queue isn't ready to diff --git a/drivers/virt/gunyah/gunyah_vcpu.c b/drivers/virt/gunyah/gunyah_vcpu.c index acb565c3a680..455ed4425121 100644 --- a/drivers/virt/gunyah/gunyah_vcpu.c +++ b/drivers/virt/gunyah/gunyah_vcpu.c @@ -192,7 +192,6 @@ static int gh_vcpu_run(struct gh_vcpu *vcpu) gh_error = gh_hypercall_vcpu_run(vcpu->rsc->capid, state_data, &vcpu_run_resp); if (gh_error == GH_ERROR_OK) { - ret = 0; switch (vcpu_run_resp.state) { case GH_VCPU_STATE_READY: if (need_resched()) @@ -238,9 +237,9 @@ static int gh_vcpu_run(struct gh_vcpu *vcpu) } } else if (gh_error == GH_ERROR_RETRY) { schedule(); - ret = 0; - } else - ret = gh_remap_error(gh_error); + } else { + ret = gh_error_remap(gh_error); + } } out: diff --git a/include/linux/gunyah.h b/include/linux/gunyah.h index ddea1ea9ce9c..2a16219fad18 100644 --- a/include/linux/gunyah.h +++ b/include/linux/gunyah.h @@ -110,10 +110,10 @@ enum gh_error { }; /** - * gh_remap_error() - Remap Gunyah hypervisor errors into a Linux error code + * gh_error_remap() - Remap Gunyah hypervisor errors into a Linux error code * @gh_error: Gunyah hypercall return value */ -static inline int gh_remap_error(enum gh_error gh_error) +static inline int gh_error_remap(enum gh_error gh_error) { switch (gh_error) { case GH_ERROR_OK: