summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/hisilicon/hns3/hnae3.c
diff options
context:
space:
mode:
authorWeihang Li <liweihang@hisilicon.com>2019-06-13 12:12:32 +0300
committerDavid S. Miller <davem@davemloft.net>2019-06-15 05:26:16 +0300
commitebaf1908772e0502081cbe4f64e59276770ba02b (patch)
tree1d7f6e63931a4f787a3aba9ba3bef46c1632029d /drivers/net/ethernet/hisilicon/hns3/hnae3.c
parent3a30964a2eef6aabd3ab18b979ea0eacf1147731 (diff)
downloadlinux-ebaf1908772e0502081cbe4f64e59276770ba02b.tar.xz
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.c3
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;