mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-13 14:24:11 +08:00
RDMA/hns: Use complete parentheses in macros
[ Upstream commit4125269bb9
] Use complete parentheses to ensure that macro expansion does not produce unexpected results. Fixes:a25d13cbe8
("RDMA/hns: Add the interfaces to support multi hop addressing for the contexts in hip08") Signed-off-by: Chengchang Tang <tangchengchang@huawei.com> Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com> Link: https://lore.kernel.org/r/20240412091616.370789-10-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
f5734138fb
commit
2679ddbf08
@ -62,16 +62,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))
|
||||
|
||||
enum {
|
||||
HNS_ROCE_HEM_PAGE_SHIFT = 12,
|
||||
|
Loading…
Reference in New Issue
Block a user