media: ti-vpe: cal: fix ce
PATCH 1/1 media: ti-vpe: cal: fix ce
FIELD_GET require mask field to be constant, however it is wrapped by a function which will cause error
././include/linux/compiler_types.h:320:38: error: call to ‘__compiletime_assert_270’ declared with attribute error: FIELD_GET: mask is not constant
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
redefine cal_read_field as a macro
Signed-off-by Tong Zhang <[email protected]>
--- drivers/media/platform/ti-vpe/cal.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/media/platform/ti-vpe/cal.h +1 -4
@@ -215,10 +215,7 @@ static inline void cal_write(struct cal_dev *cal, u32 offset, u32 val)iowrite32 (val, cal->base + offset); } -static inline u32 cal_read_field (struct cal_dev *cal,u32 offset,u32 mask) -{ -return FIELD_GET (mask,cal_read (cal, offset)); -} +#define cal_read_field (cal, offset, mask) FIELD_GET(mask, cal_read(cal, offset))static inline void cal_write_field (struct cal_dev *cal,u32 offset,u32 value,u32 mask)
Signature · 1 line
2.25.1