Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp537911rwb; Sat, 13 Aug 2022 03:36:43 -0700 (PDT) X-Google-Smtp-Source: AA6agR7OVUQzyTzxkV4vmxn+YbsHAp2TKbEOK9tZ0PdWfd04rg/dvaCOF6SoCdV/7Vv+0GfJDWbs X-Received: by 2002:a63:8243:0:b0:422:b70e:7542 with SMTP id w64-20020a638243000000b00422b70e7542mr4031068pgd.10.1660387003476; Sat, 13 Aug 2022 03:36:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660387003; cv=none; d=google.com; s=arc-20160816; b=fqt0qq2WpMMA7lxbvmNRETlcpc1GznUYwcaV4y+Hwr9l+yGb7BqMCVgBmmhuqDAPJl 5w8hDRgkCXiEvGEM5Rwnluz1sdcpUS+5XEoTpm62yD0EIZfsuIE2Yo76jvxEojr9S7dM lf4VI1SzoJwsUZnj/gUH/fOLAofgyZn7L1DVKUYDgsi3n7Nas6eAZ6YJj42KxNbG74jN bbPcwGQfBPgL0tZ25/c2XUy7nxdlWt0gQZ41FD3GG+mtCqKf6bHNv8ba3b6rKAhTgGEI Y+hQ9kGjPw2sUJvMJIxnwisSTE1ohFgin47jl5uVDdio1L5OL/ZH8DO0GlXfsq9Lm6CW uplg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=+aHVNrarxKsnellJ0SdpVuqWPzcZFLNB4ozvAnOkvso=; b=WqByfmo+diwHpLePxFk2/7OVEjXJzglMiZFTap0PAfZAnZ0bhQwHMbF4aWi/6pnV9Y +SPZhQucC6Jdnmxi1yHERUSP8TQoEeMcFAAnJhGI2IAQIb8gTWHKL6/o0jkWDw0dMUv0 VXelbdJ4GyJRIGKq8fFMQZ20jwD5iEqpwN3crH1y5+p5sSFlmQJs8u1Eq4i/cIe0PzoC w0VL+jEG0qp/OLAsyLUFjdi1oJY7WSh80fodhYkieLSMtOJa6uqbDPSjOOPgXF/YKJS5 9aMpulyfO0RBg6OqPPz82p86hUtnVXBS9vkQb59y7e2IEdsCnmNb+W3yvv6veUoT06DH veBg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w21-20020a634915000000b00415ef8c15f1si4668877pga.486.2022.08.13.03.36.22; Sat, 13 Aug 2022 03:36:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239229AbiHMKgU (ORCPT + 99 others); Sat, 13 Aug 2022 06:36:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229507AbiHMKgT (ORCPT ); Sat, 13 Aug 2022 06:36:19 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39F042317D; Sat, 13 Aug 2022 03:36:18 -0700 (PDT) Received: from dggpemm500024.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4M4cMK5q7qzlVjr; Sat, 13 Aug 2022 18:33:17 +0800 (CST) Received: from dggpemm500005.china.huawei.com (7.185.36.74) by dggpemm500024.china.huawei.com (7.185.36.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sat, 13 Aug 2022 18:36:15 +0800 Received: from localhost.localdomain (10.67.164.66) by dggpemm500005.china.huawei.com (7.185.36.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sat, 13 Aug 2022 18:36:15 +0800 From: Yang Shen To: , CC: , , , Subject: [PATCH] crypto: hisilicon/hpre - change return type of hpre_cluster_inqry_write() Date: Sat, 13 Aug 2022 18:34:21 +0800 Message-ID: <20220813103421.25673-1-shenyang39@huawei.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.67.164.66] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm500005.china.huawei.com (7.185.36.74) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Weili Qian hpre_cluster_inqry_write() always returns 0. So change the type of hpre_cluster_inqry_write() to void. Signed-off-by: Weili Qian Signed-off-by: Yang Shen --- drivers/crypto/hisilicon/hpre/hpre_main.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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; -- 2.30.0