Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp483625rwb; Thu, 22 Sep 2022 02:19:41 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4VeJ+oxns/+T/BECJk+gdFdTJyZcOHyypEN9RHEVOOSTJR0y8Jld2ruaFL4UmvBzTiIfJD X-Received: by 2002:a05:6a00:114c:b0:528:2c7a:630e with SMTP id b12-20020a056a00114c00b005282c7a630emr2627732pfm.86.1663838381120; Thu, 22 Sep 2022 02:19:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663838381; cv=none; d=google.com; s=arc-20160816; b=i8xEfBDGz/zWEWLi5PSXz1WcrQHJ7dabyc5Tm2eyBIHUn3E9/A0NatgxsCzVajBm53 SXDOdeDWIN4Wb8pnlhEcJvZJLs6PJGofMhE9FPqaRP9M0ENaCzvLUOnPWAN6NWCMhhwd uezlx7Zvro+UdoXbtMecm6He36IAsuWBAr8Q51c16G4zUfsJ7b/tFPx+BBne7vKjiI3M gDXsc3P/OGfsNoU3owhfLLZaiE5ZbMbvm+hm5MKY8c/2hdtCFmbeZF8X8H5oB8v7x4R4 8H5eg/eNV9mh/Goj01a8MRHrijf+ilBT4OdzRWxCOrju0w71+PzufZD2NwE22WqYY4tD ayfQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=rcnorGAEesTqprK+MXNq+PI+Ggm0tEGsSVlu+jSf2Jg=; b=Np9pnaJ43fKRU/+NONyHvEJaTIxOA1lXzaQp3stEmmA0CskJZ7MOrMZcN78Qi8C4u5 waKkLJz83vEZWoOJ3iydQCvoH9epueJiRuFfVIEE1L0hkPmI3RQN0bsquMHWafzLoNcw lukfA0JMx4W/z/aJsUK/tuovtca6rgpNyMgNm2rgxknfWzgpG2Uy5nzxSWU5YdCw02co g5h1sj7qjbkUscTDGB5pvNLg9ZioyMPUgiJFaaz/UI0N4oLyb7krhl1fbetfwXnztUzv iinm10ey9tXWuh+M0ZB4w6ItmvraX0lMmezk3JrurUquz/66YT//FKDHjXd871/g0/0l fsyQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 p10-20020a170902e74a00b0016bf245fbe1si6759434plf.296.2022.09.22.02.19.28; Thu, 22 Sep 2022 02:19:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S230165AbiIVInw (ORCPT + 99 others); Thu, 22 Sep 2022 04:43:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229523AbiIVInu (ORCPT ); Thu, 22 Sep 2022 04:43:50 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 054A8D33E0 for ; Thu, 22 Sep 2022 01:43:49 -0700 (PDT) Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MY7xl0HLXzlXPT; Thu, 22 Sep 2022 16:39:39 +0800 (CST) Received: from kwepemm600005.china.huawei.com (7.193.23.191) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 22 Sep 2022 16:43:47 +0800 Received: from huawei.com (10.69.192.56) by kwepemm600005.china.huawei.com (7.193.23.191) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 22 Sep 2022 16:43:46 +0800 From: Longfang Liu To: , , CC: , , , Subject: [PATCH v2 3/5] hisi_acc_vfio_pci: Remove useless function parameter Date: Thu, 22 Sep 2022 16:39:26 +0800 Message-ID: <20220922083928.58797-4-liulongfang@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220922083928.58797-1-liulongfang@huawei.com> References: <20220922083928.58797-1-liulongfang@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemm600005.china.huawei.com (7.193.23.191) 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 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-kernel@vger.kernel.org Remove unused function parameters for vf_qm_fun_reset() and ensure the device is enabled before the reset operation is performed. Signed-off-by: Longfang Liu --- drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c index 0638a8a6b0c1..24c03ff41502 100644 --- a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c +++ b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c @@ -345,8 +345,7 @@ static struct hisi_acc_vf_core_device *hssi_acc_drvdata(struct pci_dev *pdev) core_device); } -static void vf_qm_fun_reset(struct hisi_acc_vf_core_device *hisi_acc_vdev, - struct hisi_qm *qm) +static void vf_qm_fun_reset(struct hisi_qm *qm) { int i; @@ -662,7 +661,10 @@ static void hisi_acc_vf_start_device(struct hisi_acc_vf_core_device *hisi_acc_vd if (hisi_acc_vdev->vf_qm_state != QM_READY) return; - vf_qm_fun_reset(hisi_acc_vdev, vf_qm); + /* Make sure the device is enabled */ + qm_dev_cmd_init(vf_qm); + + vf_qm_fun_reset(vf_qm); } static int hisi_acc_vf_load_state(struct hisi_acc_vf_core_device *hisi_acc_vdev) -- 2.33.0