diff options
author | Weihang Li <liweihang@hisilicon.com> | 2019-06-13 17:12:32 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-14 19:26:16 -0700 |
commit | ebaf1908772e0502081cbe4f64e59276770ba02b (patch) | |
tree | 1d7f6e63931a4f787a3aba9ba3bef46c1632029d /drivers/net/ethernet/hisilicon/hns3/hnae3.c | |
parent | 3a30964a2eef6aabd3ab18b979ea0eacf1147731 (diff) | |
download | linux-ebaf1908772e0502081cbe4f64e59276770ba02b.tar.gz linux-ebaf1908772e0502081cbe4f64e59276770ba02b.tar.bz2 linux-ebaf1908772e0502081cbe4f64e59276770ba02b.zip |
net: hns3: some variable modification
This patch does following things:
1. add the keyword const before some variables which won't be modified
in functions.
2. changes some variables from signed to unsigned to avoid bitwise
operation on signed variables.
3. adds or removes initialization of some variables.
4. defines a new structure to help parsing mailbox messages instead of
using an array which is harder to get the meaning of each element.
Signed-off-by: Weihang Li <liweihang@hisilicon.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Yufeng Mo <moyufeng@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hnae3.c')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hnae3.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.c b/drivers/net/ethernet/hisilicon/hns3/hnae3.c index 0de3d6b1462e..908d4f45c06a 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hnae3.c +++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.c @@ -26,7 +26,8 @@ static bool hnae3_client_match(enum hnae3_client_type client_type) } void hnae3_set_client_init_flag(struct hnae3_client *client, - struct hnae3_ae_dev *ae_dev, int inited) + struct hnae3_ae_dev *ae_dev, + unsigned int inited) { if (!client || !ae_dev) return; |