[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1600513296-29287-2-git-send-email-qianweili@huawei.com>
Date: Sat, 19 Sep 2020 19:01:35 +0800
From: Weili Qian <qianweili@...wei.com>
To: <herbert@...dor.apana.org.au>, <davem@...emloft.net>
CC: <linux-kernel@...r.kernel.org>, <linux-crypto@...r.kernel.org>,
<xuzaibo@...wei.com>, <wangzhou1@...ilicon.com>
Subject: [PATCH 1/2] crypto: hisilicon/qm - fix wrong return type of 'pci_get_drvdata'
From: Yang Shen <shenyang39@...wei.com>
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@...wei.com>
Signed-off-by: Weili Qian <qianweili@...wei.com>
Reviewed-by: Zhou Wang <wangzhou1@...ilicon.com>
---
drivers/crypto/hisilicon/hpre/hpre_main.c | 3 +--
drivers/crypto/hisilicon/sec2/sec_main.c | 3 +--
drivers/crypto/hisilicon/zip/zip_main.c | 3 +--
3 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/crypto/hisilicon/hpre/hpre_main.c b/drivers/crypto/hisilicon/hpre/hpre_main.c
index cf9169d..a33394d 100644
--- a/drivers/crypto/hisilicon/hpre/hpre_main.c
+++ b/drivers/crypto/hisilicon/hpre/hpre_main.c
@@ -900,8 +900,7 @@ static int hpre_probe(struct pci_dev *pdev, const struct pci_device_id *id)
static void hpre_remove(struct pci_dev *pdev)
{
- struct hpre *hpre = pci_get_drvdata(pdev);
- struct hisi_qm *qm = &hpre->qm;
+ struct hisi_qm *qm = pci_get_drvdata(pdev);
int ret;
hisi_qm_wait_task_finish(qm, &hpre_devices);
diff --git a/drivers/crypto/hisilicon/sec2/sec_main.c b/drivers/crypto/hisilicon/sec2/sec_main.c
index de42264..5488963 100644
--- a/drivers/crypto/hisilicon/sec2/sec_main.c
+++ b/drivers/crypto/hisilicon/sec2/sec_main.c
@@ -915,8 +915,7 @@ static int sec_probe(struct pci_dev *pdev, const struct pci_device_id *id)
static void sec_remove(struct pci_dev *pdev)
{
- struct sec_dev *sec = pci_get_drvdata(pdev);
- struct hisi_qm *qm = &sec->qm;
+ struct hisi_qm *qm = pci_get_drvdata(pdev);
hisi_qm_wait_task_finish(qm, &sec_devices);
hisi_qm_alg_unregister(qm, &sec_devices);
diff --git a/drivers/crypto/hisilicon/zip/zip_main.c b/drivers/crypto/hisilicon/zip/zip_main.c
index ee5f3d9..bd53ee7 100644
--- a/drivers/crypto/hisilicon/zip/zip_main.c
+++ b/drivers/crypto/hisilicon/zip/zip_main.c
@@ -844,8 +844,7 @@ static int hisi_zip_probe(struct pci_dev *pdev, const struct pci_device_id *id)
static void hisi_zip_remove(struct pci_dev *pdev)
{
- struct hisi_zip *hisi_zip = pci_get_drvdata(pdev);
- struct hisi_qm *qm = &hisi_zip->qm;
+ struct hisi_qm *qm = pci_get_drvdata(pdev);
hisi_qm_wait_task_finish(qm, &zip_devices);
hisi_qm_alg_unregister(qm, &zip_devices);
--
2.8.1
Powered by blists - more mailing lists