linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] crypto: hisilicon - misc fixes
@ 2020-09-03 11:53 Weili Qian
  2020-09-03 11:53 ` [PATCH 1/2] crypto: hisilicon/qm - fix wrong return type of 'pci_get_drvdata' Weili Qian
  2020-09-03 11:54 ` [PATCH 2/2] crypto: hisilicon/qm - remove the update of flags Weili Qian
  0 siblings, 2 replies; 6+ messages in thread
From: Weili Qian @ 2020-09-03 11:53 UTC (permalink / raw)
  To: herbert, davem; +Cc: linux-kernel, linux-crypto, xuzaibo, wangzhou1

This patchset fix some driver bugs

Weili Qian (1):
  crypto: hisilicon/qm - remove the update of flags

Yang Shen (1):
  crypto: hisilicon/qm - fix wrong return type of 'pci_get_drvdata'

 drivers/crypto/hisilicon/hpre/hpre_main.c | 3 +--
 drivers/crypto/hisilicon/qm.c             | 1 -
 drivers/crypto/hisilicon/sec2/sec_main.c  | 3 +--
 drivers/crypto/hisilicon/zip/zip_main.c   | 3 +--
 4 files changed, 3 insertions(+), 7 deletions(-)

-- 
2.8.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] crypto: hisilicon/qm - fix wrong return type of 'pci_get_drvdata'
  2020-09-03 11:53 [PATCH 0/2] crypto: hisilicon - misc fixes Weili Qian
@ 2020-09-03 11:53 ` Weili Qian
  2020-09-03 15:15   ` kernel test robot
  2020-09-03 11:54 ` [PATCH 2/2] crypto: hisilicon/qm - remove the update of flags Weili Qian
  1 sibling, 1 reply; 6+ messages in thread
From: Weili Qian @ 2020-09-03 11:53 UTC (permalink / raw)
  To: herbert, davem; +Cc: linux-kernel, linux-crypto, xuzaibo, wangzhou1

From: Yang Shen <shenyang39@huawei.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@huawei.com>
Signed-off-by: Weili Qian <qianweili@huawei.com>
Reviewed-by: Zhou Wang <wangzhou1@hisilicon.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 45741d2..4fd0a0a 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 f912e57..6d4380b 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 8bbae28..6641d39 100644
--- a/drivers/crypto/hisilicon/zip/zip_main.c
+++ b/drivers/crypto/hisilicon/zip/zip_main.c
@@ -846,8 +846,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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] crypto: hisilicon/qm - remove the update of flags
  2020-09-03 11:53 [PATCH 0/2] crypto: hisilicon - misc fixes Weili Qian
  2020-09-03 11:53 ` [PATCH 1/2] crypto: hisilicon/qm - fix wrong return type of 'pci_get_drvdata' Weili Qian
@ 2020-09-03 11:54 ` Weili Qian
  1 sibling, 0 replies; 6+ messages in thread
From: Weili Qian @ 2020-09-03 11:54 UTC (permalink / raw)
  To: herbert, davem; +Cc: linux-kernel, linux-crypto, xuzaibo, wangzhou1

'qm_init_qp_status' is just a help function to initiate some 'QP' status.
'QP' status should be updated separately.
This patch removes the updating flags in 'QP' status.

Signed-off-by: Weili Qian <qianweili@huawei.com>
Reviewed-by: Zhou Wang <wangzhou1@hisilicon.com>
---
 drivers/crypto/hisilicon/qm.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c
index 07efc52..cfd66ee 100644
--- a/drivers/crypto/hisilicon/qm.c
+++ b/drivers/crypto/hisilicon/qm.c
@@ -757,7 +757,6 @@ static void qm_init_qp_status(struct hisi_qp *qp)
 	qp_status->sq_tail = 0;
 	qp_status->cq_head = 0;
 	qp_status->cqc_phase = true;
-	atomic_set(&qp_status->flags, 0);
 	atomic_set(&qp_status->used, 0);
 }
 
-- 
2.8.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] crypto: hisilicon/qm - fix wrong return type of 'pci_get_drvdata'
  2020-09-03 11:53 ` [PATCH 1/2] crypto: hisilicon/qm - fix wrong return type of 'pci_get_drvdata' Weili Qian
@ 2020-09-03 15:15   ` kernel test robot
  2020-09-04 10:06     ` Weili Qian
  0 siblings, 1 reply; 6+ messages in thread
