Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1361947
| From | David Miller <davem@davemloft.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH net 06/10] net: hns: fix return value of the function about rss |
| Date | 2016-03-21 16:50 +0100 |
| Message-ID | <rfafD-7J0-1@gated-at.bofh.it> (permalink) |
| References | <rf5zk-4lU-19@gated-at.bofh.it> <rf5J0-4pj-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Yisen Zhuang <Yisen.Zhuang@huawei.com>
Date: Mon, 21 Mar 2016 19:06:37 +0800
> diff --git a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
> index 3c4a3bc..f3a5e05 100644
> --- a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
> +++ b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
...
> @@ -1235,12 +1226,11 @@ hns_set_rss(struct net_device *netdev, const u32 *indir, const u8 *key,
> {
> struct hns_nic_priv *priv = netdev_priv(netdev);
> struct hnae_ae_ops *ops;
> - int ret;
>
> if (AE_IS_VER1(priv->enet_ver)) {
> netdev_err(netdev,
> "RSS feature is not supported on this hardware\n");
> - return -EOPNOTSUPP;
> + return (u32)-EOPNOTSUPP;
> }
>
This is incredibly broken, you cannot cast this negative error return value to
an unsigned integer.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH net 06/10] net: hns: fix return value of the function about rss Yisen Zhuang <Yisen.Zhuang@huawei.com> - 2016-03-21 12:00 +0100
Re: [PATCH net 06/10] net: hns: fix return value of the function about rss David Miller <davem@davemloft.net> - 2016-03-21 16:50 +0100
Re: [PATCH net 06/10] net: hns: fix return value of the function about rss Yisen Zhuang <Yisen.zhuang@huawei.com> - 2016-03-22 02:20 +0100
csiph-web