* [PATCH v1] media: ti-vpe: cal: fix ce
@ 2021-02-10 4:08 Tong Zhang
0 siblings, 0 replies; only message in thread
From: Tong Zhang @ 2021-02-10 4:08 UTC (permalink / raw)
To: Benoit Parrot, Mauro Carvalho Chehab, linux-media, linux-kernel; +Cc: ztong0001
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 <ztong0001@gmail.com>
---
drivers/media/platform/ti-vpe/cal.h | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/media/platform/ti-vpe/cal.h b/drivers/media/platform/ti-vpe/cal.h
index 4123405ee0cf..d73a4a3b99cb 100644
--- a/drivers/media/platform/ti-vpe/cal.h
+++ b/drivers/media/platform/ti-vpe/cal.h
@@ -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)
--
2.25.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-02-10 4:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-10 4:08 [PATCH v1] media: ti-vpe: cal: fix ce Tong Zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®