net: hns3: make some reusable codes into a function
authorYonglong Liu <liuyonglong@huawei.com>
Wed, 28 Aug 2019 14:23:10 +0000 (22:23 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 29 Aug 2019 23:57:43 +0000 (16:57 -0700)
commit199d2dd416df3a224c2e20da5499a9200a716829
treef8d8817ede03969c63021cae92d8bcb8c88e9aad
parented5b255ba679a2a6cf63a6891d9e802a9c77e5e1
net: hns3: make some reusable codes into a function

In hclge_dcb.c, these pair of codes:
hclge_notify_client(hdev, HNAE3_DOWN_CLIENT);
hclge_notify_client(hdev, HNAE3_UNINIT_CLIENT);
and
hclge_notify_client(hdev, HNAE3_INIT_CLIENT);
hclge_notify_client(hdev, HNAE3_UP_CLIENT);
are called many times, so make them into a function.

Signed-off-by: Yonglong Liu <liuyonglong@huawei.com>
Reviewed-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c