diff mbox series

crypto: hisilicon/hpre - change return type of hpre_cluster_inqry_write()

Message ID 20220813103421.25673-1-shenyang39@huawei.com
State New
Headers show
Series crypto: hisilicon/hpre - change return type of hpre_cluster_inqry_write() | expand

Commit Message

Yang Shen Aug. 13, 2022, 10:34 a.m. UTC
From: Weili Qian <qianweili@huawei.com>

hpre_cluster_inqry_write() always returns 0. So change the type
of hpre_cluster_inqry_write() to void.

Signed-off-by: Weili Qian <qianweili@huawei.com>
Signed-off-by: Yang Shen <shenyang39@huawei.com>
---
 drivers/crypto/hisilicon/hpre/hpre_main.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

--
2.30.0

Comments

Herbert Xu Aug. 19, 2022, 11:04 a.m. UTC | #1
On Sat, Aug 13, 2022 at 06:34:21PM +0800, Yang Shen wrote:
> From: Weili Qian <qianweili@huawei.com>
> 
> hpre_cluster_inqry_write() always returns 0. So change the type
> of hpre_cluster_inqry_write() to void.
> 
> Signed-off-by: Weili Qian <qianweili@huawei.com>
> Signed-off-by: Yang Shen <shenyang39@huawei.com>
> ---
>  drivers/crypto/hisilicon/hpre/hpre_main.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)

Patch applied.  Thanks.
diff mbox series

Patch

diff --git a/drivers/crypto/hisilicon/hpre/hpre_main.c b/drivers/crypto/hisilicon/hpre/hpre_main.c
index 9d529df0eab9..8e0e87cede6b 100644
--- a/drivers/crypto/hisilicon/hpre/hpre_main.c
+++ b/drivers/crypto/hisilicon/hpre/hpre_main.c
@@ -708,7 +708,7 @@  static u32 hpre_cluster_inqry_read(struct hpre_debugfs_file *file)
 	return readl(qm->io_base + offset + HPRE_CLSTR_ADDR_INQRY_RSLT);
 }

-static int hpre_cluster_inqry_write(struct hpre_debugfs_file *file, u32 val)
+static void hpre_cluster_inqry_write(struct hpre_debugfs_file *file, u32 val)
 {
 	struct hisi_qm *qm = hpre_file_to_qm(file);
 	int cluster_index = file->index - HPRE_CLUSTER_CTRL;
@@ -716,8 +716,6 @@  static int hpre_cluster_inqry_write(struct hpre_debugfs_file *file, u32 val)
 			       HPRE_CLSTR_ADDR_INTRVL;

 	writel(val, qm->io_base + offset + HPRE_CLUSTER_INQURY);
-
-	return 0;
 }

 static ssize_t hpre_ctrl_debug_read(struct file *filp, char __user *buf,
@@ -792,9 +790,7 @@  static ssize_t hpre_ctrl_debug_write(struct file *filp, const char __user *buf,
 			goto err_input;
 		break;
 	case HPRE_CLUSTER_CTRL:
-		ret = hpre_cluster_inqry_write(file, val);
-		if (ret)
-			goto err_input;
+		hpre_cluster_inqry_write(file, val);
 		break;
 	default:
 		ret = -EINVAL;