Commit 3e7c94b0 authored by Chengchang Tang's avatar Chengchang Tang Committed by Juan Zhou
Browse files

RDMA/hns: Use complete parentheses in macros

driver inclusion
category: cleanup
bugzilla: https://gitee.com/openeuler/kernel/issues/I6GT7F



--------------------------------------------------------------------------

Use complete parentheses to ensure that macro expansion does
not produce unexpected results.

Signed-off-by: default avatarChengchang Tang <tangchengchang@huawei.com>
parent b670eb84
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -61,16 +61,16 @@ enum {
	 (sizeof(struct scatterlist) + sizeof(void *)))

#define check_whether_bt_num_3(type, hop_num) \
	(type < HEM_TYPE_MTT && hop_num == 2)
	((type) < HEM_TYPE_MTT && (hop_num) == 2)

#define check_whether_bt_num_2(type, hop_num) \
	((type < HEM_TYPE_MTT && hop_num == 1) || \
	(type >= HEM_TYPE_MTT && hop_num == 2))
	(((type) < HEM_TYPE_MTT && (hop_num) == 1) || \
	((type) >= HEM_TYPE_MTT && (hop_num) == 2))

#define check_whether_bt_num_1(type, hop_num) \
	((type < HEM_TYPE_MTT && hop_num == HNS_ROCE_HOP_NUM_0) || \
	(type >= HEM_TYPE_MTT && hop_num == 1) || \
	(type >= HEM_TYPE_MTT && hop_num == HNS_ROCE_HOP_NUM_0))
	(((type) < HEM_TYPE_MTT && (hop_num) == HNS_ROCE_HOP_NUM_0) || \
	((type) >= HEM_TYPE_MTT && (hop_num) == 1) || \
	((type) >= HEM_TYPE_MTT && (hop_num) == HNS_ROCE_HOP_NUM_0))

struct hns_roce_hem_chunk {
	struct list_head	 list;