Here optimizes some codes and removes some warnings by sparse tool checking as well as fixes some defects. Changelog: v1->v2: Remove a redundant judgment in patch(1/2) as Leon Romanovsky suggested. Fix patch(2/2) as comments from Doug Ledford. Also some modifications on title and commit message. Lijun Ou (1): RDMA/hns: Package operations of rq inline buffer into separate functions Yixian Liu (1): RDMA/hns: Optimize cmd init and mode selection for hip08 drivers/infiniband/hw/hns/hns_roce_cmd.c | 10 +--- drivers/infiniband/hw/hns/hns_roce_main.c | 8 +-- drivers/infiniband/hw/hns/hns_roce_qp.c | 95 ++++++++++++++++++------------- 3 files changed, 61 insertions(+), 52 deletions(-) -- 2.8.1