Skip to content

Commit d8140b8

Browse files
Yang Shenherbertx
authored andcommitted
crypto: hisilicon/qm - fix wrong return type of 'pci_get_drvdata'
The parameter type of 'pci_set_drvdata' is 'struct hisi_qm', so here the return type of 'pci_get_drvdata' should be 'struct hisi_qm' too. Signed-off-by: Yang Shen <shenyang39@huawei.com> Signed-off-by: Weili Qian <qianweili@huawei.com> Reviewed-by: Zhou Wang <wangzhou1@hisilicon.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent bfc1159 commit d8140b8

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

drivers/crypto/hisilicon/hpre/hpre_main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -900,8 +900,7 @@ static int hpre_probe(struct pci_dev *pdev, const struct pci_device_id *id)
900900

901901
static void hpre_remove(struct pci_dev *pdev)
902902
{
903-
struct hpre *hpre = pci_get_drvdata(pdev);
904-
struct hisi_qm *qm = &hpre->qm;
903+
struct hisi_qm *qm = pci_get_drvdata(pdev);
905904
int ret;
906905

907906
hisi_qm_wait_task_finish(qm, &hpre_devices);

drivers/crypto/hisilicon/sec2/sec_main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -915,8 +915,7 @@ static int sec_probe(struct pci_dev *pdev, const struct pci_device_id *id)
915915

916916
static void sec_remove(struct pci_dev *pdev)
917917
{
918-
struct sec_dev *sec = pci_get_drvdata(pdev);
919-
struct hisi_qm *qm = &sec->qm;
918+
struct hisi_qm *qm = pci_get_drvdata(pdev);
920919

921920
hisi_qm_wait_task_finish(qm, &sec_devices);
922921
hisi_qm_alg_unregister(qm, &sec_devices);

drivers/crypto/hisilicon/zip/zip_main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -844,8 +844,7 @@ static int hisi_zip_probe(struct pci_dev *pdev, const struct pci_device_id *id)
844844

845845
static void hisi_zip_remove(struct pci_dev *pdev)
846846
{
847-
struct hisi_zip *hisi_zip = pci_get_drvdata(pdev);
848-
struct hisi_qm *qm = &hisi_zip->qm;
847+
struct hisi_qm *qm = pci_get_drvdata(pdev);
849848

850849
hisi_qm_wait_task_finish(qm, &zip_devices);
851850
hisi_qm_alg_unregister(qm, &zip_devices);

0 commit comments

Comments
 (0)