Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1786783rwb; Fri, 23 Sep 2022 19:28:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM52ApZOrFPXgbPtGhOjBKC/WNCpBqK/N8mMQ/S/UIQn1JuRTTYSSsx5fqe3CKxklwAQFxM+ X-Received: by 2002:a17:907:1b1f:b0:72f:56db:cce9 with SMTP id mp31-20020a1709071b1f00b0072f56dbcce9mr9067029ejc.605.1663986485055; Fri, 23 Sep 2022 19:28:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663986485; cv=none; d=google.com; s=arc-20160816; b=dQCjBqjppK9VJAB8TD3kckhD9nvhT9LUBHpJxzwJYdEQG0RvLuv5YW2OfKPePkiAzI zbisVeASBJHOe8rRXiq/wE232PT/5JTUxKMoh6ZBFkgZvkPQnChkbJnRnUpTCBTMPzji s1BYXNwe0MlhGevw3iZyJcNgN8hSb5FRXXVTKWTEokJcEdSUyFis4YmuuUJ1v8JKcXV4 SrCBrDtBeWucI+Avn6JvWfa6LF7PQJq5zAwbFwFQIDywXsIqUSy8dYDkZ8s+XYvSZOSS SNWaW9roj4FKe75aDmoYsnDCMQxvvMg2ofWkP6vO3hQ0y7hc/D1cGIDzeV3N6YRj4MJ5 5ozQ== 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=cghFEKyQeREOvUozLZf9/aANJZaYbPkhApoEXLSAPjE=; b=oalkIKgNkw9fWCafYsbh3gi5Sj4SNU0y/6DQVHgLanhpPOxmchAL2SdYymWz+P451/ NkxEyO8QJf7dMXMRCW7a+RLLkeBjq0NqXuVuTgG3/qBoyb/iZCAW0F73a5S5hiuCmg/1 cRKr8cV4EaLU2+otVAA3WSA6UT1zsgzmrVxPWYnksqH7p+eWmmBCAnwb1JOHZap82J9Q CfFX6khVxpC+JoazC0BJMU9l26BQxwfFm7DoyoEDyvgwOKnZJNnZii+bHqGuj/e6bKI2 vN6fh5ifUcQ75R4MriIbdaQOme6dt+zVgM5EP56hZheseitH+QpUpxnfY7yItduGEOpb e4LA== 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 tz14-20020a170907c78e00b0078054af5eeasi7003623ejc.374.2022.09.23.19.27.39; Fri, 23 Sep 2022 19:28:05 -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 S232997AbiIXCZS (ORCPT + 99 others); Fri, 23 Sep 2022 22:25:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232985AbiIXCZM (ORCPT ); Fri, 23 Sep 2022 22:25:12 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E992C97B35 for ; Fri, 23 Sep 2022 19:25:10 -0700 (PDT) Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.57]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4MZCRv0vFfz1P6jx; Sat, 24 Sep 2022 10:20:59 +0800 (CST) Received: from kwepemm600005.china.huawei.com (7.193.23.191) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sat, 24 Sep 2022 10:25:09 +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; Sat, 24 Sep 2022 10:25:08 +0800 From: Longfang Liu To: , , CC: , , , Subject: [PATCH v3 3/5] hisi_acc_vfio_pci: Remove useless function parameter Date: Sat, 24 Sep 2022 10:20:47 +0800 Message-ID: <20220924022049.12022-4-liulongfang@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220924022049.12022-1-liulongfang@huawei.com> References: <20220924022049.12022-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: dggems706-chm.china.huawei.com (10.3.19.183) 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. Reviewed-by: Jason Gunthorpe 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