media: vidtv: fix build on 32bit architectures
Subsystems (2)
Daniel W. S. Almeida
maintainerPATCH v2 1/1 media: vidtv: fix build on 32bit architectures
From: Daniel W. S. Almeida <[email protected]>
Fix the following error for builds on 32bit architectures:
ERROR: modpost: "__udivdi3" [drivers/media/test-drivers/vidtv/dvb-vidtv-bridge.ko] undefined!
Which is due to 64bit divisions that did not go through the helpers in linux/math64.h
As vidtv_mux_check_mux_rate was not operational in its current form, drop the entire function while it is not fixed properly.
For now, call vidtv_mux_pad_with_nulls with a constant number of packets to avoid warnings due to unused functions when building this driver.
The 64bit division used in the s302m is not needed, remove them and use a fixed number of frames and a constant PTS increment instead.
---
Changes in v2:
Rework the s302m encoder so that a fixed number of frames and a constant increment value for pts is used. This removes the 64bit division that was making the build fail.
---
.../media/test-drivers/vidtv/vidtv_encoder.h | 2 +- drivers/media/test-drivers/vidtv/vidtv_mux.c | 42 +------------- .../media/test-drivers/vidtv/vidtv_s302m.c | 56 ++++++------------- .../media/test-drivers/vidtv/vidtv_s302m.h | 2 + 4 files changed, 23 insertions(+), 79 deletions(-)
drivers/media/test-drivers/vidtv/vidtv_encoder.h +1 -1
@@ -148,7 +148,7 @@ struct vidtv_encoder {__be16 es_pid; -void *(*encode)(struct vidtv_encoder *e,u64 elapsed_time_usecs); +void *(*encode)(struct vidtv_encoder *e);u32 (*clear)(struct vidtv_encoder *e);
drivers/media/test-drivers/vidtv/vidtv_mux.c +2 -40
64 lines not on this page · raw message
drivers/media/test-drivers/vidtv/vidtv_s302m.c +18 -38
109 lines not on this page · raw message
drivers/media/test-drivers/vidtv/vidtv_s302m.h +2 -0
@@ -33,10 +33,12 @@* struct vidtv_s302m_ctx - s302m encoder context. * @enc: A pointer to the containing encoder structure. * @frame_index: The current frame in a block +* @au_count: The total number of access units encoded up to now */ struct vidtv_s302m_ctx {struct vidtv_encoder *enc;u32 frame_index; +u32 au_count; };/**
Signature · 6 lines
2.28.0 _______________________________________________ Linux-kernel-mentees mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees