mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
crypto: hisilicon/qm - modify the process of regs dfx
The last register logic and different register logic are combined. Use "u32" instead of 'int' in the regs function input parameter to simplify some checks. Signed-off-by: Kai Ye <yekai13@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
@@ -899,8 +899,7 @@ static int sec_debugfs_init(struct hisi_qm *qm)
|
||||
qm->debug.sqe_mask_offset = SEC_SQE_MASK_OFFSET;
|
||||
qm->debug.sqe_mask_len = SEC_SQE_MASK_LEN;
|
||||
|
||||
ret = hisi_qm_diff_regs_init(qm, sec_diff_regs,
|
||||
ARRAY_SIZE(sec_diff_regs));
|
||||
ret = hisi_qm_regs_debugfs_init(qm, sec_diff_regs, ARRAY_SIZE(sec_diff_regs));
|
||||
if (ret) {
|
||||
dev_warn(dev, "Failed to init SEC diff regs!\n");
|
||||
goto debugfs_remove;
|
||||
@@ -915,7 +914,7 @@ static int sec_debugfs_init(struct hisi_qm *qm)
|
||||
return 0;
|
||||
|
||||
failed_to_create:
|
||||
hisi_qm_diff_regs_uninit(qm, ARRAY_SIZE(sec_diff_regs));
|
||||
hisi_qm_regs_debugfs_uninit(qm, ARRAY_SIZE(sec_diff_regs));
|
||||
debugfs_remove:
|
||||
debugfs_remove_recursive(sec_debugfs_root);
|
||||
return ret;
|
||||
@@ -923,7 +922,7 @@ debugfs_remove:
|
||||
|
||||
static void sec_debugfs_exit(struct hisi_qm *qm)
|
||||
{
|
||||
hisi_qm_diff_regs_uninit(qm, ARRAY_SIZE(sec_diff_regs));
|
||||
hisi_qm_regs_debugfs_uninit(qm, ARRAY_SIZE(sec_diff_regs));
|
||||
|
||||
debugfs_remove_recursive(qm->debug.debug_root);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user