From patchwork Sat May 19 15:53:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 136394 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp2545643lji; Sat, 19 May 2018 08:54:37 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpO/01dpOUOKN5dNGD5bFZJMQ2a6QYRECTKTq+8HvvHRVolaUMx0/2raJapeWEDpS7LNy8w X-Received: by 2002:a17:902:683:: with SMTP id 3-v6mr14059120plh.291.1526745277439; Sat, 19 May 2018 08:54:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526745277; cv=none; d=google.com; s=arc-20160816; b=j/Zpu0J1IOIF/jZCrB/Co0qE0IEnBdEk0eINkcy6hpSbpQSLvm+tYRyHiQ0yOwOdaq 8Q23RsJw1D6M+QuGtukQpZf+9qXOEikMaeuSf0Nx7QujMZimEe1nheOgPKpoR94yhvdJ QU1wCBDkvFd6wt18hD1vFVDxd7yjop2IZHi0crbQfTExMaJP9CpaYa6vXNNpDeff2BBG cjkmoP8xx5aF8ObhDdw8sW5YNFLofvKU53enKBh3+t2cl5X3EdiFt/khXKf0qZ71pid2 3AyTtMdQ2yCZRjRqkOPIB8o2P9O5oHkkY0XQj1+pFkA7Y4mqhyX41Ci5k4IPZASdGiGv 8bjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=Bf8lxCJGX9OXdb0TLD2v4lZAa0ElcQWiV7T8HgQlLUE=; b=raOqlUS6qqRlxOqjcku7pXEc9PjutgxuqR3/c633dcHjn072ifiajx3Nre1GM/mzV+ l9wDSKnLUPXzDskYMfP4EDwQgEHD9d6nlC708UtNBthCd9FPpEdfq3NxNZk5OKw38Hin v21/20eDkFJC1dwtMy1vXkZRSOHauKupngGBm68np9lGjEbOMIY3WIfaatY1w9wX6D51 PnkweZDnGjf4DBCgPsc5+fv4PPqb/5rXIXHpnbLQogYNBxEdosARP2t1d9qtp9a27ftY Y/vETgKpHJ9NUXFk+xZ/UrSLRhgZl524WTk2B3zIPTapCmheak4ZD1uWSa5x8b98PtEy JkHA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c11-v6si9332082pll.102.2018.05.19.08.54.37; Sat, 19 May 2018 08:54:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752530AbeESPyb (ORCPT + 29 others); Sat, 19 May 2018 11:54:31 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:59934 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752344AbeESPy1 (ORCPT ); Sat, 19 May 2018 11:54:27 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 4DDB3F9D57A1C; Sat, 19 May 2018 23:54:24 +0800 (CST) Received: from S00293818-DELL1.china.huawei.com (10.202.227.234) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.382.0; Sat, 19 May 2018 23:54:18 +0800 From: Salil Mehta To: CC: , , , , , , , Fengguang Wu Subject: [PATCH net-next 1/9] net: hns3: Fixes error reported by Kbuild and internal review Date: Sat, 19 May 2018 16:53:15 +0100 Message-ID: <20180519155323.68960-2-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20180519155323.68960-1-salil.mehta@huawei.com> References: <20180519155323.68960-1-salil.mehta@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.202.227.234] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch fixes the error reported by Intel's kbuild and fixes a return value in one of the legs, caught during review of the original patch sent by kbuild. Fixes: fdb793670a00 ("net: hns3: Add support of .sriov_configure in HNS3 driver") Signed-off-by: Fengguang Wu Signed-off-by: Salil Mehta --- Patch V1: 1. Fixes the errors reported by kbuild - using its fix Link: https://lkml.org/lkml/2018/5/16/894 2. Places a necessary missed return value of num_vfs figured out while reviewing kbuild patch. --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index e85ff38..e75c652 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -1579,7 +1579,7 @@ static void hns3_remove(struct pci_dev *pdev) * Enable or change the number of VFs. Called when the user updates the number * of VFs in sysfs. **/ -int hns3_pci_sriov_configure(struct pci_dev *pdev, int num_vfs) +static int hns3_pci_sriov_configure(struct pci_dev *pdev, int num_vfs) { int ret; @@ -1592,6 +1592,8 @@ int hns3_pci_sriov_configure(struct pci_dev *pdev, int num_vfs) ret = pci_enable_sriov(pdev, num_vfs); if (ret) dev_err(&pdev->dev, "SRIOV enable failed %d\n", ret); + else + return num_vfs; } else if (!pci_vfs_assigned(pdev)) { pci_disable_sriov(pdev); } else {