mirror of
https://github.com/tbsdtv/media_build.git
synced 2025-07-23 04:13:02 +02:00
Add v5.17_overflow.patch
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
@@ -31,6 +31,7 @@ add rc-cec.patch
|
||||
[5.17.1023]
|
||||
add v5.17_spi.patch
|
||||
add v5.17_iosys.patch
|
||||
add v5.17_overflow.patch
|
||||
|
||||
[5.15.1023]
|
||||
add v5.15_container_of.patch
|
||||
|
34
backports/v5.17_overflow.patch
Normal file
34
backports/v5.17_overflow.patch
Normal file
@@ -0,0 +1,34 @@
|
||||
diff --git a/include/linux/overflow.h b/include/linux/overflow.h
|
||||
index f1221d11f8e5..59d7228104d0 100644
|
||||
--- a/include/linux/overflow.h
|
||||
+++ b/include/linux/overflow.h
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/limits.h>
|
||||
-#include <linux/const.h>
|
||||
|
||||
/*
|
||||
* We need to compute the minimum and maximum values representable in a given
|
||||
@@ -222,9 +221,8 @@ static inline size_t __must_check size_sub(size_t minuend, size_t subtrahend)
|
||||
* Return: number of bytes needed or SIZE_MAX on overflow.
|
||||
*/
|
||||
#define flex_array_size(p, member, count) \
|
||||
- __builtin_choose_expr(__is_constexpr(count), \
|
||||
- (count) * sizeof(*(p)->member) + __must_be_array((p)->member), \
|
||||
- size_mul(count, sizeof(*(p)->member) + __must_be_array((p)->member)))
|
||||
+ size_mul(count, \
|
||||
+ sizeof(*(p)->member) + __must_be_array((p)->member))
|
||||
|
||||
/**
|
||||
* struct_size() - Calculate size of structure with trailing flexible array.
|
||||
@@ -239,8 +237,6 @@ static inline size_t __must_check size_sub(size_t minuend, size_t subtrahend)
|
||||
* Return: number of bytes needed or SIZE_MAX on overflow.
|
||||
*/
|
||||
#define struct_size(p, member, count) \
|
||||
- __builtin_choose_expr(__is_constexpr(count), \
|
||||
- sizeof(*(p)) + flex_array_size(p, member, count), \
|
||||
- size_add(sizeof(*(p)), flex_array_size(p, member, count)))
|
||||
+ size_add(sizeof(*(p)), flex_array_size(p, member, count))
|
||||
|
||||
#endif /* __LINUX_OVERFLOW_H */
|
Reference in New Issue
Block a user