Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp5753238imm; Sat, 19 May 2018 08:54:56 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrWFnaIcpSEkDazpgEh1P2Ep4uWjgxw/m91g2mD6ncyw9MuaBwrkMOeAs1dw+nznJcivgCS X-Received: by 2002:a63:9c01:: with SMTP id f1-v6mr11078181pge.223.1526745296107; Sat, 19 May 2018 08:54:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526745296; cv=none; d=google.com; s=arc-20160816; b=cVAZdpxFS+eKHk/EG9d0GzWv5zNwDf66BK4v7zS0YZvhP4e5dpIe82BtGvwhyMqaH1 GQnSeAQPK3I+o6/jLU6e8h0xZtHBN3qNso3kTPINUVHEuv8cqQUYmKn2+UeM0in+bfGM d1R0DFdvI/cqnv9lB1cySn7xT4MQS0dYcNmPLWi3L3NLs74CsDCkzGhducEX0Hgfly6r q8Fy/EpJ+D4D8waVN8vtCZjnT3AykwvCSdt177jQgPisdq7yeuOVtZ9VYVlYqgNNuQPk fNrN1mw/INnaF4VpHSab08lBAyW8xnHP/NWSTLNLMOwImzQHddK4YMl2z0S0kM/J9eLA kNrw== 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 c7-v6si9656380plr.145.2018.05.19.08.54.41; Sat, 19 May 2018 08:54:56 -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 S1752525AbeESPya (ORCPT + 99 others); Sat, 19 May 2018 11:54:30 -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 Content-Type: text/plain 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(-) 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 { -- 2.7.4