Commit 26b901bc authored by Weibo Zhao's avatar Weibo Zhao Committed by JiangShui
Browse files

hns3 udma: add mask for udma_reg_write

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I85R2F


CVE: NA

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

This patch add mask of value for udma_reg_write. The gcc of
an eariler version can be compiled smoothly.

Fixes: c256e44d ("hns3 udma:support loading and unloading of udma driver.")
Signed-off-by: default avatarWeibo Zhao <zhaoweibo3@huawei.com>
parent 0d6aeaf5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -66,7 +66,8 @@
		_udma_reg_clear((ptr), field);          \
		*((uint32_t *)(ptr) + ((field) >> 32) / 32) |=                       \
			cpu_to_le32(FIELD_PREP(GENMASK(((field) >> 32) % 32,         \
				(((field) << 32) >> 32) % 32), _val));                       \
				(((field) << 32) >> 32) % 32), _val &                \
				GENMASK((((field) >> 32) - (((field) << 32) >> 32)), 0))); \
	})

#define udma_reg_write(ptr, field, val) _udma_reg_write(ptr, field, val)