All of lore.kernel.org
 help / color / mirror / Atom feed
From: Salil Mehta <salil.mehta@huawei.com>
To: <davem@davemloft.net>
Cc: <salil.mehta@huawei.com>, <yisen.zhuang@huawei.com>,
	<lipeng321@huawei.com>, <mehta.salil@opnsrc.net>,
	<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linuxarm@huawei.com>, Fengguang Wu <fengguang.wu@intel.com>
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	[thread overview]
Message-ID: <20180519155323.68960-2-salil.mehta@huawei.com> (raw)
In-Reply-To: <20180519155323.68960-1-salil.mehta@huawei.com>

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 <fengguang.wu@intel.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
---
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

  reply	other threads:[~2018-05-19 15:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-19 15:53 [PATCH net-next 0/9] Misc. bug fixes and cleanup for HNS3 driver Salil Mehta
2018-05-19 15:53 ` Salil Mehta [this message]
2018-05-19 15:53 ` [PATCH net-next 2/9] net: hns3: Fixes API to fetch ethernet header length with kernel default Salil Mehta
2018-05-19 15:53 ` [PATCH net-next 3/9] net: hns3: cleanup of return values in hclge_init_client_instance() Salil Mehta
2018-05-19 15:53 ` [PATCH net-next 4/9] net: hns3: Fix the missing client list node initialization Salil Mehta
2018-05-19 15:53 ` [PATCH net-next 5/9] net: hns3: Fix for hns3 module is loaded multiple times problem Salil Mehta
2018-05-19 15:53 ` [PATCH net-next 6/9] net: hns3: Use enums instead of magic number in hclge_is_special_opcode Salil Mehta
2018-05-19 15:53 ` [PATCH net-next 7/9] net: hns3: Fix for netdev not running problem after calling net_stop and net_open Salil Mehta
2018-05-19 15:53 ` [PATCH net-next 8/9] net: hns3: Fixes kernel panic issue during rmmod hns3 driver Salil Mehta
2018-05-19 15:53 ` [PATCH net-next 9/9] net: hns3: Fix for CMDQ and Misc. interrupt init order problem Salil Mehta
2018-05-20 22:56 ` [PATCH net-next 0/9] Misc. bug fixes and cleanup for HNS3 driver David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180519155323.68960-2-salil.mehta@huawei.com \
    --to=salil.mehta@huawei.com \
    --cc=davem@davemloft.net \
    --cc=fengguang.wu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=lipeng321@huawei.com \
    --cc=mehta.salil@opnsrc.net \
    --cc=netdev@vger.kernel.org \
    --cc=yisen.zhuang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.