Commit 6def7de6 authored by Lang Cheng's avatar Lang Cheng Committed by Doug Ledford
Browse files

RDMA/hns: Update some comments style



Here removes some useless comments and adds necessary spaces to
another comments.

Signed-off-by: default avatarLang Cheng <chenglang@huawei.com>
Link: https://lore.kernel.org/r/1565276034-97329-7-git-send-email-oulijun@huawei.com


Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent b5c229dc
Loading
Loading
Loading
Loading
+32 −33
Original line number Diff line number Diff line
@@ -84,7 +84,6 @@
#define HNS_ROCE_CEQ_ENTRY_SIZE			0x4
#define HNS_ROCE_AEQ_ENTRY_SIZE			0x10

/* 4G/4K = 1M */
#define HNS_ROCE_SL_SHIFT			28
#define HNS_ROCE_TCLASS_SHIFT			20
#define HNS_ROCE_FLOW_LABEL_MASK		0xfffff
@@ -796,22 +795,22 @@ struct hns_roce_caps {
	int		local_ca_ack_delay;
	int		num_uars;
	u32		phy_num_uars;
	u32		max_sq_sg;	/* 2 */
	u32		max_sq_inline;	/* 32 */
	u32		max_rq_sg;	/* 2 */
	u32		max_sq_sg;
	u32		max_sq_inline;
	u32		max_rq_sg;
	u32		max_extend_sg;
	int		num_qps;	/* 256k */
	int		num_qps;
	int             reserved_qps;
	int		num_qpc_timer;
	int		num_cqc_timer;
	u32		max_srq_sg;
	int		num_srqs;
	u32		max_wqes;	/* 16k */
	u32		max_wqes;
	u32		max_srqs;
	u32		max_srq_wrs;
	u32		max_srq_sges;
	u32		max_sq_desc_sz;	/* 64 */
	u32		max_rq_desc_sz;	/* 64 */
	u32		max_sq_desc_sz;
	u32		max_rq_desc_sz;
	u32		max_srq_desc_sz;
	int		max_qp_init_rdma;
	int		max_qp_dest_rdma;
@@ -822,7 +821,7 @@ struct hns_roce_caps {
	int		reserved_cqs;
	int		reserved_srqs;
	u32		max_srqwqes;
	int		num_aeq_vectors;	/* 1 */
	int		num_aeq_vectors;
	int		num_comp_vectors;
	int		num_other_vectors;
	int		num_mtpts;
+3 −6
Original line number Diff line number Diff line
@@ -5236,14 +5236,12 @@ static void hns_roce_mhop_free_eq(struct hns_roce_dev *hr_dev,
	buf_chk_sz = 1 << (hr_dev->caps.eqe_buf_pg_sz + PAGE_SHIFT);
	bt_chk_sz = 1 << (hr_dev->caps.eqe_ba_pg_sz + PAGE_SHIFT);

	/* hop_num = 0 */
	if (mhop_num == HNS_ROCE_HOP_NUM_0) {
		dma_free_coherent(dev, (unsigned int)(eq->entries *
				  eq->eqe_size), eq->bt_l0, eq->l0_dma);
		return;
	}

	/* hop_num = 1 or hop = 2 */
	dma_free_coherent(dev, bt_chk_sz, eq->bt_l0, eq->l0_dma);
	if (mhop_num == 1) {
		for (i = 0; i < eq->l0_last_num; i++) {
@@ -5483,7 +5481,6 @@ static int hns_roce_mhop_alloc_eq(struct hns_roce_dev *hr_dev,
			      buf_chk_sz);
	bt_num = DIV_ROUND_UP(ba_num, bt_chk_sz / BA_BYTE_LEN);

	/* hop_num = 0 */
	if (mhop_num == HNS_ROCE_HOP_NUM_0) {
		if (eq->entries > buf_chk_sz / eq->eqe_size) {
			dev_err(dev, "eq entries %d is larger than buf_pg_sz!",
+0 −1
Original line number Diff line number Diff line
@@ -517,7 +517,6 @@ static int hns_roce_mhop_alloc(struct hns_roce_dev *hr_dev, int npages,
	if (mhop_num == HNS_ROCE_HOP_NUM_0)
		return 0;

	/* hop_num = 1 */
	if (mhop_num == 1)
		return pbl_1hop_alloc(hr_dev, npages, mr, pbl_bt_sz);

+3 −3

File changed.

Contains only whitespace changes.