From: Peng Li <lipeng321@huawei.com>
To: <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linuxarm@huawei.com>, <salil.mehta@huawei.com>,
<lipeng321@huawei.com>
Subject: [PATCH net-next 1/5] net: hns3: fix for returning wrong value problem in hns3_get_rss_key_size
Date: Sat, 24 Mar 2018 11:32:43 +0800 [thread overview]
Message-ID: <1521862367-111399-2-git-send-email-lipeng321@huawei.com> (raw)
In-Reply-To: <1521862367-111399-1-git-send-email-lipeng321@huawei.com>
From: Fuyun Liang <liangfuyun1@huawei.com>
The return type of hns3_get_rss_key_size is u32. But a negative value is
returned. This patch fixes it by replacing the negative value with zero.
Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
---
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
index 9d07116..ac523c9 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
@@ -638,7 +638,7 @@ static u32 hns3_get_rss_key_size(struct net_device *netdev)
if (!h->ae_algo || !h->ae_algo->ops ||
!h->ae_algo->ops->get_rss_key_size)
- return -EOPNOTSUPP;
+ return 0;
return h->ae_algo->ops->get_rss_key_size(h);
}
--
2.9.3
next prev parent reply other threads:[~2018-03-24 3:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-24 3:32 [PATCH net-next 0/5] fix some bugs for HNS3 Peng Li
2018-03-24 3:32 ` Peng Li [this message]
2018-03-24 3:32 ` [PATCH net-next 2/5] net: hns3: fix for returning wrong value problem in hns3_get_rss_indir_size Peng Li
2018-03-24 3:32 ` [PATCH net-next 3/5] net: hns3: fix for the wrong shift problem in hns3_set_txbd_baseinfo Peng Li
2018-03-24 3:32 ` [PATCH net-next 4/5] net: hns3: fix for not initializing VF rss_hash_key problem Peng Li
2018-03-24 3:32 ` [PATCH net-next 5/5] net: hns3: never send command queue message to IMP when reset Peng Li
2018-03-26 16:13 ` [PATCH net-next 0/5] fix some bugs for HNS3 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=1521862367-111399-2-git-send-email-lipeng321@huawei.com \
--to=lipeng321@huawei.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=salil.mehta@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).