From: kernel test robot @ 2020-09-03 15:15 UTC (permalink / raw)
  To: Weili Qian, herbert, davem
  Cc: kbuild-all, linux-kernel, linux-crypto, xuzaibo, wangzhou1

[-- Attachment #1: Type: text/plain, Size: 3116 bytes --]

Hi Weili,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on cryptodev/master]
[also build test ERROR on crypto/master sparc-next/master v5.9-rc3 next-20200903]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Weili-Qian/crypto-hisilicon-misc-fixes/20200903-200547
base:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/crypto/hisilicon/zip/zip_main.c: In function 'hisi_zip_remove':
>> drivers/crypto/hisilicon/zip/zip_main.c:862:24: error: 'hisi_zip' undeclared (first use in this function)
     862 |  hisi_zip_debugfs_exit(hisi_zip);
         |                        ^~~~~~~~
   drivers/crypto/hisilicon/zip/zip_main.c:862:24: note: each undeclared identifier is reported only once for each function it appears in

# https://github.com/0day-ci/linux/commit/9233b94d43e85aa53ba599605c7536455521f576
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Weili-Qian/crypto-hisilicon-misc-fixes/20200903-200547
git checkout 9233b94d43e85aa53ba599605c7536455521f576
vim +/hisi_zip +862 drivers/crypto/hisilicon/zip/zip_main.c

39977f4b51cdc5 Hao Fang   2019-11-07  851  
62c455ca853e3e Zhou Wang  2019-08-02  852  static void hisi_zip_remove(struct pci_dev *pdev)
62c455ca853e3e Zhou Wang  2019-08-02  853  {
9233b94d43e85a Yang Shen  2020-09-03  854  	struct hisi_qm *qm = pci_get_drvdata(pdev);
62c455ca853e3e Zhou Wang  2019-08-02  855  
daa31783c0ebab Weili Qian 2020-08-15  856  	hisi_qm_wait_task_finish(qm, &zip_devices);
3d29e98d1d7550 Yang Shen  2020-08-15  857  	hisi_qm_alg_unregister(qm, &zip_devices);
3d29e98d1d7550 Yang Shen  2020-08-15  858  
619e464ae22a17 Shukun Tan 2020-04-02  859  	if (qm->fun_type == QM_HW_PF && qm->vfs_num)
daa31783c0ebab Weili Qian 2020-08-15  860  		hisi_qm_sriov_disable(pdev, qm->is_frozen);
79e09f30eeba85 Zhou Wang  2019-08-02  861  
72c7a68d2ea348 Zhou Wang  2019-08-02 @862  	hisi_zip_debugfs_exit(hisi_zip);
e88dd6e1d8370f Yang Shen  2020-08-15  863  	hisi_qm_stop(qm, QM_NORMAL);
eaebf4c3b103df Shukun Tan 2020-01-20  864  	hisi_qm_dev_err_uninit(qm);
62c455ca853e3e Zhou Wang  2019-08-02  865  	hisi_qm_uninit(qm);
62c455ca853e3e Zhou Wang  2019-08-02  866  }
62c455ca853e3e Zhou Wang  2019-08-02  867  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 61578 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] crypto: hisilicon/qm - fix wrong return type of 'pci_get_drvdata'
  2020-09-03 15:15   ` kernel test robot
@ 2020-09-04 10:06     ` Weili Qian
  0 siblings, 0 replies; 6+ messages in thread
From: Weili Qian @ 2020-09-04 10:06 UTC (permalink / raw)
  To: kernel test robot, herbert, davem
  Cc: kbuild-all, linux-kernel, linux-crypto, xuzaibo, wangzhou1



