OSDN Git Service

RDMA/hns: Remove redundant type cast for general pointers
authorWeihang Li <liweihang@huawei.com>
Fri, 22 May 2020 13:02:56 +0000 (21:02 +0800)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 25 May 2020 17:20:45 +0000 (14:20 -0300)
commit14ba87304bf98a0a0c069708bb14e92a616420d1
tree572a36c949eb64143e132799248370abe2ca9a87
parent8e029d386bcef651bb89091c8a48375c2506aefe
RDMA/hns: Remove redundant type cast for general pointers

There is no need to do a type cast on genernal pointers, they could be
assigned to any type of variables. In addition, optimize initialization of
some variables and adjust order of them.

Link: https://lore.kernel.org/r/1590152579-32364-2-git-send-email-liweihang@huawei.com
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hns/hns_roce_hw_v1.c
drivers/infiniband/hw/hns/hns_roce_hw_v2.c
drivers/infiniband/hw/hns/hns_roce_hw_v2.h