Skip to content

Commit 18bead7

Browse files
zhangfeigaoherbertx
authored andcommitted
crypto: hisilicon - Remove module_param uacce_mode
Remove the module_param uacce_mode, which is not used currently. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org> Signed-off-by: Zhou Wang <wangzhou1@hisilicon.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 015d239 commit 18bead7

1 file changed

Lines changed: 6 additions & 25 deletions

File tree

‎drivers/crypto/hisilicon/zip/zip_main.c‎

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,6 @@ static u32 pf_q_num = HZIP_PF_DEF_Q_NUM;
301301
module_param_cb(pf_q_num, &pf_q_num_ops, &pf_q_num, 0444);
302302
MODULE_PARM_DESC(pf_q_num, "Number of queues in PF(v1 1-4096, v2 1-1024)");
303303

304-
static int uacce_mode;
305-
module_param(uacce_mode, int, 0);
306-
307304
static u32 vfs_num;
308305
module_param(vfs_num, uint, 0444);
309306
MODULE_PARM_DESC(vfs_num, "Number of VFs to enable(1-63)");
@@ -841,27 +838,14 @@ static int hisi_zip_probe(struct pci_dev *pdev, const struct pci_device_id *id)
841838
pci_set_drvdata(pdev, hisi_zip);
842839

843840
qm = &hisi_zip->qm;
841+
qm->use_dma_api = true;
844842
qm->pdev = pdev;
845843
qm->ver = rev_id;
846844

847845
qm->sqe_size = HZIP_SQE_SIZE;
848846
qm->dev_name = hisi_zip_name;
849847
qm->fun_type = (pdev->device == PCI_DEVICE_ID_ZIP_PF) ? QM_HW_PF :
850848
QM_HW_VF;
851-
switch (uacce_mode) {
852-
case 0:
853-
qm->use_dma_api = true;
854-
break;
855-
case 1:
856-
qm->use_dma_api = false;
857-
break;
858-
case 2:
859-
qm->use_dma_api = true;
860-
break;
861-
default:
862-
return -EINVAL;
863-
}
864-
865849
ret = hisi_qm_init(qm);
866850
if (ret) {
867851
dev_err(&pdev->dev, "Failed to init qm!\n");
@@ -981,12 +965,10 @@ static int __init hisi_zip_init(void)
981965
goto err_pci;
982966
}
983967

984-
if (uacce_mode == 0 || uacce_mode == 2) {
985-
ret = hisi_zip_register_to_crypto();
986-
if (ret < 0) {
987-
pr_err("Failed to register driver to crypto.\n");
988-
goto err_crypto;
989-
}
968+
ret = hisi_zip_register_to_crypto();
969+
if (ret < 0) {
970+
pr_err("Failed to register driver to crypto.\n");
971+
goto err_crypto;
990972
}
991973

992974
return 0;
@@ -1001,8 +983,7 @@ static int __init hisi_zip_init(void)
1001983

1002984
static void __exit hisi_zip_exit(void)
1003985
{
1004-
if (uacce_mode == 0 || uacce_mode == 2)
1005-
hisi_zip_unregister_from_crypto();
986+
hisi_zip_unregister_from_crypto();
1006987
pci_unregister_driver(&hisi_zip_pci_driver);
1007988
hisi_zip_unregister_debugfs();
1008989
}

0 commit comments

Comments
 (0)