On 2020/9/3 23:15, kernel test robot wrote:
> Hi Weili,
> 
> Thank you for the patch! Yet something to improve:
> 
> [auto build test ERROR on cryptodev/master]
> [also build test ERROR on crypto/master sparc-next/master v5.9-rc3 next-20200903]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch]
> 
> url:    https://github.com/0day-ci/linux/commits/Weili-Qian/crypto-hisilicon-misc-fixes/20200903-200547
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
> config: ia64-allmodconfig (attached as .config)
> compiler: ia64-linux-gcc (GCC) 9.3.0
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64 
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>    drivers/crypto/hisilicon/zip/zip_main.c: In function 'hisi_zip_remove':
>>> drivers/crypto/hisilicon/zip/zip_main.c:862:24: error: 'hisi_zip' undeclared (first use in this function)
>      862 |  hisi_zip_debugfs_exit(hisi_zip);
>          |                        ^~~~~~~~
>    drivers/crypto/hisilicon/zip/zip_main.c:862:24: note: each undeclared identifier is reported only once for each function it appears in
> 
> # https://github.com/0day-ci/linux/commit/9233b94d43e85aa53ba599605c7536455521f576
> git remote add linux-review https://github.com/0day-ci/linux
> git fetch --no-tags linux-review Weili-Qian/crypto-hisilicon-misc-fixes/20200903-200547
> git checkout 9233b94d43e85aa53ba599605c7536455521f576
> vim +/hisi_zip +862 drivers/crypto/hisilicon/zip/zip_main.c
> 
> 39977f4b51cdc5 Hao Fang   2019-11-07  851  
> 62c455ca853e3e Zhou Wang  2019-08-02  852  static void hisi_zip_remove(struct pci_dev *pdev)
> 62c455ca853e3e Zhou Wang  2019-08-02  853  {
> 9233b94d43e85a Yang Shen  2020-09-03  854  	struct hisi_qm *qm = pci_get_drvdata(pdev);
> 62c455ca853e3e Zhou Wang  2019-08-02  855  
> daa31783c0ebab Weili Qian 2020-08-15  856  	hisi_qm_wait_task_finish(qm, &zip_devices);
> 3d29e98d1d7550 Yang Shen  2020-08-15  857  	hisi_qm_alg_unregister(qm, &zip_devices);
> 3d29e98d1d7550 Yang Shen  2020-08-15  858  
> 619e464ae22a17 Shukun Tan 2020-04-02  859  	if (qm->fun_type == QM_HW_PF && qm->vfs_num)
> daa31783c0ebab Weili Qian 2020-08-15  860  		hisi_qm_sriov_disable(pdev, qm->is_frozen);
> 79e09f30eeba85 Zhou Wang  2019-08-02  861  
> 72c7a68d2ea348 Zhou Wang  2019-08-02 @862  	hisi_zip_debugfs_exit(hisi_zip);
> e88dd6e1d8370f Yang Shen  2020-08-15  863  	hisi_qm_stop(qm, QM_NORMAL);
> eaebf4c3b103df Shukun Tan 2020-01-20  864  	hisi_qm_dev_err_uninit(qm);
> 62c455ca853e3e Zhou Wang  2019-08-02  865  	hisi_qm_uninit(qm);
> 62c455ca853e3e Zhou Wang  2019-08-02  866  }
> 62c455ca853e3e Zhou Wang  2019-08-02  867  
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
> 

Hi all,
 Sorry,this patch depends on https://patchwork.kernel.org/patch/11732097/.
I will resend it when the dependent patch is applied.

Thanks,
Weili


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] crypto: hisilicon/qm - fix wrong return type of 'pci_get_drvdata'
  2020-09-19 11:01 [PATCH 0/2] crypto: hisilicon/qm - misc fixes Weili Qian
@ 2020-09-19 11:01 ` Weili Qian
  0 siblings, 0 replies; 6+ messages in thread
From: Weili Qian @ 2020-09-19 11:01 UTC (permalink / raw)
  To: herbert, davem; +Cc: linux-kernel, linux-crypto, xuzaibo, wangzhou1

From: Yang Shen <shenyang39@huawei.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@huawei.com>
Signed-off-by: Weili Qian <qianweili@huawei.com>
Reviewed-by: Zhou Wang <wangzhou1@hisilicon.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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-09-19 11:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-03 11:53 [PATCH 0/2] crypto: hisilicon - misc fixes Weili Qian
2020-09-03 11:53 ` [PATCH 1/2] crypto: hisilicon/qm - fix wrong return type of 'pci_get_drvdata' Weili Qian
2020-09-03 15:15   ` kernel test robot
2020-09-04 10:06     ` Weili Qian
2020-09-03 11:54 ` [PATCH 2/2] crypto: hisilicon/qm - remove the update of flags Weili Qian
2020-09-19 11:01 [PATCH 0/2] crypto: hisilicon/qm - misc fixes Weili Qian
2020-09-19 11:01 ` [PATCH 1/2] crypto: hisilicon/qm - fix wrong return type of 'pci_get_drvdata' Weili Qian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).