-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
driver: crypto: hisilicon: fix error handling #6648
Conversation
yuzexiyzx
commented
Jan 29, 2024
- support num = 0 in qm_set_vt_common().
- release qp when qm_xqc_cfg() failed.
- add check of msg and qp->num in hisi_qp_recv_sync().
There's a typo in the title of the commit, I guess it should be "exception". Please explain in plain text in the commit message why you're doing this. Most of what you're doing can be seen in the diff, but sometimes it's nice with a summary of that too. |
@jenswi-linaro comment solved.
|
I'm sorry I think you missed my point. You're in principle describing the diff in detail. In a good commit message you describe why a change is being made, not just what's changing. If you need to make a list of all things done in a patch it's usually a sign that it should have been multiple patches, but in this case, it seems that it all belongs in one patch. How about something like:
|
} | ||
|
||
qm->qp_in_used++; | ||
mutex_unlock(&qm->qp_lock); | ||
return qp; | ||
|
||
qp_release: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since it's an error path, prefer have err_
prefix in the branch label.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
solved
@jenswi-linaro @etienne-lms All comments have been solved. |
|
The title of the commit says:
I think the word "exception" might be misleading since we're not dealing with what we normally call exceptions in this patch. How about using the word "error" instead? |
With my comment addressed, please apply: |
When qm_set_vft_common() fails to configure, qm_set_xqc_vft() is called with the num argument as zero to disable the device. Update qm_set_xqc_vft() to handle this error path. Signed-off-by: Zexi Yu <yuzexi@hisilicon.com> Acked-by: Jens wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
@jforissier All comments have been solved. |
The IBART error can be ignored (rebase needed). @yuzexiyzx thanks! |