Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp577709rwb; Mon, 26 Sep 2022 03:10:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7UAfTqvrhH5/sGyoKgDM3o2Q+6P6OY+t5zHi3awMw1LG3gK2rlShzsLDk2J4+7iqwhdKiy X-Received: by 2002:a17:907:9717:b0:783:b2e4:23de with SMTP id jg23-20020a170907971700b00783b2e423demr1492016ejc.364.1664187014540; Mon, 26 Sep 2022 03:10:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664187014; cv=none; d=google.com; s=arc-20160816; b=KcuZ31FYAXcdWSPbM89htbSa7kAq5WdnO+iR2BKExUS9K9zywKX6BauTFf/ySiaX0b lEo3NwzJnvyBwQnG7fYBiDPoQtRBfa3Du06CTa6Z3td8CdTF3mIdlMo04TzHXMRa39i4 1HuW05Bh0RPZKP7JZEeS0TK6lvxKAsraWHDg7jos68sIue3f2utADEDOub3zZ1G03F+B ihYJyZy+gdU5E3hDSoheDlMrErMXWYYpaIp3h9CXMAMpMI8io7xa06SHLmKBDa/ozqfd kZfailAcWOcGlWveqd0+XjKwpySirVW+8DjBf09GaeSN/V/9XE8fioU/xq92+LxjpFh1 0FfQ== 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=LcMSEdI3lacR+4sVcFBDg2srluTShVQEF9w7+m/7U3o=; b=gTgdLBbIsiGx2hLNQ7F9K/f+2919yHKxX3kv7hQiMMgyXYb5zQWvohB5W5x8km8dPY rRi+DnLVaKuY1fIZSjcWPfk+T7vElQ65JoC9wg7DWXdewkPUQWmttYe4hUKga2mNOjnj RTndccaRGpFoKWqBClQ5gX/6boYOs5b4G800LWociDYu3SlsGMSryjnrY9PNxvpk3gqa lLvo1Itd3i3thBt7Gd1u2xluYxWznIpMVNW4aC5EL9VsFqDW/rXLYOei5ohNw6Lou93z UA6vIp6GcjjCb5XlJ1quJxvwkUzMBtJLATgSqKFcy0RAWFnCpbtH9Fz+BfqvW1p2Ip0C Uzng== 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 12-20020a508e4c000000b00454599abf52si14739531edx.92.2022.09.26.03.09.49; Mon, 26 Sep 2022 03:10:14 -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 S234190AbiIZJlK (ORCPT + 99 others); Mon, 26 Sep 2022 05:41:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234407AbiIZJkl (ORCPT ); Mon, 26 Sep 2022 05:40:41 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC55F474E8 for ; Mon, 26 Sep 2022 02:38:02 -0700 (PDT) Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Mbczm18gtzpVcm; Mon, 26 Sep 2022 17:35:00 +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; Mon, 26 Sep 2022 17:37:54 +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; Mon, 26 Sep 2022 17:37:53 +0800 From: Longfang Liu To: , , CC: , , , Subject: [PATCH v3 3/5] hisi_acc_vfio_pci: Remove useless function parameter Date: Mon, 26 Sep 2022 17:33:30 +0800 Message-ID: <20220926093332.28824-4-liulongfang@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220926093332.28824-1-liulongfang@huawei.com> References: <20220926093332.28824-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: dggems702-chm.china.huawei.com (10.3.19.179) 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 fbe72ce173de..c07ed7b0ccf1 100644 --- a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c +++ b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c @@ -337,8 +337,7 @@ static int vf_qm_cache_wb(struct hisi_qm *qm) return 0; } -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