* [PATCH next 0/5] minmax: Relax type checks in min() and max().
@ 2023-07-25 10:00 David Laight
2023-07-25 10:38 ` 'Andy Shevchenko'
` (5 more replies)
0 siblings, 6 replies; 45+ messages in thread
From: David Laight @ 2023-07-25 10:00 UTC (permalink / raw)
To: linux-kernel, 'Andy Shevchenko', 'Andrew Morton',
Matthew Wilcox (Oracle),
Christoph Hellwig, Jason A. Donenfeld
The min() (etc) functions in minmax.h require that the arguments have
exactly the same types. This was probably added after an 'accident'
where a negative value got converted to a large unsigned value.
However when the type check fails, rather than look at the types and
fix the type of a variable/constant, everyone seems to jump on min_t().
In reality min_t() ought to be rare - when something unusual is being
done, not normality.
If the wrong type is picked (and it is far too easy to pick the type
of the result instead of the larger input) then significant bits can
get discarded.
Pretty much the worst example is in the derfved clamp_val(), consider:
unsigned char x = 200u;
y = clamp_val(x, 10u, 300u);
I also suspect that many of the min_t(u16, ...) are actually wrong.
For example copy_data() in printk_ringbuffer.c contains:
data_size = min_t(u16, buf_size, len);
Here buf_size is 'unsigned int' and len 'u16', pass a 64k buffer
(can you prove that doesn't happen?) and no data is returned.
The only reason that most of the min_t() are 'fine' is that pretty
much all the value in the kernel are between 0 and INT_MAX.
Patch 1 adds min_unsigned(), this uses integer promotions to convert
both arguments to 'unsigned long long'. It can be used to compare a
signed type that is known to contain a non-negative value with an
unsigned type. The compiler typically optimises it all away.
Added first so that it can be referred to in patch 2.
Patch 2 replaces the 'same type' check with a 'same signedness' one.
This makes min(unsigned_int_var, sizeof()) be ok.
The error message is also improved and will contain the expanded
form of both arguments (useful for seeing how constants are defined).
Patch 3 just fixes some whitespace.
Patch 4 allows comparisons of 'unsigned char' and 'unsigned short'
to signed types. The integer promotion rules convert them both
to 'signed int' prior to the comparison so they can never cause
a negative value be converted to a large positive one.
Patch 5 is slightly more contentious (Linus may not like it!)
effectively adds an (int) cast to all constants between 0 and MAX_INT.
This makes min(signed_int_var, sizeof()) be ok.
With all the patches applied pretty much all the min_t() could be
replaced by min(), and most of the rest by min_unsigned().
However they all need careful inspection due to code like:
sz = min_t(unsigned char, sz - 1, LIM - 1) + 1;
which converts 0 to LIM.
David Laight (5):
Add min_unsigned(a, b) and max_unsigned(a, b)
Allow min()/max()/clamp() if the arguments have the same signedness.
Fix indentation of __cmp_once() and __clamp_once()
Allow comparisons of 'int' against 'unsigned char/short'.
Relax check to allow comparison between int and small unsigned
constants.
include/linux/minmax.h | 98 ++++++++++++++++++++++++++----------------
1 file changed, 61 insertions(+), 37 deletions(-)
--
2.17.1
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next 0/5] minmax: Relax type checks in min() and max().
2023-07-25 10:00 [PATCH next 0/5] minmax: Relax type checks in min() and max() David Laight
@ 2023-07-25 10:38 ` 'Andy Shevchenko'
2023-07-25 11:17 ` David Laight
2023-07-25 11:48 ` [PATCH next resend 1/5] minmax: Add min_unsigned(a, b) and max_unsigned(a, b) David Laight
` (4 subsequent siblings)
5 siblings, 1 reply; 45+ messages in thread
From: 'Andy Shevchenko' @ 2023-07-25 10:38 UTC (permalink / raw)
To: David Laight
Cc: linux-kernel, 'Andrew Morton', Matthew Wilcox (Oracle),
Christoph Hellwig, Jason A. Donenfeld
On Tue, Jul 25, 2023 at 10:00:40AM +0000, David Laight wrote:
> The min() (etc) functions in minmax.h require that the arguments have
> exactly the same types. This was probably added after an 'accident'
> where a negative value got converted to a large unsigned value.
>
> However when the type check fails, rather than look at the types and
> fix the type of a variable/constant, everyone seems to jump on min_t().
> In reality min_t() ought to be rare - when something unusual is being
> done, not normality.
> If the wrong type is picked (and it is far too easy to pick the type
> of the result instead of the larger input) then significant bits can
> get discarded.
> Pretty much the worst example is in the derfved clamp_val(), consider:
> unsigned char x = 200u;
> y = clamp_val(x, 10u, 300u);
>
> I also suspect that many of the min_t(u16, ...) are actually wrong.
> For example copy_data() in printk_ringbuffer.c contains:
> data_size = min_t(u16, buf_size, len);
> Here buf_size is 'unsigned int' and len 'u16', pass a 64k buffer
> (can you prove that doesn't happen?) and no data is returned.
>
> The only reason that most of the min_t() are 'fine' is that pretty
> much all the value in the kernel are between 0 and INT_MAX.
>
> Patch 1 adds min_unsigned(), this uses integer promotions to convert
> both arguments to 'unsigned long long'. It can be used to compare a
> signed type that is known to contain a non-negative value with an
> unsigned type. The compiler typically optimises it all away.
> Added first so that it can be referred to in patch 2.
>
> Patch 2 replaces the 'same type' check with a 'same signedness' one.
> This makes min(unsigned_int_var, sizeof()) be ok.
> The error message is also improved and will contain the expanded
> form of both arguments (useful for seeing how constants are defined).
>
> Patch 3 just fixes some whitespace.
>
> Patch 4 allows comparisons of 'unsigned char' and 'unsigned short'
> to signed types. The integer promotion rules convert them both
> to 'signed int' prior to the comparison so they can never cause
> a negative value be converted to a large positive one.
>
> Patch 5 is slightly more contentious (Linus may not like it!)
> effectively adds an (int) cast to all constants between 0 and MAX_INT.
> This makes min(signed_int_var, sizeof()) be ok.
>
> With all the patches applied pretty much all the min_t() could be
> replaced by min(), and most of the rest by min_unsigned().
> However they all need careful inspection due to code like:
> sz = min_t(unsigned char, sz - 1, LIM - 1) + 1;
> which converts 0 to LIM.
I don't know how you made this series, but it has no thread. You need to use
--thread when forming the patch series.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 45+ messages in thread
* RE: [PATCH next 0/5] minmax: Relax type checks in min() and max().
2023-07-25 10:38 ` 'Andy Shevchenko'
@ 2023-07-25 11:17 ` David Laight
0 siblings, 0 replies; 45+ messages in thread
From: David Laight @ 2023-07-25 11:17 UTC (permalink / raw)
To: 'Andy Shevchenko'
Cc: linux-kernel, 'Andrew Morton', Matthew Wilcox (Oracle),
Christoph Hellwig, Jason A. Donenfeld
> I don't know how you made this series, but it has no thread. You need to use
> --thread when forming the patch series.
I have to send the mails through outlook.
It isn't possible to add any kind of thread-id.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH next resend 1/5] minmax: Add min_unsigned(a, b) and max_unsigned(a, b)
2023-07-25 10:00 [PATCH next 0/5] minmax: Relax type checks in min() and max() David Laight
2023-07-25 10:38 ` 'Andy Shevchenko'
@ 2023-07-25 11:48 ` David Laight
2023-07-25 12:38 ` Matthew Wilcox
2023-07-25 11:51 ` [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness David Laight
` (3 subsequent siblings)
5 siblings, 1 reply; 45+ messages in thread
From: David Laight @ 2023-07-25 11:48 UTC (permalink / raw)
To: 'linux-kernel@vger.kernel.org', 'Andy Shevchenko',
'Andrew Morton', 'Matthew Wilcox (Oracle)',
'Christoph Hellwig', 'Jason A. Donenfeld'
These can be used when min()/max() errors a signed v unsigned
compare when the signed value is known to be non-negative.
Unlike min_t(some_unsigned_type, a, b) min_unsigned() will never
mask off high bits if an inappropriate type is selected.
Signed-off-by: David Laight <david.laight@aculab.com>
---
include/linux/minmax.h | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/include/linux/minmax.h b/include/linux/minmax.h
index 396df1121bff..531860e9cc55 100644
--- a/include/linux/minmax.h
+++ b/include/linux/minmax.h
@@ -73,6 +73,23 @@
*/
#define max(x, y) __careful_cmp(x, y, >)
+/**
+ * min_unsigned - return minimum of two non-negative values
+ * Signed types are zero extended to match a larger unsigned type.
+ * @x: first value
+ * @y: second value
+ */
+#define min_unsigned(x, y) \
+ __careful_cmp((x) + 0u + 0ul + 0ull, (y) + 0u + 0ul + 0ull, <)
+
+/**
+ * max_unsigned - return maximum of two non-negative values
+ * @x: first value
+ * @y: second value
+ */
+#define max_unsigned(x, y) \
+ __careful_cmp((x) + 0u + 0ul + 0ull, (y) + 0u + 0ul + 0ull, >)
+
/**
* min3 - return minimum of three values
* @x: first value
--
2.17.1
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
2023-07-25 10:00 [PATCH next 0/5] minmax: Relax type checks in min() and max() David Laight
2023-07-25 10:38 ` 'Andy Shevchenko'
2023-07-25 11:48 ` [PATCH next resend 1/5] minmax: Add min_unsigned(a, b) and max_unsigned(a, b) David Laight
@ 2023-07-25 11:51 ` David Laight
2023-07-25 18:02 ` kernel test robot
2023-07-25 18:33 ` kernel test robot
2023-07-25 11:52 ` [PATCH next resend 3/5] minmax: Fix indentation of __cmp_once() and __clamp_once() David Laight
` (2 subsequent siblings)
5 siblings, 2 replies; 45+ messages in thread
From: David Laight @ 2023-07-25 11:51 UTC (permalink / raw)
To: 'linux-kernel@vger.kernel.org', 'Andy Shevchenko',
'Andrew Morton', 'Matthew Wilcox (Oracle)',
'Christoph Hellwig', 'Jason A. Donenfeld'
The type-check in min()/max() is there to stop unexpected results if a
negative value gets converted to a large unsigned value.
However it also rejects 'unsigned int' v 'unsigned long' compares
which are common and never problematc.
Replace the 'same type' check with a 'same signedness' check.
The new test isn't itself a compile time error, so use static_assert()
to report the error and give a meaningful error message.
Due to the way builtin_choose_expr() works detecting the error in the
'non-constant' side (where static_assert() can be used) also detects
errors when the arguments are constant.
Signed-off-by: David Laight <david.laight@aculab.com>
---
resend as response to 0/5
include/linux/minmax.h | 61 +++++++++++++++++++-----------------------
1 file changed, 28 insertions(+), 33 deletions(-)
diff --git a/include/linux/minmax.h b/include/linux/minmax.h
index 531860e9cc55..10d236ac7da6 100644
--- a/include/linux/minmax.h
+++ b/include/linux/minmax.h
@@ -9,33 +9,31 @@
*
* - avoid multiple evaluations of the arguments (so side-effects like
* "x++" happen only once) when non-constant.
- * - perform strict type-checking (to generate warnings instead of
- * nasty runtime surprises). See the "unnecessary" pointer comparison
- * in __typecheck().
+ * - perform signed v unsigned type-checking (to generate compile
+ * errors instead of nasty runtime surprises).
* - retain result as a constant expressions when called with only
* constant expressions (to avoid tripping VLA warnings in stack
* allocation usage).
*/
-#define __typecheck(x, y) \
- (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
+#define __types_ok(x, y) \
+ (is_signed_type(typeof(x)) == is_signed_type(typeof(y)))
-#define __no_side_effects(x, y) \
- (__is_constexpr(x) && __is_constexpr(y))
+#define __cmp_op_min <
+#define __cmp_op_max >
-#define __safe_cmp(x, y) \
- (__typecheck(x, y) && __no_side_effects(x, y))
+#define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y))
-#define __cmp(x, y, op) ((x) op (y) ? (x) : (y))
-
-#define __cmp_once(x, y, unique_x, unique_y, op) ({ \
+#define __cmp_once(op, x, y, unique_x, unique_y) ({ \
typeof(x) unique_x = (x); \
typeof(y) unique_y = (y); \
- __cmp(unique_x, unique_y, op); })
+ static_assert(__types_ok(x, y), \
+ #op "(" #x ", " #y ") signedness error, fix types or consider " #op "_unsigned() before " #op "_t()"); \
+ __cmp(op, unique_x, unique_y); })
-#define __careful_cmp(x, y, op) \
- __builtin_choose_expr(__safe_cmp(x, y), \
- __cmp(x, y, op), \
- __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op))
+#define __careful_cmp(op, x, y) \
+ __builtin_choose_expr(__is_constexpr((x) - (y)), \
+ __cmp(op, x, y), \
+ __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
#define __clamp(val, lo, hi) \
((val) >= (hi) ? (hi) : ((val) <= (lo) ? (lo) : (val)))
@@ -44,17 +42,14 @@
typeof(val) unique_val = (val); \
typeof(lo) unique_lo = (lo); \
typeof(hi) unique_hi = (hi); \
+ static_assert(!__is_constexpr((lo) > (hi)) || (lo) <= (hi), \
+ "clamp() low limit " #lo " greater than high limit " #hi); \
+ static_assert(__types_ok(val, lo), "clamp() 'lo' signedness error"); \
+ static_assert(__types_ok(val, hi), "clamp() 'hi' signedness error"); \
__clamp(unique_val, unique_lo, unique_hi); })
-#define __clamp_input_check(lo, hi) \
- (BUILD_BUG_ON_ZERO(__builtin_choose_expr( \
- __is_constexpr((lo) > (hi)), (lo) > (hi), false)))
-
#define __careful_clamp(val, lo, hi) ({ \
- __clamp_input_check(lo, hi) + \
- __builtin_choose_expr(__typecheck(val, lo) && __typecheck(val, hi) && \
- __typecheck(hi, lo) && __is_constexpr(val) && \
- __is_constexpr(lo) && __is_constexpr(hi), \
+ __builtin_choose_expr(__is_constexpr((val) - (lo) + (hi)), \
__clamp(val, lo, hi), \
__clamp_once(val, lo, hi, __UNIQUE_ID(__val), \
__UNIQUE_ID(__lo), __UNIQUE_ID(__hi))); })
@@ -64,14 +59,14 @@
* @x: first value
* @y: second value
*/
-#define min(x, y) __careful_cmp(x, y, <)
+#define min(x, y) __careful_cmp(min, x, y)
/**
* max - return maximum of two values of the same or compatible types
* @x: first value
* @y: second value
*/
-#define max(x, y) __careful_cmp(x, y, >)
+#define max(x, y) __careful_cmp(max, x, y)
/**
* min_unsigned - return minimum of two non-negative values
@@ -79,16 +74,16 @@
* @x: first value
* @y: second value
*/
-#define min_unsigned(x, y) \
- __careful_cmp((x) + 0u + 0ul + 0ull, (y) + 0u + 0ul + 0ull, <)
+#define min_unsigned(x, y) \
+ __careful_cmp(min, (x) + 0u + 0ul + 0ull, (y) + 0u + 0ul + 0ull)
/**
* max_unsigned - return maximum of two non-negative values
* @x: first value
* @y: second value
*/
-#define max_unsigned(x, y) \
- __careful_cmp((x) + 0u + 0ul + 0ull, (y) + 0u + 0ul + 0ull, >)
+#define max_unsigned(x, y) \
+ __careful_cmp(max, (x) + 0u + 0ul + 0ull, (y) + 0u + 0ul + 0ull)
/**
* min3 - return minimum of three values
@@ -140,7 +135,7 @@
* @x: first value
* @y: second value
*/
-#define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
+#define min_t(type, x, y) __careful_cmp(min, (type)(x), (type)(y))
/**
* max_t - return maximum of two values, using the specified type
@@ -148,7 +143,7 @@
* @x: first value
* @y: second value
*/
-#define max_t(type, x, y) __careful_cmp((type)(x), (type)(y), >)
+#define max_t(type, x, y) __careful_cmp(max, (type)(x), (type)(y))
/**
* clamp_t - return a value clamped to a given range using a given type
--
2.17.1
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH next resend 3/5] minmax: Fix indentation of __cmp_once() and __clamp_once()
2023-07-25 10:00 [PATCH next 0/5] minmax: Relax type checks in min() and max() David Laight
` (2 preceding siblings ...)
2023-07-25 11:51 ` [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness David Laight
@ 2023-07-25 11:52 ` David Laight
2023-07-25 11:53 ` [PATCH next resend 4/5] minmax: Allow comparisons of 'int' against 'unsigned char/short' David Laight
2023-07-25 11:54 ` [PATCH next resend 5/5] minmax: Relax check to allow comparison between int and small unsigned constants David Laight
5 siblings, 0 replies; 45+ messages in thread
From: David Laight @ 2023-07-25 11:52 UTC (permalink / raw)
To: 'linux-kernel@vger.kernel.org', 'Andy Shevchenko',
'Andrew Morton', 'Matthew Wilcox (Oracle)',
'Christoph Hellwig', 'Jason A. Donenfeld'
Remove the extra indentation and align continuation markers.
Signed-off-by: David Laight <david.laight@aculab.com>
---
Resend as reply to 0/5
include/linux/minmax.h | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/include/linux/minmax.h b/include/linux/minmax.h
index 10d236ac7da6..179034479d5e 100644
--- a/include/linux/minmax.h
+++ b/include/linux/minmax.h
@@ -24,11 +24,11 @@
#define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y))
#define __cmp_once(op, x, y, unique_x, unique_y) ({ \
- typeof(x) unique_x = (x); \
- typeof(y) unique_y = (y); \
- static_assert(__types_ok(x, y), \
- #op "(" #x ", " #y ") signedness error, fix types or consider " #op "_unsigned() before " #op "_t()"); \
- __cmp(op, unique_x, unique_y); })
+ typeof(x) unique_x = (x); \
+ typeof(y) unique_y = (y); \
+ static_assert(__types_ok(x, y), \
+ #op "(" #x ", " #y ") signedness error, fix types or consider " #op "_unsigned() before " #op "_t()"); \
+ __cmp(op, unique_x, unique_y); })
#define __careful_cmp(op, x, y) \
__builtin_choose_expr(__is_constexpr((x) - (y)), \
@@ -38,15 +38,15 @@
#define __clamp(val, lo, hi) \
((val) >= (hi) ? (hi) : ((val) <= (lo) ? (lo) : (val)))
-#define __clamp_once(val, lo, hi, unique_val, unique_lo, unique_hi) ({ \
- typeof(val) unique_val = (val); \
- typeof(lo) unique_lo = (lo); \
- typeof(hi) unique_hi = (hi); \
- static_assert(!__is_constexpr((lo) > (hi)) || (lo) <= (hi), \
- "clamp() low limit " #lo " greater than high limit " #hi); \
- static_assert(__types_ok(val, lo), "clamp() 'lo' signedness error"); \
- static_assert(__types_ok(val, hi), "clamp() 'hi' signedness error"); \
- __clamp(unique_val, unique_lo, unique_hi); })
+#define __clamp_once(val, lo, hi, unique_val, unique_lo, unique_hi) ({ \
+ typeof(val) unique_val = (val); \
+ typeof(lo) unique_lo = (lo); \
+ typeof(hi) unique_hi = (hi); \
+ static_assert(!__is_constexpr((lo) > (hi)) || (lo) <= (hi), \
+ "clamp() low limit " #lo " greater than high limit " #hi); \
+ static_assert(__types_ok(val, lo), "clamp() 'lo' signedness error"); \
+ static_assert(__types_ok(val, hi), "clamp() 'hi' signedness error"); \
+ __clamp(unique_val, unique_lo, unique_hi); })
#define __careful_clamp(val, lo, hi) ({ \
__builtin_choose_expr(__is_constexpr((val) - (lo) + (hi)), \
--
2.17.1
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH next resend 4/5] minmax: Allow comparisons of 'int' against 'unsigned char/short'.
2023-07-25 10:00 [PATCH next 0/5] minmax: Relax type checks in min() and max() David Laight
` (3 preceding siblings ...)
2023-07-25 11:52 ` [PATCH next resend 3/5] minmax: Fix indentation of __cmp_once() and __clamp_once() David Laight
@ 2023-07-25 11:53 ` David Laight
2023-07-25 11:54 ` [PATCH next resend 5/5] minmax: Relax check to allow comparison between int and small unsigned constants David Laight
5 siblings, 0 replies; 45+ messages in thread
From: David Laight @ 2023-07-25 11:53 UTC (permalink / raw)
To: 'linux-kernel@vger.kernel.org', 'Andy Shevchenko',
'Andrew Morton', 'Matthew Wilcox (Oracle)',
'Christoph Hellwig', 'Jason A. Donenfeld'
Since 'unsigned char/short' get promoted to 'signed int' it is
safe to compare them against an 'int' value.
Signed-off-by: David Laight <david.laight@aculab.com>
---
Resend as reply to 0/5
include/linux/minmax.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/minmax.h b/include/linux/minmax.h
index 179034479d5e..baffbe5c855d 100644
--- a/include/linux/minmax.h
+++ b/include/linux/minmax.h
@@ -16,7 +16,8 @@
* allocation usage).
*/
#define __types_ok(x, y) \
- (is_signed_type(typeof(x)) == is_signed_type(typeof(y)))
+ (is_signed_type(typeof(x)) == is_signed_type(typeof(y)) || \
+ is_signed_type(typeof((x) + 0)) == is_signed_type(typeof((y) + 0)))
#define __cmp_op_min <
#define __cmp_op_max >
--
2.17.1
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH next resend 5/5] minmax: Relax check to allow comparison between int and small unsigned constants.
2023-07-25 10:00 [PATCH next 0/5] minmax: Relax type checks in min() and max() David Laight
` (4 preceding siblings ...)
2023-07-25 11:53 ` [PATCH next resend 4/5] minmax: Allow comparisons of 'int' against 'unsigned char/short' David Laight
@ 2023-07-25 11:54 ` David Laight
2023-07-25 19:36 ` kernel test robot
` (3 more replies)
5 siblings, 4 replies; 45+ messages in thread
From: David Laight @ 2023-07-25 11:54 UTC (permalink / raw)
To: 'linux-kernel@vger.kernel.org', 'Andy Shevchenko',
'Andrew Morton', 'Matthew Wilcox (Oracle)',
'Christoph Hellwig', 'Jason A. Donenfeld'
Convert constants between 0 and INT_MAX to 'int' prior to comparisons
so that min(signed_var, 20u) and, more commonly, min(signed_var, sizeof())
are both valid.
Signed-off-by: David Laight <david.laight@aculab.com>
---
Resend as reply to 0/5
include/linux/minmax.h | 35 +++++++++++++++++++++++------------
1 file changed, 23 insertions(+), 12 deletions(-)
diff --git a/include/linux/minmax.h b/include/linux/minmax.h
index baffbe5c855d..27ebab9f21e7 100644
--- a/include/linux/minmax.h
+++ b/include/linux/minmax.h
@@ -7,17 +7,28 @@
/*
* min()/max()/clamp() macros must accomplish three things:
*
- * - avoid multiple evaluations of the arguments (so side-effects like
+ * - Avoid multiple evaluations of the arguments (so side-effects like
* "x++" happen only once) when non-constant.
- * - perform signed v unsigned type-checking (to generate compile
+ * - Perform signed v unsigned type-checking (to generate compile
* errors instead of nasty runtime surprises).
- * - retain result as a constant expressions when called with only
+ * Constants from 0 to INT_MAX are cast to (int) so can be used
+ * in comparisons with signed types.
+ * - Retain result as a constant expressions when called with only
* constant expressions (to avoid tripping VLA warnings in stack
* allocation usage).
*/
-#define __types_ok(x, y) \
- (is_signed_type(typeof(x)) == is_signed_type(typeof(y)) || \
- is_signed_type(typeof((x) + 0)) == is_signed_type(typeof((y) + 0)))
+
+#define __is_noneg_int(x) \
+ __builtin_choose_expr(!__is_constexpr(x), false, \
+ ((x) >= 0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__))
+
+#define __int_const(x) __builtin_choose_expr(__is_noneg_int(x), (int)(long)(x), (x))
+
+#define __is_signed(x) is_signed_type(typeof(x))
+#define __types_ok(x, y) \
+ (__is_signed(x) == __is_signed(y) || \
+ __is_signed((x) + 0) == __is_signed((y) + 0) || \
+ __is_noneg_int(x) || __is_noneg_int(y))
#define __cmp_op_min <
#define __cmp_op_max >
@@ -25,24 +36,24 @@
#define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y))
#define __cmp_once(op, x, y, unique_x, unique_y) ({ \
- typeof(x) unique_x = (x); \
- typeof(y) unique_y = (y); \
+ typeof(__int_const(x)) unique_x = (x); \
+ typeof(__int_const(y)) unique_y = (y); \
static_assert(__types_ok(x, y), \
#op "(" #x ", " #y ") signedness error, fix types or consider " #op "_unsigned() before " #op "_t()"); \
__cmp(op, unique_x, unique_y); })
#define __careful_cmp(op, x, y) \
__builtin_choose_expr(__is_constexpr((x) - (y)), \
- __cmp(op, x, y), \
+ __cmp(op, __int_const(x), __int_const(y)), \
__cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
#define __clamp(val, lo, hi) \
((val) >= (hi) ? (hi) : ((val) <= (lo) ? (lo) : (val)))
#define __clamp_once(val, lo, hi, unique_val, unique_lo, unique_hi) ({ \
- typeof(val) unique_val = (val); \
- typeof(lo) unique_lo = (lo); \
- typeof(hi) unique_hi = (hi); \
+ typeof(__int_const(val)) unique_val = (val); \
+ typeof(__int_const(lo)) unique_lo = (lo); \
+ typeof(__int_const(hi)) unique_hi = (hi); \
static_assert(!__is_constexpr((lo) > (hi)) || (lo) <= (hi), \
"clamp() low limit " #lo " greater than high limit " #hi); \
static_assert(__types_ok(val, lo), "clamp() 'lo' signedness error"); \
--
2.17.1
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
^ permalink raw reply related [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 1/5] minmax: Add min_unsigned(a, b) and max_unsigned(a, b)
2023-07-25 11:48 ` [PATCH next resend 1/5] minmax: Add min_unsigned(a, b) and max_unsigned(a, b) David Laight
@ 2023-07-25 12:38 ` Matthew Wilcox
2023-07-25 13:20 ` David Laight
0 siblings, 1 reply; 45+ messages in thread
From: Matthew Wilcox @ 2023-07-25 12:38 UTC (permalink / raw)
To: David Laight
Cc: 'linux-kernel@vger.kernel.org', 'Andy Shevchenko',
'Andrew Morton', 'Christoph Hellwig',
'Jason A. Donenfeld'
On Tue, Jul 25, 2023 at 11:48:14AM +0000, David Laight wrote:
> +#define min_unsigned(x, y) \
> + __careful_cmp((x) + 0u + 0ul + 0ull, (y) + 0u + 0ul + 0ull, <)
What is the point of "+ 0u + 0ul + 0ull"? How is that any different
from "+ 0ull"? And why force the compiler to do a 64-bit comparison
when it could do a 32-bit comparison?
^ permalink raw reply [flat|nested] 45+ messages in thread
* RE: [PATCH next resend 1/5] minmax: Add min_unsigned(a, b) and max_unsigned(a, b)
2023-07-25 12:38 ` Matthew Wilcox
@ 2023-07-25 13:20 ` David Laight
0 siblings, 0 replies; 45+ messages in thread
From: David Laight @ 2023-07-25 13:20 UTC (permalink / raw)
To: 'Matthew Wilcox'
Cc: 'linux-kernel@vger.kernel.org', 'Andy Shevchenko',
'Andrew Morton', 'Christoph Hellwig',
'Jason A. Donenfeld'
From: Matthew Wilcox
> Sent: 25 July 2023 13:39
>
> On Tue, Jul 25, 2023 at 11:48:14AM +0000, David Laight wrote:
> > +#define min_unsigned(x, y) \
> > + __careful_cmp((x) + 0u + 0ul + 0ull, (y) + 0u + 0ul + 0ull, <)
>
> What is the point of "+ 0u + 0ul + 0ull"? How is that any different
> from "+ 0ull"? And why force the compiler to do a 64-bit comparison
> when it could do a 32-bit comparison?
The "+ 0u + 0ul + 0ull" causes a signed 32bit value to be zero extended
to 64bit. This is significantly cheaper than the sign extension.
(Adding 0ull first converts a signed 32bit value to a signed
64bit one - the same as a cast.)
The compiler also then knows that the high 32bit are zero and
optimises away any associated compares.
So you get a 32bit compare (on both 32bit and 64bit) if both
arguments are 32bit.
This happens even at -O0.
It also has no effect on pointer types.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
2023-07-25 11:51 ` [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness David Laight
@ 2023-07-25 18:02 ` kernel test robot
2023-07-25 18:33 ` kernel test robot
1 sibling, 0 replies; 45+ messages in thread
From: kernel test robot @ 2023-07-25 18:02 UTC (permalink / raw)
To: David Laight, 'linux-kernel@vger.kernel.org',
'Andy Shevchenko', 'Andrew Morton',
'Matthew Wilcox (Oracle)', 'Christoph Hellwig',
'Jason A. Donenfeld'
Cc: oe-kbuild-all, Linux Memory Management List
Hi David,
kernel test robot noticed the following build errors:
[auto build test ERROR on akpm-mm/mm-everything]
[also build test ERROR on linus/master v6.5-rc3 next-20230725]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/a09512c8526b46759669d0b879144563%40AcuMS.aculab.com
patch subject: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
config: riscv-randconfig-r024-20230725 (https://download.01.org/0day-ci/archive/20230726/202307260144.boYg18Ty-lkp@intel.com/config)
compiler: riscv32-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230726/202307260144.boYg18Ty-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307260144.boYg18Ty-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from drivers/irqchip/irq-meson-gpio.c:15:
>> include/linux/irqchip.h:24:10: error: implicit declaration of function '__typecheck'; did you mean 'typecheck'? [-Werror=implicit-function-declaration]
24 | (__typecheck(typecheck_irq_init_cb, &fn) ? fn : fn)
| ^~~~~~~~~~~
include/linux/irqchip.h:45:45: note: in expansion of macro 'typecheck_irq_init_cb'
45 | .data = typecheck_irq_init_cb(fn), },
| ^~~~~~~~~~~~~~~~~~~~~
drivers/irqchip/irq-meson-gpio.c:597:1: note: in expansion of macro 'IRQCHIP_MATCH'
597 | IRQCHIP_MATCH("amlogic,meson-gpio-intc", meson_gpio_irq_of_init)
| ^~~~~~~~~~~~~
>> include/linux/irqchip.h:24:9: error: initializer element is not constant
24 | (__typecheck(typecheck_irq_init_cb, &fn) ? fn : fn)
| ^
include/linux/irqchip.h:45:45: note: in expansion of macro 'typecheck_irq_init_cb'
45 | .data = typecheck_irq_init_cb(fn), },
| ^~~~~~~~~~~~~~~~~~~~~
drivers/irqchip/irq-meson-gpio.c:597:1: note: in expansion of macro 'IRQCHIP_MATCH'
597 | IRQCHIP_MATCH("amlogic,meson-gpio-intc", meson_gpio_irq_of_init)
| ^~~~~~~~~~~~~
include/linux/irqchip.h:24:9: note: (near initialization for 'meson_gpio_intc_irqchip_match_table[0].data')
24 | (__typecheck(typecheck_irq_init_cb, &fn) ? fn : fn)
| ^
include/linux/irqchip.h:45:45: note: in expansion of macro 'typecheck_irq_init_cb'
45 | .data = typecheck_irq_init_cb(fn), },
| ^~~~~~~~~~~~~~~~~~~~~
drivers/irqchip/irq-meson-gpio.c:597:1: note: in expansion of macro 'IRQCHIP_MATCH'
597 | IRQCHIP_MATCH("amlogic,meson-gpio-intc", meson_gpio_irq_of_init)
| ^~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from include/linux/irqchip.h:16,
from drivers/irqchip/irq-riscv-intc.c:14:
>> include/linux/irqchip.h:24:10: error: implicit declaration of function '__typecheck'; did you mean 'typecheck'? [-Werror=implicit-function-declaration]
24 | (__typecheck(typecheck_irq_init_cb, &fn) ? fn : fn)
| ^~~~~~~~~~~
include/linux/of.h:1478:31: note: in definition of macro '_OF_DECLARE'
1478 | .data = (fn == (fn_type)NULL) ? fn : fn }
| ^~
include/linux/irqchip.h:37:9: note: in expansion of macro 'OF_DECLARE_2'
37 | OF_DECLARE_2(irqchip, name, compat, typecheck_irq_init_cb(fn))
| ^~~~~~~~~~~~
include/linux/irqchip.h:37:45: note: in expansion of macro 'typecheck_irq_init_cb'
37 | OF_DECLARE_2(irqchip, name, compat, typecheck_irq_init_cb(fn))
| ^~~~~~~~~~~~~~~~~~~~~
drivers/irqchip/irq-riscv-intc.c:164:1: note: in expansion of macro 'IRQCHIP_DECLARE'
164 | IRQCHIP_DECLARE(riscv, "riscv,cpu-intc", riscv_intc_init);
| ^~~~~~~~~~~~~~~
>> include/linux/of.h:1478:30: error: initializer element is not constant
1478 | .data = (fn == (fn_type)NULL) ? fn : fn }
| ^
include/linux/of.h:1493:17: note: in expansion of macro '_OF_DECLARE'
1493 | _OF_DECLARE(table, name, compat, fn, of_init_fn_2)
| ^~~~~~~~~~~
include/linux/irqchip.h:37:9: note: in expansion of macro 'OF_DECLARE_2'
37 | OF_DECLARE_2(irqchip, name, compat, typecheck_irq_init_cb(fn))
| ^~~~~~~~~~~~
drivers/irqchip/irq-riscv-intc.c:164:1: note: in expansion of macro 'IRQCHIP_DECLARE'
164 | IRQCHIP_DECLARE(riscv, "riscv,cpu-intc", riscv_intc_init);
| ^~~~~~~~~~~~~~~
include/linux/of.h:1478:30: note: (near initialization for '__of_table_riscv.data')
1478 | .data = (fn == (fn_type)NULL) ? fn : fn }
| ^
include/linux/of.h:1493:17: note: in expansion of macro '_OF_DECLARE'
1493 | _OF_DECLARE(table, name, compat, fn, of_init_fn_2)
| ^~~~~~~~~~~
include/linux/irqchip.h:37:9: note: in expansion of macro 'OF_DECLARE_2'
37 | OF_DECLARE_2(irqchip, name, compat, typecheck_irq_init_cb(fn))
| ^~~~~~~~~~~~
drivers/irqchip/irq-riscv-intc.c:164:1: note: in expansion of macro 'IRQCHIP_DECLARE'
164 | IRQCHIP_DECLARE(riscv, "riscv,cpu-intc", riscv_intc_init);
| ^~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from drivers/irqchip/irq-renesas-rzg2l.c:14:
>> include/linux/irqchip.h:24:10: error: implicit declaration of function '__typecheck'; did you mean 'typecheck'? [-Werror=implicit-function-declaration]
24 | (__typecheck(typecheck_irq_init_cb, &fn) ? fn : fn)
| ^~~~~~~~~~~
include/linux/irqchip.h:45:45: note: in expansion of macro 'typecheck_irq_init_cb'
45 | .data = typecheck_irq_init_cb(fn), },
| ^~~~~~~~~~~~~~~~~~~~~
drivers/irqchip/irq-renesas-rzg2l.c:389:1: note: in expansion of macro 'IRQCHIP_MATCH'
389 | IRQCHIP_MATCH("renesas,rzg2l-irqc", rzg2l_irqc_init)
| ^~~~~~~~~~~~~
>> include/linux/irqchip.h:24:9: error: initializer element is not constant
24 | (__typecheck(typecheck_irq_init_cb, &fn) ? fn : fn)
| ^
include/linux/irqchip.h:45:45: note: in expansion of macro 'typecheck_irq_init_cb'
45 | .data = typecheck_irq_init_cb(fn), },
| ^~~~~~~~~~~~~~~~~~~~~
drivers/irqchip/irq-renesas-rzg2l.c:389:1: note: in expansion of macro 'IRQCHIP_MATCH'
389 | IRQCHIP_MATCH("renesas,rzg2l-irqc", rzg2l_irqc_init)
| ^~~~~~~~~~~~~
include/linux/irqchip.h:24:9: note: (near initialization for 'rzg2l_irqc_irqchip_match_table[0].data')
24 | (__typecheck(typecheck_irq_init_cb, &fn) ? fn : fn)
| ^
include/linux/irqchip.h:45:45: note: in expansion of macro 'typecheck_irq_init_cb'
45 | .data = typecheck_irq_init_cb(fn), },
| ^~~~~~~~~~~~~~~~~~~~~
drivers/irqchip/irq-renesas-rzg2l.c:389:1: note: in expansion of macro 'IRQCHIP_MATCH'
389 | IRQCHIP_MATCH("renesas,rzg2l-irqc", rzg2l_irqc_init)
| ^~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from include/linux/irqchip.h:16,
from drivers/irqchip/irq-sifive-plic.c:11:
>> include/linux/irqchip.h:24:10: error: implicit declaration of function '__typecheck'; did you mean 'typecheck'? [-Werror=implicit-function-declaration]
24 | (__typecheck(typecheck_irq_init_cb, &fn) ? fn : fn)
| ^~~~~~~~~~~
include/linux/of.h:1478:31: note: in definition of macro '_OF_DECLARE'
1478 | .data = (fn == (fn_type)NULL) ? fn : fn }
| ^~
include/linux/irqchip.h:37:9: note: in expansion of macro 'OF_DECLARE_2'
37 | OF_DECLARE_2(irqchip, name, compat, typecheck_irq_init_cb(fn))
| ^~~~~~~~~~~~
include/linux/irqchip.h:37:45: note: in expansion of macro 'typecheck_irq_init_cb'
37 | OF_DECLARE_2(irqchip, name, compat, typecheck_irq_init_cb(fn))
| ^~~~~~~~~~~~~~~~~~~~~
drivers/irqchip/irq-sifive-plic.c:571:1: note: in expansion of macro 'IRQCHIP_DECLARE'
571 | IRQCHIP_DECLARE(sifive_plic, "sifive,plic-1.0.0", plic_init);
| ^~~~~~~~~~~~~~~
>> include/linux/of.h:1478:30: error: initializer element is not constant
1478 | .data = (fn == (fn_type)NULL) ? fn : fn }
| ^
include/linux/of.h:1493:17: note: in expansion of macro '_OF_DECLARE'
1493 | _OF_DECLARE(table, name, compat, fn, of_init_fn_2)
| ^~~~~~~~~~~
include/linux/irqchip.h:37:9: note: in expansion of macro 'OF_DECLARE_2'
37 | OF_DECLARE_2(irqchip, name, compat, typecheck_irq_init_cb(fn))
| ^~~~~~~~~~~~
drivers/irqchip/irq-sifive-plic.c:571:1: note: in expansion of macro 'IRQCHIP_DECLARE'
571 | IRQCHIP_DECLARE(sifive_plic, "sifive,plic-1.0.0", plic_init);
| ^~~~~~~~~~~~~~~
include/linux/of.h:1478:30: note: (near initialization for '__of_table_sifive_plic.data')
1478 | .data = (fn == (fn_type)NULL) ? fn : fn }
| ^
include/linux/of.h:1493:17: note: in expansion of macro '_OF_DECLARE'
1493 | _OF_DECLARE(table, name, compat, fn, of_init_fn_2)
| ^~~~~~~~~~~
include/linux/irqchip.h:37:9: note: in expansion of macro 'OF_DECLARE_2'
37 | OF_DECLARE_2(irqchip, name, compat, typecheck_irq_init_cb(fn))
| ^~~~~~~~~~~~
drivers/irqchip/irq-sifive-plic.c:571:1: note: in expansion of macro 'IRQCHIP_DECLARE'
571 | IRQCHIP_DECLARE(sifive_plic, "sifive,plic-1.0.0", plic_init);
| ^~~~~~~~~~~~~~~
>> include/linux/of.h:1478:30: error: initializer element is not constant
1478 | .data = (fn == (fn_type)NULL) ? fn : fn }
| ^
include/linux/of.h:1493:17: note: in expansion of macro '_OF_DECLARE'
1493 | _OF_DECLARE(table, name, compat, fn, of_init_fn_2)
| ^~~~~~~~~~~
include/linux/irqchip.h:37:9: note: in expansion of macro 'OF_DECLARE_2'
37 | OF_DECLARE_2(irqchip, name, compat, typecheck_irq_init_cb(fn))
| ^~~~~~~~~~~~
drivers/irqchip/irq-sifive-plic.c:572:1: note: in expansion of macro 'IRQCHIP_DECLARE'
572 | IRQCHIP_DECLARE(riscv_plic0, "riscv,plic0", plic_init); /* for legacy systems */
| ^~~~~~~~~~~~~~~
include/linux/of.h:1478:30: note: (near initialization for '__of_table_riscv_plic0.data')
1478 | .data = (fn == (fn_type)NULL) ? fn : fn }
| ^
include/linux/of.h:1493:17: note: in expansion of macro '_OF_DECLARE'
1493 | _OF_DECLARE(table, name, compat, fn, of_init_fn_2)
| ^~~~~~~~~~~
include/linux/irqchip.h:37:9: note: in expansion of macro 'OF_DECLARE_2'
37 | OF_DECLARE_2(irqchip, name, compat, typecheck_irq_init_cb(fn))
| ^~~~~~~~~~~~
drivers/irqchip/irq-sifive-plic.c:572:1: note: in expansion of macro 'IRQCHIP_DECLARE'
572 | IRQCHIP_DECLARE(riscv_plic0, "riscv,plic0", plic_init); /* for legacy systems */
| ^~~~~~~~~~~~~~~
>> include/linux/of.h:1478:30: error: initializer element is not constant
1478 | .data = (fn == (fn_type)NULL) ? fn : fn }
| ^
include/linux/of.h:1493:17: note: in expansion of macro '_OF_DECLARE'
1493 | _OF_DECLARE(table, name, compat, fn, of_init_fn_2)
| ^~~~~~~~~~~
include/linux/irqchip.h:37:9: note: in expansion of macro 'OF_DECLARE_2'
37 | OF_DECLARE_2(irqchip, name, compat, typecheck_irq_init_cb(fn))
| ^~~~~~~~~~~~
drivers/irqchip/irq-sifive-plic.c:580:1: note: in expansion of macro 'IRQCHIP_DECLARE'
580 | IRQCHIP_DECLARE(andestech_nceplic100, "andestech,nceplic100", plic_edge_init);
| ^~~~~~~~~~~~~~~
include/linux/of.h:1478:30: note: (near initialization for '__of_table_andestech_nceplic100.data')
1478 | .data = (fn == (fn_type)NULL) ? fn : fn }
| ^
include/linux/of.h:1493:17: note: in expansion of macro '_OF_DECLARE'
1493 | _OF_DECLARE(table, name, compat, fn, of_init_fn_2)
| ^~~~~~~~~~~
include/linux/irqchip.h:37:9: note: in expansion of macro 'OF_DECLARE_2'
37 | OF_DECLARE_2(irqchip, name, compat, typecheck_irq_init_cb(fn))
| ^~~~~~~~~~~~
drivers/irqchip/irq-sifive-plic.c:580:1: note: in expansion of macro 'IRQCHIP_DECLARE'
580 | IRQCHIP_DECLARE(andestech_nceplic100, "andestech,nceplic100", plic_edge_init);
| ^~~~~~~~~~~~~~~
>> include/linux/of.h:1478:30: error: initializer element is not constant
1478 | .data = (fn == (fn_type)NULL) ? fn : fn }
| ^
include/linux/of.h:1493:17: note: in expansion of macro '_OF_DECLARE'
1493 | _OF_DECLARE(table, name, compat, fn, of_init_fn_2)
| ^~~~~~~~~~~
include/linux/irqchip.h:37:9: note: in expansion of macro 'OF_DECLARE_2'
37 | OF_DECLARE_2(irqchip, name, compat, typecheck_irq_init_cb(fn))
| ^~~~~~~~~~~~
drivers/irqchip/irq-sifive-plic.c:581:1: note: in expansion of macro 'IRQCHIP_DECLARE'
581 | IRQCHIP_DECLARE(thead_c900_plic, "thead,c900-plic", plic_edge_init);
| ^~~~~~~~~~~~~~~
include/linux/of.h:1478:30: note: (near initialization for '__of_table_thead_c900_plic.data')
1478 | .data = (fn == (fn_type)NULL) ? fn : fn }
| ^
include/linux/of.h:1493:17: note: in expansion of macro '_OF_DECLARE'
1493 | _OF_DECLARE(table, name, compat, fn, of_init_fn_2)
| ^~~~~~~~~~~
include/linux/irqchip.h:37:9: note: in expansion of macro 'OF_DECLARE_2'
37 | OF_DECLARE_2(irqchip, name, compat, typecheck_irq_init_cb(fn))
| ^~~~~~~~~~~~
drivers/irqchip/irq-sifive-plic.c:581:1: note: in expansion of macro 'IRQCHIP_DECLARE'
581 | IRQCHIP_DECLARE(thead_c900_plic, "thead,c900-plic", plic_edge_init);
| ^~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from include/linux/irqchip.h:16,
from drivers/irqchip/irq-mst-intc.c:9:
>> include/linux/irqchip.h:24:10: error: implicit declaration of function '__typecheck'; did you mean 'typecheck'? [-Werror=implicit-function-declaration]
24 | (__typecheck(typecheck_irq_init_cb, &fn) ? fn : fn)
| ^~~~~~~~~~~
include/linux/of.h:1478:31: note: in definition of macro '_OF_DECLARE'
1478 | .data = (fn == (fn_type)NULL) ? fn : fn }
| ^~
include/linux/irqchip.h:37:9: note: in expansion of macro 'OF_DECLARE_2'
37 | OF_DECLARE_2(irqchip, name, compat, typecheck_irq_init_cb(fn))
| ^~~~~~~~~~~~
include/linux/irqchip.h:37:45: note: in expansion of macro 'typecheck_irq_init_cb'
37 | OF_DECLARE_2(irqchip, name, compat, typecheck_irq_init_cb(fn))
| ^~~~~~~~~~~~~~~~~~~~~
drivers/irqchip/irq-mst-intc.c:291:1: note: in expansion of macro 'IRQCHIP_DECLARE'
291 | IRQCHIP_DECLARE(mst_intc, "mstar,mst-intc", mst_intc_of_init);
| ^~~~~~~~~~~~~~~
>> include/linux/of.h:1478:30: error: initializer element is not constant
1478 | .data = (fn == (fn_type)NULL) ? fn : fn }
| ^
include/linux/of.h:1493:17: note: in expansion of macro '_OF_DECLARE'
1493 | _OF_DECLARE(table, name, compat, fn, of_init_fn_2)
| ^~~~~~~~~~~
include/linux/irqchip.h:37:9: note: in expansion of macro 'OF_DECLARE_2'
37 | OF_DECLARE_2(irqchip, name, compat, typecheck_irq_init_cb(fn))
| ^~~~~~~~~~~~
drivers/irqchip/irq-mst-intc.c:291:1: note: in expansion of macro 'IRQCHIP_DECLARE'
291 | IRQCHIP_DECLARE(mst_intc, "mstar,mst-intc", mst_intc_of_init);
| ^~~~~~~~~~~~~~~
include/linux/of.h:1478:30: note: (near initialization for '__of_table_mst_intc.data')
1478 | .data = (fn == (fn_type)NULL) ? fn : fn }
| ^
include/linux/of.h:1493:17: note: in expansion of macro '_OF_DECLARE'
1493 | _OF_DECLARE(table, name, compat, fn, of_init_fn_2)
| ^~~~~~~~~~~
include/linux/irqchip.h:37:9: note: in expansion of macro 'OF_DECLARE_2'
37 | OF_DECLARE_2(irqchip, name, compat, typecheck_irq_init_cb(fn))
| ^~~~~~~~~~~~
drivers/irqchip/irq-mst-intc.c:291:1: note: in expansion of macro 'IRQCHIP_DECLARE'
291 | IRQCHIP_DECLARE(mst_intc, "mstar,mst-intc", mst_intc_of_init);
| ^~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from drivers/irqchip/irq-imx-mu-msi.c:15:
>> include/linux/irqchip.h:24:10: error: implicit declaration of function '__typecheck'; did you mean 'typecheck'? [-Werror=implicit-function-declaration]
24 | (__typecheck(typecheck_irq_init_cb, &fn) ? fn : fn)
| ^~~~~~~~~~~
include/linux/irqchip.h:45:45: note: in expansion of macro 'typecheck_irq_init_cb'
45 | .data = typecheck_irq_init_cb(fn), },
| ^~~~~~~~~~~~~~~~~~~~~
drivers/irqchip/irq-imx-mu-msi.c:445:1: note: in expansion of macro 'IRQCHIP_MATCH'
445 | IRQCHIP_MATCH("fsl,imx7ulp-mu-msi", imx_mu_imx7ulp_of_init)
| ^~~~~~~~~~~~~
>> include/linux/irqchip.h:24:9: error: initializer element is not constant
24 | (__typecheck(typecheck_irq_init_cb, &fn) ? fn : fn)
| ^
include/linux/irqchip.h:45:45: note: in expansion of macro 'typecheck_irq_init_cb'
45 | .data = typecheck_irq_init_cb(fn), },
| ^~~~~~~~~~~~~~~~~~~~~
drivers/irqchip/irq-imx-mu-msi.c:445:1: note: in expansion of macro 'IRQCHIP_MATCH'
445 | IRQCHIP_MATCH("fsl,imx7ulp-mu-msi", imx_mu_imx7ulp_of_init)
| ^~~~~~~~~~~~~
include/linux/irqchip.h:24:9: note: (near initialization for 'imx_mu_msi_irqchip_match_table[0].data')
24 | (__typecheck(typecheck_irq_init_cb, &fn) ? fn : fn)
| ^
include/linux/irqchip.h:45:45: note: in expansion of macro 'typecheck_irq_init_cb'
45 | .data = typecheck_irq_init_cb(fn), },
| ^~~~~~~~~~~~~~~~~~~~~
drivers/irqchip/irq-imx-mu-msi.c:445:1: note: in expansion of macro 'IRQCHIP_MATCH'
445 | IRQCHIP_MATCH("fsl,imx7ulp-mu-msi", imx_mu_imx7ulp_of_init)
| ^~~~~~~~~~~~~
>> include/linux/irqchip.h:24:9: error: initializer element is not constant
24 | (__typecheck(typecheck_irq_init_cb, &fn) ? fn : fn)
| ^
include/linux/irqchip.h:45:45: note: in expansion of macro 'typecheck_irq_init_cb'
45 | .data = typecheck_irq_init_cb(fn), },
| ^~~~~~~~~~~~~~~~~~~~~
drivers/irqchip/irq-imx-mu-msi.c:446:1: note: in expansion of macro 'IRQCHIP_MATCH'
446 | IRQCHIP_MATCH("fsl,imx6sx-mu-msi", imx_mu_imx6sx_of_init)
| ^~~~~~~~~~~~~
include/linux/irqchip.h:24:9: note: (near initialization for 'imx_mu_msi_irqchip_match_table[1].data')
24 | (__typecheck(typecheck_irq_init_cb, &fn) ? fn : fn)
| ^
include/linux/irqchip.h:45:45: note: in expansion of macro 'typecheck_irq_init_cb'
45 | .data = typecheck_irq_init_cb(fn), },
| ^~~~~~~~~~~~~~~~~~~~~
drivers/irqchip/irq-imx-mu-msi.c:446:1: note: in expansion of macro 'IRQCHIP_MATCH'
446 | IRQCHIP_MATCH("fsl,imx6sx-mu-msi", imx_mu_imx6sx_of_init)
| ^~~~~~~~~~~~~
>> include/linux/irqchip.h:24:9: error: initializer element is not constant
24 | (__typecheck(typecheck_irq_init_cb, &fn) ? fn : fn)
| ^
include/linux/irqchip.h:45:45: note: in expansion of macro 'typecheck_irq_init_cb'
45 | .data = typecheck_irq_init_cb(fn), },
| ^~~~~~~~~~~~~~~~~~~~~
drivers/irqchip/irq-imx-mu-msi.c:447:1: note: in expansion of macro 'IRQCHIP_MATCH'
447 | IRQCHIP_MATCH("fsl,imx8ulp-mu-msi", imx_mu_imx8ulp_of_init)
| ^~~~~~~~~~~~~
include/linux/irqchip.h:24:9: note: (near initialization for 'imx_mu_msi_irqchip_match_table[2].data')
24 | (__typecheck(typecheck_irq_init_cb, &fn) ? fn : fn)
| ^
include/linux/irqchip.h:45:45: note: in expansion of macro 'typecheck_irq_init_cb'
45 | .data = typecheck_irq_init_cb(fn), },
| ^~~~~~~~~~~~~~~~~~~~~
drivers/irqchip/irq-imx-mu-msi.c:447:1: note: in expansion of macro 'IRQCHIP_MATCH'
447 | IRQCHIP_MATCH("fsl,imx8ulp-mu-msi", imx_mu_imx8ulp_of_init)
| ^~~~~~~~~~~~~
cc1: some warnings being treated as errors
..
vim +24 include/linux/irqchip.h
f1985002839af80 Marc Zyngier 2021-10-20 22
f1985002839af80 Marc Zyngier 2021-10-20 23 #define typecheck_irq_init_cb(fn) \
f1985002839af80 Marc Zyngier 2021-10-20 @24 (__typecheck(typecheck_irq_init_cb, &fn) ? fn : fn)
f1985002839af80 Marc Zyngier 2021-10-20 25
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
2023-07-25 11:51 ` [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness David Laight
2023-07-25 18:02 ` kernel test robot
@ 2023-07-25 18:33 ` kernel test robot
2023-07-26 9:19 ` David Laight
1 sibling, 1 reply; 45+ messages in thread
From: kernel test robot @ 2023-07-25 18:33 UTC (permalink / raw)
To: David Laight, 'linux-kernel@vger.kernel.org',
'Andy Shevchenko', 'Andrew Morton',
'Matthew Wilcox (Oracle)', 'Christoph Hellwig',
'Jason A. Donenfeld'
Cc: llvm, oe-kbuild-all, Linux Memory Management List
Hi David,
kernel test robot noticed the following build errors:
[auto build test ERROR on akpm-mm/mm-everything]
[also build test ERROR on linus/master]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/a09512c8526b46759669d0b879144563%40AcuMS.aculab.com
patch subject: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
config: mips-randconfig-r016-20230725 (https://download.01.org/0day-ci/archive/20230726/202307260256.nzImScXA-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce: (https://download.01.org/0day-ci/archive/20230726/202307260256.nzImScXA-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307260256.nzImScXA-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/irqchip/irq-mips-cpu.c:288:1: error: call to undeclared function '__typecheck'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
288 | IRQCHIP_DECLARE(cpu_intc, "mti,cpu-interrupt-controller", mips_cpu_irq_of_init);
| ^
include/linux/irqchip.h:37:38: note: expanded from macro 'IRQCHIP_DECLARE'
37 | OF_DECLARE_2(irqchip, name, compat, typecheck_irq_init_cb(fn))
| ^
include/linux/irqchip.h:24:3: note: expanded from macro 'typecheck_irq_init_cb'
24 | (__typecheck(typecheck_irq_init_cb, &fn) ? fn : fn)
| ^
>> drivers/irqchip/irq-mips-cpu.c:288:1: error: initializer element is not a compile-time constant
288 | IRQCHIP_DECLARE(cpu_intc, "mti,cpu-interrupt-controller", mips_cpu_irq_of_init);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/irqchip.h:37:2: note: expanded from macro 'IRQCHIP_DECLARE'
37 | OF_DECLARE_2(irqchip, name, compat, typecheck_irq_init_cb(fn))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/of.h:1493:3: note: expanded from macro 'OF_DECLARE_2'
1493 | _OF_DECLARE(table, name, compat, fn, of_init_fn_2)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/of.h:1481:2: note: expanded from macro '_OF_DECLARE'
1481 | _OF_DECLARE_STUB(table, name, compat, fn, fn_type)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/of.h:1470:16: note: expanded from macro '_OF_DECLARE_STUB'
1470 | .data = (fn == (fn_type)NULL) ? fn : fn }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
--
>> drivers/irqchip/irq-mchp-eic.c:275:1: error: call to undeclared function '__typecheck'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
275 | IRQCHIP_MATCH("microchip,sama7g5-eic", mchp_eic_init)
| ^
include/linux/irqchip.h:45:17: note: expanded from macro 'IRQCHIP_MATCH'
45 | .data = typecheck_irq_init_cb(fn), },
| ^
include/linux/irqchip.h:24:3: note: expanded from macro 'typecheck_irq_init_cb'
24 | (__typecheck(typecheck_irq_init_cb, &fn) ? fn : fn)
| ^
>> drivers/irqchip/irq-mchp-eic.c:275:1: error: initializer element is not a compile-time constant
275 | IRQCHIP_MATCH("microchip,sama7g5-eic", mchp_eic_init)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/irqchip.h:45:17: note: expanded from macro 'IRQCHIP_MATCH'
45 | .data = typecheck_irq_init_cb(fn), },
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/irqchip.h:24:2: note: expanded from macro 'typecheck_irq_init_cb'
24 | (__typecheck(typecheck_irq_init_cb, &fn) ? fn : fn)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
vim +/__typecheck +288 drivers/irqchip/irq-mips-cpu.c
0916b46962cbcac arch/mips/kernel/irq_cpu.c Gabor Juhos 2013-01-31 281
afe8dc254711b72 arch/mips/kernel/irq_cpu.c Andrew Bresticker 2014-09-18 282 int __init mips_cpu_irq_of_init(struct device_node *of_node,
0f84c305351c993 arch/mips/kernel/irq_cpu.c Andrew Bresticker 2014-09-18 283 struct device_node *parent)
0f84c305351c993 arch/mips/kernel/irq_cpu.c Andrew Bresticker 2014-09-18 284 {
0f84c305351c993 arch/mips/kernel/irq_cpu.c Andrew Bresticker 2014-09-18 285 __mips_cpu_irq_init(of_node);
0916b46962cbcac arch/mips/kernel/irq_cpu.c Gabor Juhos 2013-01-31 286 return 0;
0916b46962cbcac arch/mips/kernel/irq_cpu.c Gabor Juhos 2013-01-31 287 }
892b8cf06d8a1e7 drivers/irqchip/irq-mips-cpu.c Paul Burton 2015-05-24 @288 IRQCHIP_DECLARE(cpu_intc, "mti,cpu-interrupt-controller", mips_cpu_irq_of_init);
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 5/5] minmax: Relax check to allow comparison between int and small unsigned constants.
2023-07-25 11:54 ` [PATCH next resend 5/5] minmax: Relax check to allow comparison between int and small unsigned constants David Laight
@ 2023-07-25 19:36 ` kernel test robot
2023-07-26 9:29 ` David Laight
2023-07-27 5:20 ` kernel test robot
` (2 subsequent siblings)
3 siblings, 1 reply; 45+ messages in thread
From: kernel test robot @ 2023-07-25 19:36 UTC (permalink / raw)
To: David Laight, 'linux-kernel@vger.kernel.org',
'Andy Shevchenko', 'Andrew Morton',
'Matthew Wilcox (Oracle)', 'Christoph Hellwig',
'Jason A. Donenfeld'
Cc: oe-kbuild-all, Linux Memory Management List
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master v6.5-rc3 next-20230725]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/48c2cd0407f14859919d4fcbe526234a%40AcuMS.aculab.com
patch subject: [PATCH next resend 5/5] minmax: Relax check to allow comparison between int and small unsigned constants.
config: riscv-randconfig-r024-20230725 (https://download.01.org/0day-ci/archive/20230726/202307260303.3ftEpZRU-lkp@intel.com/config)
compiler: riscv32-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230726/202307260303.3ftEpZRU-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307260303.3ftEpZRU-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from include/linux/kernel.h:27,
from include/linux/cpumask.h:10,
from include/linux/smp.h:13,
from include/linux/lockdep.h:14,
from include/linux/mutex.h:17,
from include/linux/notifier.h:14,
from include/linux/kprobes.h:21,
from include/linux/kgdb.h:19,
from include/linux/fb.h:6,
from drivers/gpu/drm/drm_modes.c:35:
drivers/gpu/drm/drm_modes.c: In function 'drm_mode_parse_command_line_for_connector':
>> include/linux/minmax.h:23:22: warning: ordered comparison of pointer with integer zero [-Wextra]
23 | ((x) >= 0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__))
| ^~
include/linux/minmax.h:36:27: note: in definition of macro '__cmp'
36 | #define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y))
| ^
include/linux/minmax.h:25:47: note: in expansion of macro '__is_noneg_int'
25 | #define __int_const(x) __builtin_choose_expr(__is_noneg_int(x), (int)(long)(x), (x))
| ^~~~~~~~~~~~~~
include/linux/minmax.h:47:27: note: in expansion of macro '__int_const'
47 | __cmp(op, __int_const(x), __int_const(y)), \
| ^~~~~~~~~~~
include/linux/minmax.h:81:25: note: in expansion of macro '__careful_cmp'
81 | #define max(x, y) __careful_cmp(max, x, y)
| ^~~~~~~~~~~~~
drivers/gpu/drm/drm_modes.c:2474:29: note: in expansion of macro 'max'
2474 | extra_ptr = max(bpp_end_ptr, refresh_end_ptr);
| ^~~
>> include/linux/minmax.h:23:22: warning: ordered comparison of pointer with integer zero [-Wextra]
23 | ((x) >= 0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__))
| ^~
include/linux/minmax.h:36:45: note: in definition of macro '__cmp'
36 | #define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y))
| ^
include/linux/minmax.h:25:47: note: in expansion of macro '__is_noneg_int'
25 | #define __int_const(x) __builtin_choose_expr(__is_noneg_int(x), (int)(long)(x), (x))
| ^~~~~~~~~~~~~~
include/linux/minmax.h:47:43: note: in expansion of macro '__int_const'
47 | __cmp(op, __int_const(x), __int_const(y)), \
| ^~~~~~~~~~~
include/linux/minmax.h:81:25: note: in expansion of macro '__careful_cmp'
81 | #define max(x, y) __careful_cmp(max, x, y)
| ^~~~~~~~~~~~~
drivers/gpu/drm/drm_modes.c:2474:29: note: in expansion of macro 'max'
2474 | extra_ptr = max(bpp_end_ptr, refresh_end_ptr);
| ^~~
>> include/linux/minmax.h:23:22: warning: ordered comparison of pointer with integer zero [-Wextra]
23 | ((x) >= 0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__))
| ^~
include/linux/minmax.h:36:51: note: in definition of macro '__cmp'
36 | #define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y))
| ^
include/linux/minmax.h:25:47: note: in expansion of macro '__is_noneg_int'
25 | #define __int_const(x) __builtin_choose_expr(__is_noneg_int(x), (int)(long)(x), (x))
| ^~~~~~~~~~~~~~
include/linux/minmax.h:47:27: note: in expansion of macro '__int_const'
47 | __cmp(op, __int_const(x), __int_const(y)), \
| ^~~~~~~~~~~
include/linux/minmax.h:81:25: note: in expansion of macro '__careful_cmp'
81 | #define max(x, y) __careful_cmp(max, x, y)
| ^~~~~~~~~~~~~
drivers/gpu/drm/drm_modes.c:2474:29: note: in expansion of macro 'max'
2474 | extra_ptr = max(bpp_end_ptr, refresh_end_ptr);
| ^~~
>> include/linux/minmax.h:23:22: warning: ordered comparison of pointer with integer zero [-Wextra]
23 | ((x) >= 0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__))
| ^~
include/linux/minmax.h:36:57: note: in definition of macro '__cmp'
36 | #define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y))
| ^
include/linux/minmax.h:25:47: note: in expansion of macro '__is_noneg_int'
25 | #define __int_const(x) __builtin_choose_expr(__is_noneg_int(x), (int)(long)(x), (x))
| ^~~~~~~~~~~~~~
include/linux/minmax.h:47:43: note: in expansion of macro '__int_const'
47 | __cmp(op, __int_const(x), __int_const(y)), \
| ^~~~~~~~~~~
include/linux/minmax.h:81:25: note: in expansion of macro '__careful_cmp'
81 | #define max(x, y) __careful_cmp(max, x, y)
| ^~~~~~~~~~~~~
drivers/gpu/drm/drm_modes.c:2474:29: note: in expansion of macro 'max'
2474 | extra_ptr = max(bpp_end_ptr, refresh_end_ptr);
| ^~~
>> include/linux/minmax.h:23:22: warning: ordered comparison of pointer with integer zero [-Wextra]
23 | ((x) >= 0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__))
| ^~
include/linux/minmax.h:25:47: note: in expansion of macro '__is_noneg_int'
25 | #define __int_const(x) __builtin_choose_expr(__is_noneg_int(x), (int)(long)(x), (x))
| ^~~~~~~~~~~~~~
include/linux/minmax.h:39:16: note: in expansion of macro '__int_const'
39 | typeof(__int_const(x)) unique_x = (x); \
| ^~~~~~~~~~~
include/linux/minmax.h:48:17: note: in expansion of macro '__cmp_once'
48 | __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
| ^~~~~~~~~~
include/linux/minmax.h:81:25: note: in expansion of macro '__careful_cmp'
81 | #define max(x, y) __careful_cmp(max, x, y)
| ^~~~~~~~~~~~~
drivers/gpu/drm/drm_modes.c:2474:29: note: in expansion of macro 'max'
2474 | extra_ptr = max(bpp_end_ptr, refresh_end_ptr);
| ^~~
>> include/linux/minmax.h:23:22: warning: ordered comparison of pointer with integer zero [-Wextra]
23 | ((x) >= 0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__))
| ^~
include/linux/minmax.h:25:47: note: in expansion of macro '__is_noneg_int'
25 | #define __int_const(x) __builtin_choose_expr(__is_noneg_int(x), (int)(long)(x), (x))
| ^~~~~~~~~~~~~~
include/linux/minmax.h:40:16: note: in expansion of macro '__int_const'
40 | typeof(__int_const(y)) unique_y = (y); \
| ^~~~~~~~~~~
include/linux/minmax.h:48:17: note: in expansion of macro '__cmp_once'
48 | __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
| ^~~~~~~~~~
include/linux/minmax.h:81:25: note: in expansion of macro '__careful_cmp'
81 | #define max(x, y) __careful_cmp(max, x, y)
| ^~~~~~~~~~~~~
drivers/gpu/drm/drm_modes.c:2474:29: note: in expansion of macro 'max'
2474 | extra_ptr = max(bpp_end_ptr, refresh_end_ptr);
| ^~~
In file included from include/linux/init.h:5,
from include/linux/printk.h:6,
from include/asm-generic/bug.h:22,
from arch/riscv/include/asm/bug.h:83,
from include/linux/bug.h:5,
from arch/riscv/include/asm/cmpxchg.h:9,
from arch/riscv/include/asm/atomic.h:19,
from include/linux/atomic.h:7,
from include/linux/refcount.h:95,
from include/linux/fb.h:5:
>> include/linux/minmax.h:23:22: warning: ordered comparison of pointer with integer zero [-Wextra]
23 | ((x) >= 0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__))
| ^~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/minmax.h:41:9: note: in expansion of macro 'static_assert'
41 | static_assert(__types_ok(x, y), \
| ^~~~~~~~~~~~~
include/linux/minmax.h:31:17: note: in expansion of macro '__is_noneg_int'
31 | __is_noneg_int(x) || __is_noneg_int(y))
| ^~~~~~~~~~~~~~
include/linux/minmax.h:41:23: note: in expansion of macro '__types_ok'
41 | static_assert(__types_ok(x, y), \
| ^~~~~~~~~~
include/linux/minmax.h:48:17: note: in expansion of macro '__cmp_once'
48 | __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
| ^~~~~~~~~~
include/linux/minmax.h:81:25: note: in expansion of macro '__careful_cmp'
81 | #define max(x, y) __careful_cmp(max, x, y)
| ^~~~~~~~~~~~~
drivers/gpu/drm/drm_modes.c:2474:29: note: in expansion of macro 'max'
2474 | extra_ptr = max(bpp_end_ptr, refresh_end_ptr);
| ^~~
>> include/linux/minmax.h:23:22: warning: ordered comparison of pointer with integer zero [-Wextra]
23 | ((x) >= 0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__))
| ^~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/minmax.h:41:9: note: in expansion of macro 'static_assert'
41 | static_assert(__types_ok(x, y), \
| ^~~~~~~~~~~~~
include/linux/minmax.h:31:38: note: in expansion of macro '__is_noneg_int'
31 | __is_noneg_int(x) || __is_noneg_int(y))
| ^~~~~~~~~~~~~~
include/linux/minmax.h:41:23: note: in expansion of macro '__types_ok'
41 | static_assert(__types_ok(x, y), \
| ^~~~~~~~~~
include/linux/minmax.h:48:17: note: in expansion of macro '__cmp_once'
48 | __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
| ^~~~~~~~~~
include/linux/minmax.h:81:25: note: in expansion of macro '__careful_cmp'
81 | #define max(x, y) __careful_cmp(max, x, y)
| ^~~~~~~~~~~~~
drivers/gpu/drm/drm_modes.c:2474:29: note: in expansion of macro 'max'
2474 | extra_ptr = max(bpp_end_ptr, refresh_end_ptr);
| ^~~
vim +23 include/linux/minmax.h
6
7 /*
8 * min()/max()/clamp() macros must accomplish three things:
9 *
10 * - Avoid multiple evaluations of the arguments (so side-effects like
11 * "x++" happen only once) when non-constant.
12 * - Perform signed v unsigned type-checking (to generate compile
13 * errors instead of nasty runtime surprises).
14 * Constants from 0 to INT_MAX are cast to (int) so can be used
15 * in comparisons with signed types.
16 * - Retain result as a constant expressions when called with only
17 * constant expressions (to avoid tripping VLA warnings in stack
18 * allocation usage).
19 */
20
21 #define __is_noneg_int(x) \
22 __builtin_choose_expr(!__is_constexpr(x), false, \
> 23 ((x) >= 0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__))
24
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
* RE: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
2023-07-25 18:33 ` kernel test robot
@ 2023-07-26 9:19 ` David Laight
2023-07-26 9:50 ` Marc Zyngier
0 siblings, 1 reply; 45+ messages in thread
From: David Laight @ 2023-07-26 9:19 UTC (permalink / raw)
To: 'kernel test robot',
'linux-kernel@vger.kernel.org', 'Andy Shevchenko',
'Andrew Morton', 'Matthew Wilcox (Oracle)',
'Christoph Hellwig', 'Jason A. Donenfeld'
Cc: llvm, oe-kbuild-all, Linux Memory Management List,
'maz@kernel.org',
Rob Herring
> From: kernel test robot <lkp@intel.com>
> Sent: 25 July 2023 19:33
...
>
> All errors (new ones prefixed by >>):
>
> >> drivers/irqchip/irq-mips-cpu.c:288:1: error: call to undeclared function '__typecheck'; ISO C99 and
> later do not support implicit function declarations [-Wimplicit-function-declaration]
> 288 | IRQCHIP_DECLARE(cpu_intc, "mti,cpu-interrupt-controller", mips_cpu_irq_of_init);
> | ^
> include/linux/irqchip.h:37:38: note: expanded from macro 'IRQCHIP_DECLARE'
> 37 | OF_DECLARE_2(irqchip, name, compat, typecheck_irq_init_cb(fn))
> | ^
> include/linux/irqchip.h:24:3: note: expanded from macro 'typecheck_irq_init_cb'
> 24 | (__typecheck(typecheck_irq_init_cb, &fn) ? fn : fn)
> | ^
> >> drivers/irqchip/irq-mips-cpu.c:288:1: error: initializer element is not a compile-time constant
> 288 | IRQCHIP_DECLARE(cpu_intc, "mti,cpu-interrupt-controller", mips_cpu_irq_of_init);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/irqchip.h:37:2: note: expanded from macro 'IRQCHIP_DECLARE'
> 37 | OF_DECLARE_2(irqchip, name, compat, typecheck_irq_init_cb(fn))
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/of.h:1493:3: note: expanded from macro 'OF_DECLARE_2'
> 1493 | _OF_DECLARE(table, name, compat, fn, of_init_fn_2)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/of.h:1481:2: note: expanded from macro '_OF_DECLARE'
> 1481 | _OF_DECLARE_STUB(table, name, compat, fn, fn_type)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/of.h:1470:16: note: expanded from macro '_OF_DECLARE_STUB'
> 1470 | .data = (fn == (fn_type)NULL) ? fn : fn }
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It looks like irqchip.h is using __typecheck() which is really
an internal part of the implementation of min() and max().
The patched version doesn't use it - hence the build fail.
I can re-instate it, but this all looks wrong to me.
The type of typecheck_irq_init_cb is the same as that of fn_type (although
they are defined separately).
Both headers seem to be testing the type - and it must match both.
So if the test in of.h worked the one in irqchip.h wouldn't have been added.
So I suspect it doesn't actually do anything - the RHS is NULL, the type
probably doesn't matter.
Possibly:
.data = {sizeof ((fn) == (fn_type)(fn)) ? fn : fn }
would actually generate the required compile-time error.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
^ permalink raw reply [flat|nested] 45+ messages in thread
* RE: [PATCH next resend 5/5] minmax: Relax check to allow comparison between int and small unsigned constants.
2023-07-25 19:36 ` kernel test robot
@ 2023-07-26 9:29 ` David Laight
0 siblings, 0 replies; 45+ messages in thread
From: David Laight @ 2023-07-26 9:29 UTC (permalink / raw)
To: 'kernel test robot',
'linux-kernel@vger.kernel.org', 'Andy Shevchenko',
'Andrew Morton', 'Matthew Wilcox (Oracle)',
'Christoph Hellwig', 'Jason A. Donenfeld'
Cc: oe-kbuild-all, Linux Memory Management List
From: kernel test robot <lkp@intel.com>
> Sent: 25 July 2023 20:37
>
...
> drivers/gpu/drm/drm_modes.c: In function 'drm_mode_parse_command_line_for_connector':
> >> include/linux/minmax.h:23:22: warning: ordered comparison of pointer with integer zero [-Wextra]
> 23 | ((x) >= 0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__))
> | ^~
...
> drivers/gpu/drm/drm_modes.c:2474:29: note: in expansion of macro 'max'
> 2474 | extra_ptr = max(bpp_end_ptr, refresh_end_ptr);
> | ^~~
There are a handful of annoying uses of min/max with pointers.
I'll fix this in v2 by adding a cast to the 0.
(I was expecting an error for unsigned types.)
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
2023-07-26 9:19 ` David Laight
@ 2023-07-26 9:50 ` Marc Zyngier
2023-07-26 10:25 ` David Laight
0 siblings, 1 reply; 45+ messages in thread
From: Marc Zyngier @ 2023-07-26 9:50 UTC (permalink / raw)
To: David Laight
Cc: 'kernel test robot',
'linux-kernel@vger.kernel.org', 'Andy Shevchenko',
'Andrew Morton', 'Matthew Wilcox (Oracle)',
'Christoph Hellwig', 'Jason A. Donenfeld',
llvm, oe-kbuild-all, Linux Memory Management List, Rob Herring
On Wed, 26 Jul 2023 10:19:48 +0100,
David Laight <David.Laight@ACULAB.COM> wrote:
>
> > From: kernel test robot <lkp@intel.com>
> > Sent: 25 July 2023 19:33
> ...
> >
> > All errors (new ones prefixed by >>):
> >
> > >> drivers/irqchip/irq-mips-cpu.c:288:1: error: call to undeclared function '__typecheck'; ISO C99 and
> > later do not support implicit function declarations [-Wimplicit-function-declaration]
> > 288 | IRQCHIP_DECLARE(cpu_intc, "mti,cpu-interrupt-controller", mips_cpu_irq_of_init);
> > | ^
> > include/linux/irqchip.h:37:38: note: expanded from macro 'IRQCHIP_DECLARE'
> > 37 | OF_DECLARE_2(irqchip, name, compat, typecheck_irq_init_cb(fn))
> > | ^
> > include/linux/irqchip.h:24:3: note: expanded from macro 'typecheck_irq_init_cb'
> > 24 | (__typecheck(typecheck_irq_init_cb, &fn) ? fn : fn)
> > | ^
> > >> drivers/irqchip/irq-mips-cpu.c:288:1: error: initializer element is not a compile-time constant
> > 288 | IRQCHIP_DECLARE(cpu_intc, "mti,cpu-interrupt-controller", mips_cpu_irq_of_init);
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > include/linux/irqchip.h:37:2: note: expanded from macro 'IRQCHIP_DECLARE'
> > 37 | OF_DECLARE_2(irqchip, name, compat, typecheck_irq_init_cb(fn))
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > include/linux/of.h:1493:3: note: expanded from macro 'OF_DECLARE_2'
> > 1493 | _OF_DECLARE(table, name, compat, fn, of_init_fn_2)
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > include/linux/of.h:1481:2: note: expanded from macro '_OF_DECLARE'
> > 1481 | _OF_DECLARE_STUB(table, name, compat, fn, fn_type)
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > include/linux/of.h:1470:16: note: expanded from macro '_OF_DECLARE_STUB'
> > 1470 | .data = (fn == (fn_type)NULL) ? fn : fn }
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> It looks like irqchip.h is using __typecheck() which is really
> an internal part of the implementation of min() and max().
> The patched version doesn't use it - hence the build fail.
> I can re-instate it, but this all looks wrong to me.
Please see f1985002839a ("irqchip: Provide stronger type checking for
IRQCHIP_MATCH/IRQCHIP_DECLARE") for the rationale.
Given that this has uncovered a number of bugs, I'm not letting this
go without an equivalent replacement.
> The type of typecheck_irq_init_cb is the same as that of fn_type (although
> they are defined separately).
> Both headers seem to be testing the type - and it must match both.
> So if the test in of.h worked the one in irqchip.h wouldn't have been added.
> So I suspect it doesn't actually do anything - the RHS is NULL, the type
> probably doesn't matter.
They are used in different contexts. See IRQCHIP_MATCH().
M.
--
Without deviation from the norm, progress is not possible.
^ permalink raw reply [flat|nested] 45+ messages in thread
* RE: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
2023-07-26 9:50 ` Marc Zyngier
@ 2023-07-26 10:25 ` David Laight
0 siblings, 0 replies; 45+ messages in thread
From: David Laight @ 2023-07-26 10:25 UTC (permalink / raw)
To: 'Marc Zyngier'
Cc: 'kernel test robot',
'linux-kernel@vger.kernel.org', 'Andy Shevchenko',
'Andrew Morton', 'Matthew Wilcox (Oracle)',
'Christoph Hellwig', 'Jason A. Donenfeld',
llvm, oe-kbuild-all, Linux Memory Management List, Rob Herring
From: Marc Zyngier
> Sent: 26 July 2023 10:51
>
> On Wed, 26 Jul 2023 10:19:48 +0100,
> David Laight <David.Laight@ACULAB.COM> wrote:
> >
> > > From: kernel test robot <lkp@intel.com>
> > > Sent: 25 July 2023 19:33
> > ...
> > >
> > > All errors (new ones prefixed by >>):
> > >
> > > >> drivers/irqchip/irq-mips-cpu.c:288:1: error: call to undeclared function '__typecheck'; ISO C99
> and
> > > later do not support implicit function declarations [-Wimplicit-function-declaration]
> > > 288 | IRQCHIP_DECLARE(cpu_intc, "mti,cpu-interrupt-controller", mips_cpu_irq_of_init);
> > > | ^
> > > include/linux/irqchip.h:37:38: note: expanded from macro 'IRQCHIP_DECLARE'
> > > 37 | OF_DECLARE_2(irqchip, name, compat, typecheck_irq_init_cb(fn))
> > > | ^
> > > include/linux/irqchip.h:24:3: note: expanded from macro 'typecheck_irq_init_cb'
> > > 24 | (__typecheck(typecheck_irq_init_cb, &fn) ? fn : fn)
> > > | ^
> > > >> drivers/irqchip/irq-mips-cpu.c:288:1: error: initializer element is not a compile-time constant
> > > 288 | IRQCHIP_DECLARE(cpu_intc, "mti,cpu-interrupt-controller", mips_cpu_irq_of_init);
> > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > include/linux/irqchip.h:37:2: note: expanded from macro 'IRQCHIP_DECLARE'
> > > 37 | OF_DECLARE_2(irqchip, name, compat, typecheck_irq_init_cb(fn))
> > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > include/linux/of.h:1493:3: note: expanded from macro 'OF_DECLARE_2'
> > > 1493 | _OF_DECLARE(table, name, compat, fn, of_init_fn_2)
> > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > include/linux/of.h:1481:2: note: expanded from macro '_OF_DECLARE'
> > > 1481 | _OF_DECLARE_STUB(table, name, compat, fn, fn_type)
> > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > include/linux/of.h:1470:16: note: expanded from macro '_OF_DECLARE_STUB'
> > > 1470 | .data = (fn == (fn_type)NULL) ? fn : fn }
> > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> > It looks like irqchip.h is using __typecheck() which is really
> > an internal part of the implementation of min() and max().
> > The patched version doesn't use it - hence the build fail.
> > I can re-instate it, but this all looks wrong to me.
>
> Please see f1985002839a ("irqchip: Provide stronger type checking for
> IRQCHIP_MATCH/IRQCHIP_DECLARE") for the rationale.
>
> Given that this has uncovered a number of bugs, I'm not letting this
> go without an equivalent replacement.
..
>
> They are used in different contexts. See IRQCHIP_MATCH().
Ah, I was seeing the error in the expansion of IRQCHIP_DECLARE()
which is doing the type check twice.
It can just pass 'fn'.
The cast NULL check does work.
So IRQCHIP_MATCH() can use the simpler 'fn = (fn_type)NULL ? fn : fn' test
that _OF_DECLARE_STUB() uses.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 5/5] minmax: Relax check to allow comparison between int and small unsigned constants.
2023-07-25 11:54 ` [PATCH next resend 5/5] minmax: Relax check to allow comparison between int and small unsigned constants David Laight
2023-07-25 19:36 ` kernel test robot
@ 2023-07-27 5:20 ` kernel test robot
2023-07-28 7:15 ` kernel test robot
2023-07-28 8:08 ` kernel test robot
3 siblings, 0 replies; 45+ messages in thread
From: kernel test robot @ 2023-07-27 5:20 UTC (permalink / raw)
To: David Laight, 'linux-kernel@vger.kernel.org',
'Andy Shevchenko', 'Andrew Morton',
'Matthew Wilcox (Oracle)', 'Christoph Hellwig',
'Jason A. Donenfeld'
Cc: oe-kbuild-all, Linux Memory Management List
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master crng-random/master v6.5-rc3 next-20230726]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/48c2cd0407f14859919d4fcbe526234a%40AcuMS.aculab.com
patch subject: [PATCH next resend 5/5] minmax: Relax check to allow comparison between int and small unsigned constants.
config: x86_64-randconfig-r071-20230725 (https://download.01.org/0day-ci/archive/20230727/202307271340.F1VOMz4L-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230727/202307271340.F1VOMz4L-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307271340.F1VOMz4L-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> mm/percpu.c:3102:24: sparse: sparse: incompatible types for operation (>=):
>> mm/percpu.c:3102:24: sparse: void *ptr
>> mm/percpu.c:3102:24: sparse: int
>> mm/percpu.c:3102:24: sparse: sparse: bad constant expression type
>> mm/percpu.c:3102:24: sparse: sparse: incompatible types for operation (>=):
>> mm/percpu.c:3102:24: sparse: void *[assigned] ptr
>> mm/percpu.c:3102:24: sparse: int
>> mm/percpu.c:3102:24: sparse: sparse: incompatible types for operation (>=):
>> mm/percpu.c:3102:24: sparse: void *base
>> mm/percpu.c:3102:24: sparse: int
>> mm/percpu.c:3102:24: sparse: sparse: incompatible types for operation (>=):
>> mm/percpu.c:3102:24: sparse: void *[assigned] ptr
>> mm/percpu.c:3102:24: sparse: int
>> mm/percpu.c:3102:24: sparse: sparse: incompatible types for operation (>=):
>> mm/percpu.c:3102:24: sparse: void *base
>> mm/percpu.c:3102:24: sparse: int
mm/percpu.c:3102:24: sparse: sparse: incompatible types for operation (<):
mm/percpu.c:3102:24: sparse: bad type __UNIQUE_ID___x458
mm/percpu.c:3102:24: sparse: bad type __UNIQUE_ID___y459
--
>> fs/ntfs3/lznt.c:157:16: sparse: sparse: incompatible types for operation (>=):
>> fs/ntfs3/lznt.c:157:16: sparse: unsigned char [usertype] *
>> fs/ntfs3/lznt.c:157:16: sparse: int
>> fs/ntfs3/lznt.c:157:16: sparse: sparse: bad constant expression type
>> fs/ntfs3/lznt.c:157:16: sparse: sparse: incompatible types for operation (>=):
>> fs/ntfs3/lznt.c:157:16: sparse: unsigned char [usertype] *
>> fs/ntfs3/lznt.c:157:16: sparse: int
>> fs/ntfs3/lznt.c:157:16: sparse: sparse: incompatible types for operation (>=):
>> fs/ntfs3/lznt.c:157:16: sparse: unsigned char [usertype] *cmpr_end
>> fs/ntfs3/lznt.c:157:16: sparse: int
>> fs/ntfs3/lznt.c:157:16: sparse: sparse: incompatible types for operation (>=):
>> fs/ntfs3/lznt.c:157:16: sparse: unsigned char [usertype] *
>> fs/ntfs3/lznt.c:157:16: sparse: int
>> fs/ntfs3/lznt.c:157:16: sparse: sparse: incompatible types for operation (>=):
>> fs/ntfs3/lznt.c:157:16: sparse: unsigned char [usertype] *cmpr_end
>> fs/ntfs3/lznt.c:157:16: sparse: int
fs/ntfs3/lznt.c:157:16: sparse: sparse: incompatible types for operation (<):
fs/ntfs3/lznt.c:157:16: sparse: bad type __UNIQUE_ID___x333
fs/ntfs3/lznt.c:157:16: sparse: bad type __UNIQUE_ID___y334
vim +3102 mm/percpu.c
3c9a024fde58b0 Tejun Heo 2010-09-09 3022
3c9a024fde58b0 Tejun Heo 2010-09-09 3023 #if defined(BUILD_EMBED_FIRST_CHUNK)
66c3a75772247c Tejun Heo 2009-03-10 3024 /**
66c3a75772247c Tejun Heo 2009-03-10 3025 * pcpu_embed_first_chunk - embed the first percpu chunk into bootmem
66c3a75772247c Tejun Heo 2009-03-10 3026 * @reserved_size: the size of reserved percpu area in bytes
4ba6ce250e406b Tejun Heo 2010-06-27 3027 * @dyn_size: minimum free size for dynamic allocation in bytes
c8826dd538602d Tejun Heo 2009-08-14 3028 * @atom_size: allocation atom size
c8826dd538602d Tejun Heo 2009-08-14 3029 * @cpu_distance_fn: callback to determine distance between cpus, optional
1ca3fb3abd2b61 Kefeng Wang 2022-01-19 3030 * @cpu_to_nd_fn: callback to convert cpu to it's node, optional
66c3a75772247c Tejun Heo 2009-03-10 3031 *
66c3a75772247c Tejun Heo 2009-03-10 3032 * This is a helper to ease setting up embedded first percpu chunk and
66c3a75772247c Tejun Heo 2009-03-10 3033 * can be called where pcpu_setup_first_chunk() is expected.
66c3a75772247c Tejun Heo 2009-03-10 3034 *
66c3a75772247c Tejun Heo 2009-03-10 3035 * If this function is used to setup the first chunk, it is allocated
23f917169ef157 Kefeng Wang 2022-01-19 3036 * by calling pcpu_fc_alloc and used as-is without being mapped into
c8826dd538602d Tejun Heo 2009-08-14 3037 * vmalloc area. Allocations are always whole multiples of @atom_size
c8826dd538602d Tejun Heo 2009-08-14 3038 * aligned to @atom_size.
c8826dd538602d Tejun Heo 2009-08-14 3039 *
c8826dd538602d Tejun Heo 2009-08-14 3040 * This enables the first chunk to piggy back on the linear physical
c8826dd538602d Tejun Heo 2009-08-14 3041 * mapping which often uses larger page size. Please note that this
c8826dd538602d Tejun Heo 2009-08-14 3042 * can result in very sparse cpu->unit mapping on NUMA machines thus
c8826dd538602d Tejun Heo 2009-08-14 3043 * requiring large vmalloc address space. Don't use this allocator if
c8826dd538602d Tejun Heo 2009-08-14 3044 * vmalloc space is not orders of magnitude larger than distances
c8826dd538602d Tejun Heo 2009-08-14 3045 * between node memory addresses (ie. 32bit NUMA machines).
66c3a75772247c Tejun Heo 2009-03-10 3046 *
4ba6ce250e406b Tejun Heo 2010-06-27 3047 * @dyn_size specifies the minimum dynamic area size.
66c3a75772247c Tejun Heo 2009-03-10 3048 *
66c3a75772247c Tejun Heo 2009-03-10 3049 * If the needed size is smaller than the minimum or specified unit
23f917169ef157 Kefeng Wang 2022-01-19 3050 * size, the leftover is returned using pcpu_fc_free.
66c3a75772247c Tejun Heo 2009-03-10 3051 *
66c3a75772247c Tejun Heo 2009-03-10 3052 * RETURNS:
fb435d5233f8b6 Tejun Heo 2009-08-14 3053 * 0 on success, -errno on failure.
66c3a75772247c Tejun Heo 2009-03-10 3054 */
4ba6ce250e406b Tejun Heo 2010-06-27 3055 int __init pcpu_embed_first_chunk(size_t reserved_size, size_t dyn_size,
c8826dd538602d Tejun Heo 2009-08-14 3056 size_t atom_size,
c8826dd538602d Tejun Heo 2009-08-14 3057 pcpu_fc_cpu_distance_fn_t cpu_distance_fn,
23f917169ef157 Kefeng Wang 2022-01-19 3058 pcpu_fc_cpu_to_node_fn_t cpu_to_nd_fn)
66c3a75772247c Tejun Heo 2009-03-10 3059 {
c8826dd538602d Tejun Heo 2009-08-14 3060 void *base = (void *)ULONG_MAX;
c8826dd538602d Tejun Heo 2009-08-14 3061 void **areas = NULL;
fd1e8a1fe2b54d Tejun Heo 2009-08-14 3062 struct pcpu_alloc_info *ai;
93c76b6b2faaad zijun_hu 2016-10-05 3063 size_t size_sum, areas_size;
93c76b6b2faaad zijun_hu 2016-10-05 3064 unsigned long max_distance;
163fa23435cc9c Kefeng Wang 2019-07-03 3065 int group, i, highest_group, rc = 0;
66c3a75772247c Tejun Heo 2009-03-10 3066
c8826dd538602d Tejun Heo 2009-08-14 3067 ai = pcpu_build_alloc_info(reserved_size, dyn_size, atom_size,
c8826dd538602d Tejun Heo 2009-08-14 3068 cpu_distance_fn);
fd1e8a1fe2b54d Tejun Heo 2009-08-14 3069 if (IS_ERR(ai))
fd1e8a1fe2b54d Tejun Heo 2009-08-14 3070 return PTR_ERR(ai);
66c3a75772247c Tejun Heo 2009-03-10 3071
fd1e8a1fe2b54d Tejun Heo 2009-08-14 3072 size_sum = ai->static_size + ai->reserved_size + ai->dyn_size;
c8826dd538602d Tejun Heo 2009-08-14 3073 areas_size = PFN_ALIGN(ai->nr_groups * sizeof(void *));
fa8a7094ba1679 Tejun Heo 2009-06-22 3074
26fb3dae0a1ec7 Mike Rapoport 2019-03-11 3075 areas = memblock_alloc(areas_size, SMP_CACHE_BYTES);
c8826dd538602d Tejun Heo 2009-08-14 3076 if (!areas) {
fb435d5233f8b6 Tejun Heo 2009-08-14 3077 rc = -ENOMEM;
c8826dd538602d Tejun Heo 2009-08-14 3078 goto out_free;
fa8a7094ba1679 Tejun Heo 2009-06-22 3079 }
66c3a75772247c Tejun Heo 2009-03-10 3080
9b7396624a7b50 zijun_hu 2016-10-05 3081 /* allocate, copy and determine base address & max_distance */
9b7396624a7b50 zijun_hu 2016-10-05 3082 highest_group = 0;
c8826dd538602d Tejun Heo 2009-08-14 3083 for (group = 0; group < ai->nr_groups; group++) {
c8826dd538602d Tejun Heo 2009-08-14 3084 struct pcpu_group_info *gi = &ai->groups[group];
c8826dd538602d Tejun Heo 2009-08-14 3085 unsigned int cpu = NR_CPUS;
c8826dd538602d Tejun Heo 2009-08-14 3086 void *ptr;
c8826dd538602d Tejun Heo 2009-08-14 3087
c8826dd538602d Tejun Heo 2009-08-14 3088 for (i = 0; i < gi->nr_units && cpu == NR_CPUS; i++)
c8826dd538602d Tejun Heo 2009-08-14 3089 cpu = gi->cpu_map[i];
c8826dd538602d Tejun Heo 2009-08-14 3090 BUG_ON(cpu == NR_CPUS);
c8826dd538602d Tejun Heo 2009-08-14 3091
c8826dd538602d Tejun Heo 2009-08-14 3092 /* allocate space for the whole group */
23f917169ef157 Kefeng Wang 2022-01-19 3093 ptr = pcpu_fc_alloc(cpu, gi->nr_units * ai->unit_size, atom_size, cpu_to_nd_fn);
c8826dd538602d Tejun Heo 2009-08-14 3094 if (!ptr) {
c8826dd538602d Tejun Heo 2009-08-14 3095 rc = -ENOMEM;
c8826dd538602d Tejun Heo 2009-08-14 3096 goto out_free_areas;
c8826dd538602d Tejun Heo 2009-08-14 3097 }
f528f0b8e53d73 Catalin Marinas 2011-09-26 3098 /* kmemleak tracks the percpu allocations separately */
a317ebccaa3609 Patrick Wang 2022-07-05 3099 kmemleak_ignore_phys(__pa(ptr));
c8826dd538602d Tejun Heo 2009-08-14 3100 areas[group] = ptr;
c8826dd538602d Tejun Heo 2009-08-14 3101
c8826dd538602d Tejun Heo 2009-08-14 @3102 base = min(ptr, base);
9b7396624a7b50 zijun_hu 2016-10-05 3103 if (ptr > areas[highest_group])
9b7396624a7b50 zijun_hu 2016-10-05 3104 highest_group = group;
9b7396624a7b50 zijun_hu 2016-10-05 3105 }
9b7396624a7b50 zijun_hu 2016-10-05 3106 max_distance = areas[highest_group] - base;
9b7396624a7b50 zijun_hu 2016-10-05 3107 max_distance += ai->unit_size * ai->groups[highest_group].nr_units;
9b7396624a7b50 zijun_hu 2016-10-05 3108
9b7396624a7b50 zijun_hu 2016-10-05 3109 /* warn if maximum distance is further than 75% of vmalloc space */
9b7396624a7b50 zijun_hu 2016-10-05 3110 if (max_distance > VMALLOC_TOTAL * 3 / 4) {
9b7396624a7b50 zijun_hu 2016-10-05 3111 pr_warn("max_distance=0x%lx too large for vmalloc space 0x%lx\n",
9b7396624a7b50 zijun_hu 2016-10-05 3112 max_distance, VMALLOC_TOTAL);
9b7396624a7b50 zijun_hu 2016-10-05 3113 #ifdef CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK
9b7396624a7b50 zijun_hu 2016-10-05 3114 /* and fail if we have fallback */
9b7396624a7b50 zijun_hu 2016-10-05 3115 rc = -EINVAL;
9b7396624a7b50 zijun_hu 2016-10-05 3116 goto out_free_areas;
9b7396624a7b50 zijun_hu 2016-10-05 3117 #endif
42b64281453249 Tejun Heo 2012-04-27 3118 }
42b64281453249 Tejun Heo 2012-04-27 3119
42b64281453249 Tejun Heo 2012-04-27 3120 /*
42b64281453249 Tejun Heo 2012-04-27 3121 * Copy data and free unused parts. This should happen after all
42b64281453249 Tejun Heo 2012-04-27 3122 * allocations are complete; otherwise, we may end up with
42b64281453249 Tejun Heo 2012-04-27 3123 * overlapping groups.
42b64281453249 Tejun Heo 2012-04-27 3124 */
42b64281453249 Tejun Heo 2012-04-27 3125 for (group = 0; group < ai->nr_groups; group++) {
42b64281453249 Tejun Heo 2012-04-27 3126 struct pcpu_group_info *gi = &ai->groups[group];
42b64281453249 Tejun Heo 2012-04-27 3127 void *ptr = areas[group];
66c3a75772247c Tejun Heo 2009-03-10 3128
c8826dd538602d Tejun Heo 2009-08-14 3129 for (i = 0; i < gi->nr_units; i++, ptr += ai->unit_size) {
c8826dd538602d Tejun Heo 2009-08-14 3130 if (gi->cpu_map[i] == NR_CPUS) {
c8826dd538602d Tejun Heo 2009-08-14 3131 /* unused unit, free whole */
23f917169ef157 Kefeng Wang 2022-01-19 3132 pcpu_fc_free(ptr, ai->unit_size);
c8826dd538602d Tejun Heo 2009-08-14 3133 continue;
c8826dd538602d Tejun Heo 2009-08-14 3134 }
c8826dd538602d Tejun Heo 2009-08-14 3135 /* copy and return the unused part */
fd1e8a1fe2b54d Tejun Heo 2009-08-14 3136 memcpy(ptr, __per_cpu_load, ai->static_size);
23f917169ef157 Kefeng Wang 2022-01-19 3137 pcpu_fc_free(ptr + size_sum, ai->unit_size - size_sum);
c8826dd538602d Tejun Heo 2009-08-14 3138 }
66c3a75772247c Tejun Heo 2009-03-10 3139 }
66c3a75772247c Tejun Heo 2009-03-10 3140
c8826dd538602d Tejun Heo 2009-08-14 3141 /* base address is now known, determine group base offsets */
6ea529a2037ce6 Tejun Heo 2009-09-24 3142 for (group = 0; group < ai->nr_groups; group++) {
c8826dd538602d Tejun Heo 2009-08-14 3143 ai->groups[group].base_offset = areas[group] - base;
6ea529a2037ce6 Tejun Heo 2009-09-24 3144 }
c8826dd538602d Tejun Heo 2009-08-14 3145
00206a69ee32f0 Matteo Croce 2019-03-18 3146 pr_info("Embedded %zu pages/cpu s%zu r%zu d%zu u%zu\n",
00206a69ee32f0 Matteo Croce 2019-03-18 3147 PFN_DOWN(size_sum), ai->static_size, ai->reserved_size,
fd1e8a1fe2b54d Tejun Heo 2009-08-14 3148 ai->dyn_size, ai->unit_size);
66c3a75772247c Tejun Heo 2009-03-10 3149
163fa23435cc9c Kefeng Wang 2019-07-03 3150 pcpu_setup_first_chunk(ai, base);
c8826dd538602d Tejun Heo 2009-08-14 3151 goto out_free;
c8826dd538602d Tejun Heo 2009-08-14 3152
c8826dd538602d Tejun Heo 2009-08-14 3153 out_free_areas:
c8826dd538602d Tejun Heo 2009-08-14 3154 for (group = 0; group < ai->nr_groups; group++)
f851c8d8583891 Michael Holzheu 2013-09-17 3155 if (areas[group])
23f917169ef157 Kefeng Wang 2022-01-19 3156 pcpu_fc_free(areas[group],
c8826dd538602d Tejun Heo 2009-08-14 3157 ai->groups[group].nr_units * ai->unit_size);
c8826dd538602d Tejun Heo 2009-08-14 3158 out_free:
fd1e8a1fe2b54d Tejun Heo 2009-08-14 3159 pcpu_free_alloc_info(ai);
c8826dd538602d Tejun Heo 2009-08-14 3160 if (areas)
4421cca0a3e483 Mike Rapoport 2021-11-05 3161 memblock_free(areas, areas_size);
fb435d5233f8b6 Tejun Heo 2009-08-14 3162 return rc;
fa8a7094ba1679 Tejun Heo 2009-06-22 3163 }
3c9a024fde58b0 Tejun Heo 2010-09-09 3164 #endif /* BUILD_EMBED_FIRST_CHUNK */
d4b95f80399471 Tejun Heo 2009-07-04 3165
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 5/5] minmax: Relax check to allow comparison between int and small unsigned constants.
2023-07-25 11:54 ` [PATCH next resend 5/5] minmax: Relax check to allow comparison between int and small unsigned constants David Laight
2023-07-25 19:36 ` kernel test robot
2023-07-27 5:20 ` kernel test robot
@ 2023-07-28 7:15 ` kernel test robot
2023-07-28 8:08 ` kernel test robot
3 siblings, 0 replies; 45+ messages in thread
From: kernel test robot @ 2023-07-28 7:15 UTC (permalink / raw)
To: David Laight, 'linux-kernel@vger.kernel.org',
'Andy Shevchenko', 'Andrew Morton',
'Matthew Wilcox (Oracle)', 'Christoph Hellwig',
'Jason A. Donenfeld'
Cc: oe-kbuild-all, Linux Memory Management List
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master v6.5-rc3 next-20230727]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/48c2cd0407f14859919d4fcbe526234a%40AcuMS.aculab.com
patch subject: [PATCH next resend 5/5] minmax: Relax check to allow comparison between int and small unsigned constants.
config: microblaze-randconfig-r092-20230725 (https://download.01.org/0day-ci/archive/20230728/202307281520.WNoM3bxU-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230728/202307281520.WNoM3bxU-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307281520.WNoM3bxU-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> crypto/skcipher.c:80:16: sparse: sparse: incompatible types for operation (>=):
>> crypto/skcipher.c:80:16: sparse: unsigned char [usertype] *start
>> crypto/skcipher.c:80:16: sparse: int
>> crypto/skcipher.c:80:16: sparse: sparse: bad constant expression type
>> crypto/skcipher.c:80:16: sparse: sparse: incompatible types for operation (>=):
>> crypto/skcipher.c:80:16: sparse: unsigned char [usertype] *start
>> crypto/skcipher.c:80:16: sparse: int
>> crypto/skcipher.c:80:16: sparse: sparse: incompatible types for operation (>=):
>> crypto/skcipher.c:80:16: sparse: unsigned char [usertype] *end_page
>> crypto/skcipher.c:80:16: sparse: int
>> crypto/skcipher.c:80:16: sparse: sparse: incompatible types for operation (>=):
>> crypto/skcipher.c:80:16: sparse: unsigned char [usertype] *start
>> crypto/skcipher.c:80:16: sparse: int
>> crypto/skcipher.c:80:16: sparse: sparse: incompatible types for operation (>=):
>> crypto/skcipher.c:80:16: sparse: unsigned char [usertype] *end_page
>> crypto/skcipher.c:80:16: sparse: int
crypto/skcipher.c:80:16: sparse: sparse: incompatible types for operation (>):
crypto/skcipher.c:80:16: sparse: bad type __UNIQUE_ID___x297
crypto/skcipher.c:80:16: sparse: bad type __UNIQUE_ID___y298
>> crypto/skcipher.c:80:16: sparse: sparse: incompatible types for operation (>=):
>> crypto/skcipher.c:80:16: sparse: unsigned char [usertype] *start
>> crypto/skcipher.c:80:16: sparse: int
>> crypto/skcipher.c:80:16: sparse: sparse: incompatible types for operation (>=):
>> crypto/skcipher.c:80:16: sparse: unsigned char [usertype] *end_page
>> crypto/skcipher.c:80:16: sparse: int
crypto/skcipher.c:80:16: sparse: sparse: incompatible types for operation (>):
crypto/skcipher.c:80:16: sparse: bad type __UNIQUE_ID___x297
crypto/skcipher.c:80:16: sparse: bad type __UNIQUE_ID___y298
>> crypto/skcipher.c:80:16: sparse: sparse: incompatible types for operation (>=):
>> crypto/skcipher.c:80:16: sparse: unsigned char [usertype] *start
>> crypto/skcipher.c:80:16: sparse: int
>> crypto/skcipher.c:80:16: sparse: sparse: incompatible types for operation (>=):
>> crypto/skcipher.c:80:16: sparse: unsigned char [usertype] *end_page
>> crypto/skcipher.c:80:16: sparse: int
crypto/skcipher.c:80:16: sparse: sparse: incompatible types for operation (>):
crypto/skcipher.c:80:16: sparse: bad type __UNIQUE_ID___x297
crypto/skcipher.c:80:16: sparse: bad type __UNIQUE_ID___y298
>> crypto/skcipher.c:80:16: sparse: sparse: incompatible types for operation (>=):
>> crypto/skcipher.c:80:16: sparse: unsigned char [usertype] *start
>> crypto/skcipher.c:80:16: sparse: int
>> crypto/skcipher.c:80:16: sparse: sparse: incompatible types for operation (>=):
>> crypto/skcipher.c:80:16: sparse: unsigned char [usertype] *end_page
>> crypto/skcipher.c:80:16: sparse: int
crypto/skcipher.c:80:16: sparse: sparse: incompatible types for operation (>):
crypto/skcipher.c:80:16: sparse: bad type __UNIQUE_ID___x297
crypto/skcipher.c:80:16: sparse: bad type __UNIQUE_ID___y298
--
drivers/gpu/drm/drm_modes.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
>> drivers/gpu/drm/drm_modes.c:2474:29: sparse: sparse: incompatible types for operation (>=):
>> drivers/gpu/drm/drm_modes.c:2474:29: sparse: char *bpp_end_ptr
>> drivers/gpu/drm/drm_modes.c:2474:29: sparse: int
>> drivers/gpu/drm/drm_modes.c:2474:29: sparse: sparse: bad constant expression type
>> drivers/gpu/drm/drm_modes.c:2474:29: sparse: sparse: incompatible types for operation (>=):
>> drivers/gpu/drm/drm_modes.c:2474:29: sparse: char *[addressable] bpp_end_ptr
>> drivers/gpu/drm/drm_modes.c:2474:29: sparse: int
>> drivers/gpu/drm/drm_modes.c:2474:29: sparse: sparse: incompatible types for operation (>=):
>> drivers/gpu/drm/drm_modes.c:2474:29: sparse: char *[addressable] refresh_end_ptr
>> drivers/gpu/drm/drm_modes.c:2474:29: sparse: int
>> drivers/gpu/drm/drm_modes.c:2474:29: sparse: sparse: incompatible types for operation (>=):
>> drivers/gpu/drm/drm_modes.c:2474:29: sparse: char *[addressable] bpp_end_ptr
>> drivers/gpu/drm/drm_modes.c:2474:29: sparse: int
>> drivers/gpu/drm/drm_modes.c:2474:29: sparse: sparse: incompatible types for operation (>=):
>> drivers/gpu/drm/drm_modes.c:2474:29: sparse: char *[addressable] refresh_end_ptr
>> drivers/gpu/drm/drm_modes.c:2474:29: sparse: int
drivers/gpu/drm/drm_modes.c:2474:29: sparse: sparse: incompatible types for operation (>):
drivers/gpu/drm/drm_modes.c:2474:29: sparse: bad type __UNIQUE_ID___x334
drivers/gpu/drm/drm_modes.c:2474:29: sparse: bad type __UNIQUE_ID___y335
--
>> net/ceph/osdmap.c:1773:54: sparse: sparse: incompatible types for operation (>=):
>> net/ceph/osdmap.c:1773:54: sparse: void *
>> net/ceph/osdmap.c:1773:54: sparse: int
>> net/ceph/osdmap.c:1773:54: sparse: sparse: bad constant expression type
net/ceph/osdmap.c:2000:46: sparse: sparse: incompatible types for operation (>=):
net/ceph/osdmap.c:2000:46: sparse: void *
net/ceph/osdmap.c:2000:46: sparse: int
net/ceph/osdmap.c:2000:46: sparse: sparse: bad constant expression type
net/ceph/osdmap.c:2007:57: sparse: sparse: incompatible types for operation (>=):
net/ceph/osdmap.c:2007:57: sparse: void *
net/ceph/osdmap.c:2007:57: sparse: int
net/ceph/osdmap.c:2007:57: sparse: sparse: bad constant expression type
>> net/ceph/osdmap.c:1773:54: sparse: sparse: incompatible types for operation (>=):
>> net/ceph/osdmap.c:1773:54: sparse: void *
>> net/ceph/osdmap.c:1773:54: sparse: int
>> net/ceph/osdmap.c:1773:54: sparse: sparse: incompatible types for operation (>=):
>> net/ceph/osdmap.c:1773:54: sparse: void *end
>> net/ceph/osdmap.c:1773:54: sparse: int
>> net/ceph/osdmap.c:1773:54: sparse: sparse: incompatible types for operation (>=):
>> net/ceph/osdmap.c:1773:54: sparse: void *
>> net/ceph/osdmap.c:1773:54: sparse: int
>> net/ceph/osdmap.c:1773:54: sparse: sparse: incompatible types for operation (>=):
>> net/ceph/osdmap.c:1773:54: sparse: void *end
>> net/ceph/osdmap.c:1773:54: sparse: int
net/ceph/osdmap.c:1773:54: sparse: sparse: incompatible types for operation (<):
net/ceph/osdmap.c:1773:54: sparse: bad type __UNIQUE_ID___x318
net/ceph/osdmap.c:1773:54: sparse: bad type __UNIQUE_ID___y319
net/ceph/osdmap.c:2000:46: sparse: sparse: incompatible types for operation (>=):
net/ceph/osdmap.c:2000:46: sparse: void *
net/ceph/osdmap.c:2000:46: sparse: int
net/ceph/osdmap.c:2000:46: sparse: sparse: incompatible types for operation (>=):
net/ceph/osdmap.c:2000:46: sparse: void *end
net/ceph/osdmap.c:2000:46: sparse: int
net/ceph/osdmap.c:2000:46: sparse: sparse: incompatible types for operation (>=):
net/ceph/osdmap.c:2000:46: sparse: void *
net/ceph/osdmap.c:2000:46: sparse: int
net/ceph/osdmap.c:2000:46: sparse: sparse: incompatible types for operation (>=):
net/ceph/osdmap.c:2000:46: sparse: void *end
net/ceph/osdmap.c:2000:46: sparse: int
net/ceph/osdmap.c:2000:46: sparse: sparse: incompatible types for operation (<):
net/ceph/osdmap.c:2000:46: sparse: bad type __UNIQUE_ID___x322
net/ceph/osdmap.c:2000:46: sparse: bad type __UNIQUE_ID___y323
net/ceph/osdmap.c:2007:57: sparse: sparse: incompatible types for operation (>=):
net/ceph/osdmap.c:2007:57: sparse: void *
net/ceph/osdmap.c:2007:57: sparse: int
net/ceph/osdmap.c:2007:57: sparse: sparse: incompatible types for operation (>=):
net/ceph/osdmap.c:2007:57: sparse: void *end
net/ceph/osdmap.c:2007:57: sparse: int
net/ceph/osdmap.c:2007:57: sparse: sparse: incompatible types for operation (>=):
net/ceph/osdmap.c:2007:57: sparse: void *
net/ceph/osdmap.c:2007:57: sparse: int
net/ceph/osdmap.c:2007:57: sparse: sparse: incompatible types for operation (>=):
net/ceph/osdmap.c:2007:57: sparse: void *end
net/ceph/osdmap.c:2007:57: sparse: int
net/ceph/osdmap.c:2007:57: sparse: sparse: incompatible types for operation (<):
net/ceph/osdmap.c:2007:57: sparse: bad type __UNIQUE_ID___x324
net/ceph/osdmap.c:2007:57: sparse: bad type __UNIQUE_ID___y325
--
>> lib/lzo/lzo1x_compress.c:53:54: sparse: sparse: incompatible types for operation (>=):
>> lib/lzo/lzo1x_compress.c:53:54: sparse: unsigned char const *const ip_end
>> lib/lzo/lzo1x_compress.c:53:54: sparse: int
>> lib/lzo/lzo1x_compress.c:53:54: sparse: sparse: bad constant expression type
>> lib/lzo/lzo1x_compress.c:53:54: sparse: sparse: incompatible types for operation (>=):
>> lib/lzo/lzo1x_compress.c:53:54: sparse: unsigned char const *const ip_end
>> lib/lzo/lzo1x_compress.c:53:54: sparse: int
>> lib/lzo/lzo1x_compress.c:53:54: sparse: sparse: incompatible types for operation (>=):
>> lib/lzo/lzo1x_compress.c:53:54: sparse: unsigned char const *
>> lib/lzo/lzo1x_compress.c:53:54: sparse: int
>> lib/lzo/lzo1x_compress.c:53:54: sparse: sparse: incompatible types for operation (>=):
>> lib/lzo/lzo1x_compress.c:53:54: sparse: unsigned char const *const ip_end
>> lib/lzo/lzo1x_compress.c:53:54: sparse: int
>> lib/lzo/lzo1x_compress.c:53:54: sparse: sparse: incompatible types for operation (>=):
>> lib/lzo/lzo1x_compress.c:53:54: sparse: unsigned char const *
>> lib/lzo/lzo1x_compress.c:53:54: sparse: int
lib/lzo/lzo1x_compress.c:53:54: sparse: sparse: incompatible types for operation (<):
lib/lzo/lzo1x_compress.c:53:54: sparse: bad type __UNIQUE_ID___x182
lib/lzo/lzo1x_compress.c:53:54: sparse: bad type __UNIQUE_ID___y183
vim +80 crypto/skcipher.c
b286d8b1a69066 Herbert Xu 2016-11-22 72
b286d8b1a69066 Herbert Xu 2016-11-22 73 /* Get a spot of the specified length that does not straddle a page.
b286d8b1a69066 Herbert Xu 2016-11-22 74 * The caller needs to ensure that there is enough space for this operation.
b286d8b1a69066 Herbert Xu 2016-11-22 75 */
b286d8b1a69066 Herbert Xu 2016-11-22 76 static inline u8 *skcipher_get_spot(u8 *start, unsigned int len)
b286d8b1a69066 Herbert Xu 2016-11-22 77 {
b286d8b1a69066 Herbert Xu 2016-11-22 78 u8 *end_page = (u8 *)(((unsigned long)(start + len - 1)) & PAGE_MASK);
b286d8b1a69066 Herbert Xu 2016-11-22 79
b286d8b1a69066 Herbert Xu 2016-11-22 @80 return max(start, end_page);
b286d8b1a69066 Herbert Xu 2016-11-22 81 }
b286d8b1a69066 Herbert Xu 2016-11-22 82
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 5/5] minmax: Relax check to allow comparison between int and small unsigned constants.
2023-07-25 11:54 ` [PATCH next resend 5/5] minmax: Relax check to allow comparison between int and small unsigned constants David Laight
` (2 preceding siblings ...)
2023-07-28 7:15 ` kernel test robot
@ 2023-07-28 8:08 ` kernel test robot
3 siblings, 0 replies; 45+ messages in thread
From: kernel test robot @ 2023-07-28 8:08 UTC (permalink / raw)
To: David Laight, 'linux-kernel@vger.kernel.org',
'Andy Shevchenko', 'Andrew Morton',
'Matthew Wilcox (Oracle)', 'Christoph Hellwig',
'Jason A. Donenfeld'
Cc: oe-kbuild-all, Linux Memory Management List
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master crng-random/master v6.5-rc3 next-20230728]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/48c2cd0407f14859919d4fcbe526234a%40AcuMS.aculab.com
patch subject: [PATCH next resend 5/5] minmax: Relax check to allow comparison between int and small unsigned constants.
config: xtensa-randconfig-r093-20230725 (https://download.01.org/0day-ci/archive/20230728/202307281556.iTVIR4tJ-lkp@intel.com/config)
compiler: xtensa-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230728/202307281556.iTVIR4tJ-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307281556.iTVIR4tJ-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
mm/kmemleak.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/kernel.h):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> mm/kmemleak.c:1429:32: sparse: sparse: incompatible types for operation (>=):
>> mm/kmemleak.c:1429:32: sparse: void *
>> mm/kmemleak.c:1429:32: sparse: int
>> mm/kmemleak.c:1429:32: sparse: sparse: bad constant expression type
>> mm/kmemleak.c:1429:32: sparse: sparse: incompatible types for operation (>=):
>> mm/kmemleak.c:1429:32: sparse: void *
>> mm/kmemleak.c:1429:32: sparse: int
>> mm/kmemleak.c:1429:32: sparse: sparse: incompatible types for operation (>=):
>> mm/kmemleak.c:1429:32: sparse: void *end
>> mm/kmemleak.c:1429:32: sparse: int
>> mm/kmemleak.c:1429:32: sparse: sparse: incompatible types for operation (>=):
>> mm/kmemleak.c:1429:32: sparse: void *
>> mm/kmemleak.c:1429:32: sparse: int
>> mm/kmemleak.c:1429:32: sparse: sparse: incompatible types for operation (>=):
>> mm/kmemleak.c:1429:32: sparse: void *end
>> mm/kmemleak.c:1429:32: sparse: int
mm/kmemleak.c:1429:32: sparse: sparse: incompatible types for operation (<):
mm/kmemleak.c:1429:32: sparse: bad type __UNIQUE_ID___x229
mm/kmemleak.c:1429:32: sparse: bad type __UNIQUE_ID___y230
vim +1429 mm/kmemleak.c
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11 1396
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11 1397 /*
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11 1398 * Scan a memory block corresponding to a kmemleak_object. A condition is
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11 1399 * that object->use_count >= 1.
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11 1400 */
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11 1401 static void scan_object(struct kmemleak_object *object)
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11 1402 {
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11 1403 struct kmemleak_scan_area *area;
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11 1404 unsigned long flags;
0c24e061196c21 Patrick Wang 2022-06-11 1405 void *obj_ptr;
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11 1406
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11 1407 /*
21ae2956ce289f Uwe Kleine-König 2009-10-07 1408 * Once the object->lock is acquired, the corresponding memory block
21ae2956ce289f Uwe Kleine-König 2009-10-07 1409 * cannot be freed (the same lock is acquired in delete_object).
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11 1410 */
8c96f1bc6fc49c He Zhe 2020-01-30 1411 raw_spin_lock_irqsave(&object->lock, flags);
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11 1412 if (object->flags & OBJECT_NO_SCAN)
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11 1413 goto out;
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11 1414 if (!(object->flags & OBJECT_ALLOCATED))
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11 1415 /* already freed object */
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11 1416 goto out;
0c24e061196c21 Patrick Wang 2022-06-11 1417
0c24e061196c21 Patrick Wang 2022-06-11 1418 obj_ptr = object->flags & OBJECT_PHYS ?
0c24e061196c21 Patrick Wang 2022-06-11 1419 __va((phys_addr_t)object->pointer) :
0c24e061196c21 Patrick Wang 2022-06-11 1420 (void *)object->pointer;
0c24e061196c21 Patrick Wang 2022-06-11 1421
dba82d9431770e Catalin Marinas 2019-09-23 1422 if (hlist_empty(&object->area_list) ||
dba82d9431770e Catalin Marinas 2019-09-23 1423 object->flags & OBJECT_FULL_SCAN) {
0c24e061196c21 Patrick Wang 2022-06-11 1424 void *start = obj_ptr;
0c24e061196c21 Patrick Wang 2022-06-11 1425 void *end = obj_ptr + object->size;
93ada579b0eea0 Catalin Marinas 2015-06-24 1426 void *next;
af98603dad87e3 Catalin Marinas 2009-08-27 1427
93ada579b0eea0 Catalin Marinas 2015-06-24 1428 do {
93ada579b0eea0 Catalin Marinas 2015-06-24 @1429 next = min(start + MAX_SCAN_SIZE, end);
93ada579b0eea0 Catalin Marinas 2015-06-24 1430 scan_block(start, next, object);
93ada579b0eea0 Catalin Marinas 2015-06-24 1431
93ada579b0eea0 Catalin Marinas 2015-06-24 1432 start = next;
93ada579b0eea0 Catalin Marinas 2015-06-24 1433 if (start >= end)
93ada579b0eea0 Catalin Marinas 2015-06-24 1434 break;
af98603dad87e3 Catalin Marinas 2009-08-27 1435
8c96f1bc6fc49c He Zhe 2020-01-30 1436 raw_spin_unlock_irqrestore(&object->lock, flags);
af98603dad87e3 Catalin Marinas 2009-08-27 1437 cond_resched();
8c96f1bc6fc49c He Zhe 2020-01-30 1438 raw_spin_lock_irqsave(&object->lock, flags);
93ada579b0eea0 Catalin Marinas 2015-06-24 1439 } while (object->flags & OBJECT_ALLOCATED);
af98603dad87e3 Catalin Marinas 2009-08-27 1440 } else
b67bfe0d42cac5 Sasha Levin 2013-02-27 1441 hlist_for_each_entry(area, &object->area_list, node)
c017b4be3e8417 Catalin Marinas 2009-10-28 1442 scan_block((void *)area->start,
c017b4be3e8417 Catalin Marinas 2009-10-28 1443 (void *)(area->start + area->size),
93ada579b0eea0 Catalin Marinas 2015-06-24 1444 object);
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11 1445 out:
8c96f1bc6fc49c He Zhe 2020-01-30 1446 raw_spin_unlock_irqrestore(&object->lock, flags);
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11 1447 }
3c7b4e6b8be4c1 Catalin Marinas 2009-06-11 1448
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
@ 2023-07-31 21:23 kernel test robot
0 siblings, 0 replies; 45+ messages in thread
From: kernel test robot @ 2023-07-31 21:23 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: drivers/net/usb/cdc_ncm.c:166:15: sparse: sparse: bad integer constant expression"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
References: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
TO: David Laight <David.Laight@ACULAB.COM>
TO: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
TO: "'Andy Shevchenko'" <andriy.shevchenko@linux.intel.com>
TO: "'Andrew Morton'" <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: "'Matthew Wilcox (Oracle)'" <willy@infradead.org>
TO: "'Christoph Hellwig'" <hch@infradead.org>
TO: "'Jason A. Donenfeld'" <Jason@zx2c4.com>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master v6.5-rc4 next-20230731]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/a09512c8526b46759669d0b879144563%40AcuMS.aculab.com
patch subject: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
:::::: branch date: 6 days ago
:::::: commit date: 6 days ago
config: i386-randconfig-i061-20230730 (https://download.01.org/0day-ci/archive/20230801/202308010503.8XSvuAs8-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230801/202308010503.8XSvuAs8-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202308010503.8XSvuAs8-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/net/usb/cdc_ncm.c:166:15: sparse: sparse: bad integer constant expression
>> drivers/net/usb/cdc_ncm.c:166:15: sparse: sparse: static assertion failed: "clamp() low limit (u32)(min) greater than high limit (u32)(max)"
drivers/net/usb/cdc_ncm.c:194:15: sparse: sparse: bad integer constant expression
drivers/net/usb/cdc_ncm.c:194:15: sparse: sparse: static assertion failed: "clamp() low limit (u32)(min) greater than high limit (u32)(max)"
drivers/net/usb/cdc_ncm.c:472:27: sparse: sparse: bad integer constant expression
>> drivers/net/usb/cdc_ncm.c:472:27: sparse: sparse: static assertion failed: "clamp() low limit (u16)(512) greater than high limit (u16)(ctx->tx_max)"
drivers/net/usb/cdc_ncm.c:618:34: sparse: sparse: bad integer constant expression
>> drivers/net/usb/cdc_ncm.c:618:34: sparse: sparse: static assertion failed: "clamp() low limit (u32)(cdc_ncm_min_dgram_size(dev)) greater than high limit (u32)(8192)"
--
>> drivers/media/platform/xilinx/xilinx-dma.c:548:22: sparse: sparse: bad integer constant expression
>> drivers/media/platform/xilinx/xilinx-dma.c:548:22: sparse: sparse: static assertion failed: "clamp() low limit min_width greater than high limit max_width"
drivers/media/platform/xilinx/xilinx-dma.c:560:29: sparse: sparse: bad integer constant expression
>> drivers/media/platform/xilinx/xilinx-dma.c:560:29: sparse: sparse: static assertion failed: "clamp() low limit min_bpl greater than high limit max_bpl"
vim +166 drivers/net/usb/cdc_ncm.c
6c4e548ff36672 Bjørn Mork 2014-05-16 149
289507d3364f96 Bjørn Mork 2014-05-30 150 static u32 cdc_ncm_check_rx_max(struct usbnet *dev, u32 new_rx)
5aa73d5d72bddf Bjørn Mork 2014-05-16 151 {
5aa73d5d72bddf Bjørn Mork 2014-05-16 152 struct cdc_ncm_ctx *ctx = (struct cdc_ncm_ctx *)dev->data[0];
5aa73d5d72bddf Bjørn Mork 2014-05-16 153 u32 val, max, min;
5aa73d5d72bddf Bjørn Mork 2014-05-16 154
5aa73d5d72bddf Bjørn Mork 2014-05-16 155 /* clamp new_rx to sane values */
5aa73d5d72bddf Bjørn Mork 2014-05-16 156 min = USB_CDC_NCM_NTB_MIN_IN_SIZE;
5aa73d5d72bddf Bjørn Mork 2014-05-16 157 max = min_t(u32, CDC_NCM_NTB_MAX_SIZE_RX, le32_to_cpu(ctx->ncm_parm.dwNtbInMaxSize));
5aa73d5d72bddf Bjørn Mork 2014-05-16 158
5aa73d5d72bddf Bjørn Mork 2014-05-16 159 /* dwNtbInMaxSize spec violation? Use MIN size for both limits */
5aa73d5d72bddf Bjørn Mork 2014-05-16 160 if (max < min) {
5aa73d5d72bddf Bjørn Mork 2014-05-16 161 dev_warn(&dev->intf->dev, "dwNtbInMaxSize=%u is too small. Using %u\n",
5aa73d5d72bddf Bjørn Mork 2014-05-16 162 le32_to_cpu(ctx->ncm_parm.dwNtbInMaxSize), min);
5aa73d5d72bddf Bjørn Mork 2014-05-16 163 max = min;
5aa73d5d72bddf Bjørn Mork 2014-05-16 164 }
5aa73d5d72bddf Bjørn Mork 2014-05-16 165
5aa73d5d72bddf Bjørn Mork 2014-05-16 @166 val = clamp_t(u32, new_rx, min, max);
289507d3364f96 Bjørn Mork 2014-05-30 167 if (val != new_rx)
289507d3364f96 Bjørn Mork 2014-05-30 168 dev_dbg(&dev->intf->dev, "rx_max must be in the [%u, %u] range\n", min, max);
289507d3364f96 Bjørn Mork 2014-05-30 169
289507d3364f96 Bjørn Mork 2014-05-30 170 return val;
289507d3364f96 Bjørn Mork 2014-05-30 171 }
289507d3364f96 Bjørn Mork 2014-05-30 172
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
@ 2023-07-31 20:41 kernel test robot
0 siblings, 0 replies; 45+ messages in thread
From: kernel test robot @ 2023-07-31 20:41 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: fs/nfsd/nfs3proc.c:561:23: sparse: sparse: bad integer constant expression"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
References: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
TO: David Laight <David.Laight@ACULAB.COM>
TO: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
TO: "'Andy Shevchenko'" <andriy.shevchenko@linux.intel.com>
TO: "'Andrew Morton'" <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: "'Matthew Wilcox (Oracle)'" <willy@infradead.org>
TO: "'Christoph Hellwig'" <hch@infradead.org>
TO: "'Jason A. Donenfeld'" <Jason@zx2c4.com>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/a09512c8526b46759669d0b879144563%40AcuMS.aculab.com
patch subject: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
:::::: branch date: 6 days ago
:::::: commit date: 6 days ago
config: i386-randconfig-i062-20230730 (https://download.01.org/0day-ci/archive/20230801/202308010430.Dga44296-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230801/202308010430.Dga44296-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202308010430.Dga44296-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> fs/nfsd/nfs3proc.c:561:23: sparse: sparse: bad integer constant expression
>> fs/nfsd/nfs3proc.c:561:23: sparse: sparse: static assertion failed: "clamp() low limit (u32)(sizeof(__be32) * 2) greater than high limit sendbuf"
vim +561 fs/nfsd/nfs3proc.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 548
40116ebd0934cc Chuck Lever 2020-11-17 549 static void nfsd3_init_dirlist_pages(struct svc_rqst *rqstp,
40116ebd0934cc Chuck Lever 2020-11-17 550 struct nfsd3_readdirres *resp,
53b1119a6e5028 Chuck Lever 2021-12-16 551 u32 count)
40116ebd0934cc Chuck Lever 2020-11-17 552 {
7f87fc2d34d475 Chuck Lever 2020-10-22 553 struct xdr_buf *buf = &resp->dirlist;
7f87fc2d34d475 Chuck Lever 2020-10-22 554 struct xdr_stream *xdr = &resp->xdr;
640f87c190e0d1 Chuck Lever 2022-09-01 555 unsigned int sendbuf = min_t(unsigned int, rqstp->rq_res.buflen,
640f87c190e0d1 Chuck Lever 2022-09-01 556 svc_max_payload(rqstp));
40116ebd0934cc Chuck Lever 2020-11-17 557
7f87fc2d34d475 Chuck Lever 2020-10-22 558 memset(buf, 0, sizeof(*buf));
40116ebd0934cc Chuck Lever 2020-11-17 559
7f87fc2d34d475 Chuck Lever 2020-10-22 560 /* Reserve room for the NULL ptr & eof flag (-2 words) */
640f87c190e0d1 Chuck Lever 2022-09-01 @561 buf->buflen = clamp(count, (u32)(XDR_UNIT * 2), sendbuf);
640f87c190e0d1 Chuck Lever 2022-09-01 562 buf->buflen -= XDR_UNIT * 2;
7f87fc2d34d475 Chuck Lever 2020-10-22 563 buf->pages = rqstp->rq_next_page;
53b1119a6e5028 Chuck Lever 2021-12-16 564 rqstp->rq_next_page += (buf->buflen + PAGE_SIZE - 1) >> PAGE_SHIFT;
7f87fc2d34d475 Chuck Lever 2020-10-22 565
98124f5bd6c766 Chuck Lever 2022-09-12 566 xdr_init_encode_pages(xdr, buf, buf->pages, NULL);
40116ebd0934cc Chuck Lever 2020-11-17 567 }
40116ebd0934cc Chuck Lever 2020-11-17 568
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
@ 2023-07-31 20:20 kernel test robot
0 siblings, 0 replies; 45+ messages in thread
From: kernel test robot @ 2023-07-31 20:20 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: drivers/platform/x86/asus-wmi.c:1035:28: sparse: sparse: bad integer constant expression"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
References: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
TO: David Laight <David.Laight@ACULAB.COM>
TO: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
TO: "'Andy Shevchenko'" <andriy.shevchenko@linux.intel.com>
TO: "'Andrew Morton'" <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: "'Matthew Wilcox (Oracle)'" <willy@infradead.org>
TO: "'Christoph Hellwig'" <hch@infradead.org>
TO: "'Jason A. Donenfeld'" <Jason@zx2c4.com>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/a09512c8526b46759669d0b879144563%40AcuMS.aculab.com
patch subject: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
:::::: branch date: 6 days ago
:::::: commit date: 6 days ago
config: i386-randconfig-i063-20230730 (https://download.01.org/0day-ci/archive/20230801/202308010438.RokDrRta-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230801/202308010438.RokDrRta-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202308010438.RokDrRta-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/platform/x86/asus-wmi.c:1035:28: sparse: sparse: bad integer constant expression
>> drivers/platform/x86/asus-wmi.c:1035:28: sparse: sparse: static assertion failed: "clamp() low limit (typeof(value))(0) greater than high limit (typeof(value))(max_level)"
vim +1035 drivers/platform/x86/asus-wmi.c
e9809c0b967065 Corentin Chary 2011-07-01 1026
dbb3d78f61bade Chris Chiu 2018-06-20 1027 static void do_kbd_led_set(struct led_classdev *led_cdev, int value)
e9809c0b967065 Corentin Chary 2011-07-01 1028 {
e9809c0b967065 Corentin Chary 2011-07-01 1029 struct asus_wmi *asus;
dbb3d78f61bade Chris Chiu 2018-06-20 1030 int max_level;
e9809c0b967065 Corentin Chary 2011-07-01 1031
e9809c0b967065 Corentin Chary 2011-07-01 1032 asus = container_of(led_cdev, struct asus_wmi, kbd_led);
dbb3d78f61bade Chris Chiu 2018-06-20 1033 max_level = asus->kbd_led.max_brightness;
e9809c0b967065 Corentin Chary 2011-07-01 1034
2275752004ab21 Andy Shevchenko 2019-08-16 @1035 asus->kbd_led_wk = clamp_val(value, 0, max_level);
9fe44fc98ce45f Jian-Hong Pan 2018-09-27 1036 kbd_led_update(asus);
e9809c0b967065 Corentin Chary 2011-07-01 1037 }
e9809c0b967065 Corentin Chary 2011-07-01 1038
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
@ 2023-07-30 1:38 kernel test robot
0 siblings, 0 replies; 45+ messages in thread
From: kernel test robot @ 2023-07-30 1:38 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: sound/usb/mixer_scarlett.c:325:23: sparse: sparse: bad integer constant expression"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
References: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
TO: David Laight <David.Laight@ACULAB.COM>
TO: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
TO: "'Andy Shevchenko'" <andriy.shevchenko@linux.intel.com>
TO: "'Andrew Morton'" <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: "'Matthew Wilcox (Oracle)'" <willy@infradead.org>
TO: "'Christoph Hellwig'" <hch@infradead.org>
TO: "'Jason A. Donenfeld'" <Jason@zx2c4.com>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master crng-random/master v6.5-rc3 next-20230728]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/a09512c8526b46759669d0b879144563%40AcuMS.aculab.com
patch subject: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
:::::: branch date: 5 days ago
:::::: commit date: 5 days ago
config: sparc64-randconfig-r072-20230730 (https://download.01.org/0day-ci/archive/20230730/202307300918.oUVHSjyY-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230730/202307300918.oUVHSjyY-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202307300918.oUVHSjyY-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> sound/usb/mixer_scarlett.c:325:23: sparse: sparse: bad integer constant expression
>> sound/usb/mixer_scarlett.c:325:23: sparse: sparse: static assertion failed: "clamp() low limit -128 greater than high limit (int)kctl->private_value"
sound/usb/mixer_scarlett.c:420:15: sparse: sparse: bad integer constant expression
>> sound/usb/mixer_scarlett.c:420:15: sparse: sparse: static assertion failed: "clamp() low limit 0 greater than high limit opt->len-1"
--
>> drivers/thermal/qcom/tsens.c:708:19: sparse: sparse: bad integer constant expression
>> drivers/thermal/qcom/tsens.c:708:19: sparse: sparse: static assertion failed: "clamp() low limit (typeof(high))(priv->feat->trip_min_temp) greater than high limit (typeof(high))(priv->feat->trip_max_temp)"
drivers/thermal/qcom/tsens.c:709:19: sparse: sparse: bad integer constant expression
>> drivers/thermal/qcom/tsens.c:709:19: sparse: sparse: static assertion failed: "clamp() low limit (typeof(low))(priv->feat->trip_min_temp) greater than high limit (typeof(low))(priv->feat->trip_max_temp)"
--
>> net/netfilter/ipvs/ip_vs_conn.c:1497:15: sparse: sparse: bad integer constant expression
>> net/netfilter/ipvs/ip_vs_conn.c:1497:15: sparse: sparse: static assertion failed: "clamp() low limit min greater than high limit max_avail"
net/netfilter/ipvs/ip_vs_conn.c:1498:31: sparse: sparse: bad integer constant expression
>> net/netfilter/ipvs/ip_vs_conn.c:1498:31: sparse: sparse: static assertion failed: "clamp() low limit (typeof(ip_vs_conn_tab_bits))(min) greater than high limit (typeof(ip_vs_conn_tab_bits))(max)"
--
>> net/netfilter/ipvs/ip_vs_sync.c:1282:23: sparse: sparse: bad integer constant expression
>> net/netfilter/ipvs/ip_vs_sync.c:1282:23: sparse: sparse: static assertion failed: "clamp() low limit (int)((((2048 + ((((sizeof(struct sk_buff))) + ((__typeof__((sizeof(struct sk_buff))))(((1 << 6))) - 1)) & ~((__typeof__((sizeof(struct sk_buff))))(((1 << 6))) - 1))) * 2) + 1) / 2) greater than high limit (int)(({ do { __attribute__((__noreturn__)) extern void __compiletime_assert_510(void) __attribute__((__error__("Unsupported access size for {READ,WRITE}_ONCE()."))); if (!((sizeof(sysctl_wmem_max) == sizeof(char) || sizeof(sysctl_wmem_max) == sizeof(short) || sizeof(sysctl_wmem_max) == sizeof(int) || sizeof(sysctl_wmem_max) == sizeof(long)) || sizeof(sysctl_wmem_max) == sizeof(long long))) __compiletime_assert_510(); } while (0); (*(const volatile typeof( _Generic((sysctl_wmem_max), char: (char)0, unsigned char: (unsigned char)0, signed char: (signed char)0, unsigned short: (unsigned short)0, signed short: (signed short)0, unsigned int: (unsigned int)0, signed int: (signed int)0, unsigned long: (unsigned long)0, signed long: (signed long)0, unsigned long long: (unsigned long long)0, signed long long: (signed long long)0, default: (sysctl_wmem_max))) *)&(sysctl_wmem_max)); }))"
net/netfilter/ipvs/ip_vs_sync.c:1287:23: sparse: sparse: bad integer constant expression
>> net/netfilter/ipvs/ip_vs_sync.c:1287:23: sparse: sparse: static assertion failed: "clamp() low limit (int)(((2048 + ((((sizeof(struct sk_buff))) + ((__typeof__((sizeof(struct sk_buff))))(((1 << 6))) - 1)) & ~((__typeof__((sizeof(struct sk_buff))))(((1 << 6))) - 1))) + 1) / 2) greater than high limit (int)(({ do { __attribute__((__noreturn__)) extern void __compiletime_assert_514(void) __attribute__((__error__("Unsupported access size for {READ,WRITE}_ONCE()."))); if (!((sizeof(sysctl_rmem_max) == sizeof(char) || sizeof(sysctl_rmem_max) == sizeof(short) || sizeof(sysctl_rmem_max) == sizeof(int) || sizeof(sysctl_rmem_max) == sizeof(long)) || sizeof(sysctl_rmem_max) == sizeof(long long))) __compiletime_assert_514(); } while (0); (*(const volatile typeof( _Generic((sysctl_rmem_max), char: (char)0, unsigned char: (unsigned char)0, signed char: (signed char)0, unsigned short: (unsigned short)0, signed short: (signed short)0, unsigned int: (unsigned int)0, signed int: (signed int)0, unsigned long: (unsigned long)0, signed long: (signed long)0, unsigned long long: (unsigned long long)0, signed long long: (signed long long)0, default: (sysctl_rmem_max))) *)&(sysctl_rmem_max)); }))"
net/netfilter/ipvs/ip_vs_sync.c:1806:34: sparse: sparse: bad integer constant expression
>> net/netfilter/ipvs/ip_vs_sync.c:1806:34: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(min_mtu) greater than high limit (unsigned int)(65535 - hlen)"
/bin/bash: line 1: 21870 Segmentation fault sparse -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise -Wno-return-void -Wno-unknown-attribute -fdiagnostic-prefix -D__CHECK_ENDIAN__ -D__sparc__ -D__sparc_v9__ -D__arch64__ --arch=sparc64 -mbig-endian -m64 -Wp,-MMD,net/netfilter/ipvs/.ip_vs_sync.o.d -nostdinc -Iarch/sparc/include -I./arch/sparc/include/generated -Iinclude -I./include -Iarch/sparc/include/uapi -I./arch/sparc/include/generated/uapi -Iinclude/uapi -I./include/generated/uapi -include include/linux/compiler-version.h -include include/linux/kconfig.h -include include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map== -Wundef -DKBUILD_EXTRA_WARN1 -std=gnu11 -fshort-wchar -funsigned-char -fno-common -fno-PIE -fno-strict-aliasing -Wall -Wundef -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Werror=strict-prototypes -Wno-format-security -Wno-trigraphs -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare -Wa,--undeclared-regs -mtune=ultrasparc3 -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-races -Wframe-larger-than=2048 -fno-stack-protector -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-dangling-pointer -fomit-frame-pointer -ftrivial-auto-var-init=pattern -fno-stack-clash-protection -fno-inline-functions-called-once -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -Wextra -Wunused -Wno-unused-parameter -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wmissing-include-dirs -Wunused-but-set-variable -Wunused-const-variable -Wpacked-not-aligned -Wstringop-truncation -Wno-missing-field-initializers -Wno-sign-compare -Wno-type-limits -Wno-shift-negative-value -I net/netfilter/ipvs -I ./net/netfilter/ipvs -DKBUILD_MODFILE='"net/netfilter/ipvs/ip_vs"' -DKBUILD_BASENAME='"ip_vs_sync"' -DKBUILD_MODNAME='"ip_vs"' -D__KBUILD_MODNAME=kmod_ip_vs net/netfilter/ipvs/ip_vs_sync.c
vim +325 sound/usb/mixer_scarlett.c
76b188c4b37087 Chris J Arges 2014-11-12 313
76b188c4b37087 Chris J Arges 2014-11-12 314 static int scarlett_ctl_get(struct snd_kcontrol *kctl,
76b188c4b37087 Chris J Arges 2014-11-12 315 struct snd_ctl_elem_value *ucontrol)
76b188c4b37087 Chris J Arges 2014-11-12 316 {
76b188c4b37087 Chris J Arges 2014-11-12 317 struct usb_mixer_elem_info *elem = kctl->private_data;
76b188c4b37087 Chris J Arges 2014-11-12 318 int i, err, val;
76b188c4b37087 Chris J Arges 2014-11-12 319
76b188c4b37087 Chris J Arges 2014-11-12 320 for (i = 0; i < elem->channels; i++) {
76b188c4b37087 Chris J Arges 2014-11-12 321 err = snd_usb_get_cur_mix_value(elem, i, i, &val);
76b188c4b37087 Chris J Arges 2014-11-12 322 if (err < 0)
76b188c4b37087 Chris J Arges 2014-11-12 323 return err;
76b188c4b37087 Chris J Arges 2014-11-12 324
76b188c4b37087 Chris J Arges 2014-11-12 @325 val = clamp(val / 256, -128, (int)kctl->private_value) +
76b188c4b37087 Chris J Arges 2014-11-12 326 SND_SCARLETT_LEVEL_BIAS;
76b188c4b37087 Chris J Arges 2014-11-12 327 ucontrol->value.integer.value[i] = val;
76b188c4b37087 Chris J Arges 2014-11-12 328 }
76b188c4b37087 Chris J Arges 2014-11-12 329
76b188c4b37087 Chris J Arges 2014-11-12 330 return 0;
76b188c4b37087 Chris J Arges 2014-11-12 331 }
76b188c4b37087 Chris J Arges 2014-11-12 332
76b188c4b37087 Chris J Arges 2014-11-12 333 static int scarlett_ctl_put(struct snd_kcontrol *kctl,
76b188c4b37087 Chris J Arges 2014-11-12 334 struct snd_ctl_elem_value *ucontrol)
76b188c4b37087 Chris J Arges 2014-11-12 335 {
76b188c4b37087 Chris J Arges 2014-11-12 336 struct usb_mixer_elem_info *elem = kctl->private_data;
76b188c4b37087 Chris J Arges 2014-11-12 337 int i, changed = 0;
76b188c4b37087 Chris J Arges 2014-11-12 338 int err, oval, val;
76b188c4b37087 Chris J Arges 2014-11-12 339
76b188c4b37087 Chris J Arges 2014-11-12 340 for (i = 0; i < elem->channels; i++) {
76b188c4b37087 Chris J Arges 2014-11-12 341 err = snd_usb_get_cur_mix_value(elem, i, i, &oval);
76b188c4b37087 Chris J Arges 2014-11-12 342 if (err < 0)
76b188c4b37087 Chris J Arges 2014-11-12 343 return err;
76b188c4b37087 Chris J Arges 2014-11-12 344
76b188c4b37087 Chris J Arges 2014-11-12 345 val = ucontrol->value.integer.value[i] -
76b188c4b37087 Chris J Arges 2014-11-12 346 SND_SCARLETT_LEVEL_BIAS;
76b188c4b37087 Chris J Arges 2014-11-12 347 val = val * 256;
76b188c4b37087 Chris J Arges 2014-11-12 348 if (oval != val) {
76b188c4b37087 Chris J Arges 2014-11-12 349 err = snd_usb_set_cur_mix_value(elem, i, i, val);
76b188c4b37087 Chris J Arges 2014-11-12 350 if (err < 0)
76b188c4b37087 Chris J Arges 2014-11-12 351 return err;
76b188c4b37087 Chris J Arges 2014-11-12 352
76b188c4b37087 Chris J Arges 2014-11-12 353 changed = 1;
76b188c4b37087 Chris J Arges 2014-11-12 354 }
76b188c4b37087 Chris J Arges 2014-11-12 355 }
76b188c4b37087 Chris J Arges 2014-11-12 356
76b188c4b37087 Chris J Arges 2014-11-12 357 return changed;
76b188c4b37087 Chris J Arges 2014-11-12 358 }
76b188c4b37087 Chris J Arges 2014-11-12 359
76b188c4b37087 Chris J Arges 2014-11-12 360 static void scarlett_generate_name(int i, char *dst, int offsets[])
76b188c4b37087 Chris J Arges 2014-11-12 361 {
76b188c4b37087 Chris J Arges 2014-11-12 362 if (i > offsets[SCARLETT_OFFSET_MIX])
76b188c4b37087 Chris J Arges 2014-11-12 363 sprintf(dst, "Mix %c",
76b188c4b37087 Chris J Arges 2014-11-12 364 'A'+(i - offsets[SCARLETT_OFFSET_MIX] - 1));
76b188c4b37087 Chris J Arges 2014-11-12 365 else if (i > offsets[SCARLETT_OFFSET_ADAT])
76b188c4b37087 Chris J Arges 2014-11-12 366 sprintf(dst, "ADAT %d", i - offsets[SCARLETT_OFFSET_ADAT]);
76b188c4b37087 Chris J Arges 2014-11-12 367 else if (i > offsets[SCARLETT_OFFSET_SPDIF])
76b188c4b37087 Chris J Arges 2014-11-12 368 sprintf(dst, "SPDIF %d", i - offsets[SCARLETT_OFFSET_SPDIF]);
76b188c4b37087 Chris J Arges 2014-11-12 369 else if (i > offsets[SCARLETT_OFFSET_ANALOG])
76b188c4b37087 Chris J Arges 2014-11-12 370 sprintf(dst, "Analog %d", i - offsets[SCARLETT_OFFSET_ANALOG]);
76b188c4b37087 Chris J Arges 2014-11-12 371 else if (i > offsets[SCARLETT_OFFSET_PCM])
76b188c4b37087 Chris J Arges 2014-11-12 372 sprintf(dst, "PCM %d", i - offsets[SCARLETT_OFFSET_PCM]);
76b188c4b37087 Chris J Arges 2014-11-12 373 else
76b188c4b37087 Chris J Arges 2014-11-12 374 sprintf(dst, "Off");
76b188c4b37087 Chris J Arges 2014-11-12 375 }
76b188c4b37087 Chris J Arges 2014-11-12 376
76b188c4b37087 Chris J Arges 2014-11-12 377 static int scarlett_ctl_enum_dynamic_info(struct snd_kcontrol *kctl,
76b188c4b37087 Chris J Arges 2014-11-12 378 struct snd_ctl_elem_info *uinfo)
76b188c4b37087 Chris J Arges 2014-11-12 379 {
76b188c4b37087 Chris J Arges 2014-11-12 380 struct usb_mixer_elem_info *elem = kctl->private_data;
76b188c4b37087 Chris J Arges 2014-11-12 381 struct scarlett_mixer_elem_enum_info *opt = elem->private_data;
76b188c4b37087 Chris J Arges 2014-11-12 382 unsigned int items = opt->len;
76b188c4b37087 Chris J Arges 2014-11-12 383
76b188c4b37087 Chris J Arges 2014-11-12 384 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
76b188c4b37087 Chris J Arges 2014-11-12 385 uinfo->count = elem->channels;
76b188c4b37087 Chris J Arges 2014-11-12 386 uinfo->value.enumerated.items = items;
76b188c4b37087 Chris J Arges 2014-11-12 387
76b188c4b37087 Chris J Arges 2014-11-12 388 if (uinfo->value.enumerated.item >= items)
76b188c4b37087 Chris J Arges 2014-11-12 389 uinfo->value.enumerated.item = items - 1;
76b188c4b37087 Chris J Arges 2014-11-12 390
76b188c4b37087 Chris J Arges 2014-11-12 391 /* generate name dynamically based on item number and offset info */
76b188c4b37087 Chris J Arges 2014-11-12 392 scarlett_generate_name(uinfo->value.enumerated.item,
76b188c4b37087 Chris J Arges 2014-11-12 393 uinfo->value.enumerated.name,
76b188c4b37087 Chris J Arges 2014-11-12 394 opt->offsets);
76b188c4b37087 Chris J Arges 2014-11-12 395
76b188c4b37087 Chris J Arges 2014-11-12 396 return 0;
76b188c4b37087 Chris J Arges 2014-11-12 397 }
76b188c4b37087 Chris J Arges 2014-11-12 398
76b188c4b37087 Chris J Arges 2014-11-12 399 static int scarlett_ctl_enum_info(struct snd_kcontrol *kctl,
76b188c4b37087 Chris J Arges 2014-11-12 400 struct snd_ctl_elem_info *uinfo)
76b188c4b37087 Chris J Arges 2014-11-12 401 {
76b188c4b37087 Chris J Arges 2014-11-12 402 struct usb_mixer_elem_info *elem = kctl->private_data;
76b188c4b37087 Chris J Arges 2014-11-12 403 struct scarlett_mixer_elem_enum_info *opt = elem->private_data;
76b188c4b37087 Chris J Arges 2014-11-12 404
76b188c4b37087 Chris J Arges 2014-11-12 405 return snd_ctl_enum_info(uinfo, elem->channels, opt->len,
76b188c4b37087 Chris J Arges 2014-11-12 406 (const char * const *)opt->names);
76b188c4b37087 Chris J Arges 2014-11-12 407 }
76b188c4b37087 Chris J Arges 2014-11-12 408
76b188c4b37087 Chris J Arges 2014-11-12 409 static int scarlett_ctl_enum_get(struct snd_kcontrol *kctl,
76b188c4b37087 Chris J Arges 2014-11-12 410 struct snd_ctl_elem_value *ucontrol)
76b188c4b37087 Chris J Arges 2014-11-12 411 {
76b188c4b37087 Chris J Arges 2014-11-12 412 struct usb_mixer_elem_info *elem = kctl->private_data;
76b188c4b37087 Chris J Arges 2014-11-12 413 struct scarlett_mixer_elem_enum_info *opt = elem->private_data;
76b188c4b37087 Chris J Arges 2014-11-12 414 int err, val;
76b188c4b37087 Chris J Arges 2014-11-12 415
76b188c4b37087 Chris J Arges 2014-11-12 416 err = snd_usb_get_cur_mix_value(elem, 0, 0, &val);
76b188c4b37087 Chris J Arges 2014-11-12 417 if (err < 0)
76b188c4b37087 Chris J Arges 2014-11-12 418 return err;
76b188c4b37087 Chris J Arges 2014-11-12 419
76b188c4b37087 Chris J Arges 2014-11-12 @420 val = clamp(val - opt->start, 0, opt->len-1);
76b188c4b37087 Chris J Arges 2014-11-12 421
76b188c4b37087 Chris J Arges 2014-11-12 422 ucontrol->value.enumerated.item[0] = val;
76b188c4b37087 Chris J Arges 2014-11-12 423
76b188c4b37087 Chris J Arges 2014-11-12 424 return 0;
76b188c4b37087 Chris J Arges 2014-11-12 425 }
76b188c4b37087 Chris J Arges 2014-11-12 426
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
@ 2023-07-30 1:08 kernel test robot
0 siblings, 0 replies; 45+ messages in thread
From: kernel test robot @ 2023-07-30 1:08 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: drivers/media/test-drivers/vicodec/vicodec-core.c:1199:33: sparse: sparse: bad integer constant expression"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
References: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
TO: David Laight <David.Laight@ACULAB.COM>
TO: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
TO: "'Andy Shevchenko'" <andriy.shevchenko@linux.intel.com>
TO: "'Andrew Morton'" <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: "'Matthew Wilcox (Oracle)'" <willy@infradead.org>
TO: "'Christoph Hellwig'" <hch@infradead.org>
TO: "'Jason A. Donenfeld'" <Jason@zx2c4.com>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/a09512c8526b46759669d0b879144563%40AcuMS.aculab.com
patch subject: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
:::::: branch date: 5 days ago
:::::: commit date: 5 days ago
config: xtensa-randconfig-r071-20230730 (https://download.01.org/0day-ci/archive/20230730/202307300902.tWiTL9YB-lkp@intel.com/config)
compiler: xtensa-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230730/202307300902.tWiTL9YB-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202307300902.tWiTL9YB-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
drivers/media/test-drivers/vicodec/vicodec-core.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/log2.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> drivers/media/test-drivers/vicodec/vicodec-core.c:1199:33: sparse: sparse: bad integer constant expression
>> drivers/media/test-drivers/vicodec/vicodec-core.c:1199:33: sparse: sparse: static assertion failed: "clamp() low limit 640U greater than high limit q_data->coded_width"
drivers/media/test-drivers/vicodec/vicodec-core.c:1202:34: sparse: sparse: bad integer constant expression
>> drivers/media/test-drivers/vicodec/vicodec-core.c:1202:34: sparse: sparse: static assertion failed: "clamp() low limit 360U greater than high limit q_data->coded_height"
--
drivers/media/test-drivers/vivid/vivid-radio-common.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/kernel.h):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> drivers/media/test-drivers/vivid/vivid-radio-common.c:165:16: sparse: sparse: bad integer constant expression
>> drivers/media/test-drivers/vivid/vivid-radio-common.c:165:16: sparse: sparse: static assertion failed: "clamp() low limit (u32)(vivid_radio_bands[band].rangelow) greater than high limit (u32)(vivid_radio_bands[band].rangehigh)"
--
drivers/media/test-drivers/vivid/vivid-radio-rx.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/kernel.h):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> drivers/media/test-drivers/vivid/vivid-radio-rx.c:193:16: sparse: sparse: bad integer constant expression
>> drivers/media/test-drivers/vivid/vivid-radio-rx.c:193:16: sparse: sparse: static assertion failed: "clamp() low limit low greater than high limit high"
--
drivers/media/test-drivers/vivid/vivid-sdr-cap.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/kernel.h):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> drivers/media/test-drivers/vivid/vivid-sdr-cap.c:395:24: sparse: sparse: bad integer constant expression
>> drivers/media/test-drivers/vivid/vivid-sdr-cap.c:395:24: sparse: sparse: static assertion failed: "clamp() low limit (unsigned)(bands_adc[band].rangelow) greater than high limit (unsigned)(bands_adc[band].rangehigh)"
drivers/media/test-drivers/vivid/vivid-sdr-cap.c:409:36: sparse: sparse: bad integer constant expression
>> drivers/media/test-drivers/vivid/vivid-sdr-cap.c:409:36: sparse: sparse: static assertion failed: "clamp() low limit (unsigned)(bands_fm[0].rangelow) greater than high limit (unsigned)(bands_fm[0].rangehigh)"
--
drivers/media/test-drivers/vivid/vivid-vid-out.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/kernel.h):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> drivers/media/test-drivers/vivid/vivid-vid-out.c:856:23: sparse: sparse: bad integer constant expression
>> drivers/media/test-drivers/vivid/vivid-vid-out.c:856:23: sparse: sparse: static assertion failed: "clamp() low limit (int)(-dev->display_width) greater than high limit (int)(dev->display_width)"
drivers/media/test-drivers/vivid/vivid-vid-out.c:858:22: sparse: sparse: bad integer constant expression
>> drivers/media/test-drivers/vivid/vivid-vid-out.c:858:22: sparse: sparse: static assertion failed: "clamp() low limit (int)(-dev->display_height) greater than high limit (int)(dev->display_height)"
vim +1199 drivers/media/test-drivers/vicodec/vicodec-core.c
9e812549883730 drivers/media/platform/vicodec/vicodec-core.c Dafna Hirschfeld 2019-01-21 1180
9e812549883730 drivers/media/platform/vicodec/vicodec-core.c Dafna Hirschfeld 2019-01-21 1181 static int vidioc_s_selection(struct file *file, void *priv,
9e812549883730 drivers/media/platform/vicodec/vicodec-core.c Dafna Hirschfeld 2019-01-21 1182 struct v4l2_selection *s)
9e812549883730 drivers/media/platform/vicodec/vicodec-core.c Dafna Hirschfeld 2019-01-21 1183 {
9e812549883730 drivers/media/platform/vicodec/vicodec-core.c Dafna Hirschfeld 2019-01-21 1184 struct vicodec_ctx *ctx = file2ctx(file);
9e812549883730 drivers/media/platform/vicodec/vicodec-core.c Dafna Hirschfeld 2019-01-21 1185 struct vicodec_q_data *q_data;
9e812549883730 drivers/media/platform/vicodec/vicodec-core.c Dafna Hirschfeld 2019-01-21 1186
7243e5a06e4847 drivers/media/platform/vicodec/vicodec-core.c Dafna Hirschfeld 2019-03-06 1187 if (s->type != V4L2_BUF_TYPE_VIDEO_OUTPUT)
db9a01b32ca940 drivers/media/platform/vicodec/vicodec-core.c Hans Verkuil 2019-01-30 1188 return -EINVAL;
db9a01b32ca940 drivers/media/platform/vicodec/vicodec-core.c Hans Verkuil 2019-01-30 1189
9e812549883730 drivers/media/platform/vicodec/vicodec-core.c Dafna Hirschfeld 2019-01-21 1190 q_data = get_q_data(ctx, s->type);
9e812549883730 drivers/media/platform/vicodec/vicodec-core.c Dafna Hirschfeld 2019-01-21 1191 if (!q_data)
9e812549883730 drivers/media/platform/vicodec/vicodec-core.c Dafna Hirschfeld 2019-01-21 1192 return -EINVAL;
9e812549883730 drivers/media/platform/vicodec/vicodec-core.c Dafna Hirschfeld 2019-01-21 1193
db9a01b32ca940 drivers/media/platform/vicodec/vicodec-core.c Hans Verkuil 2019-01-30 1194 if (!ctx->is_enc || s->target != V4L2_SEL_TGT_CROP)
9e812549883730 drivers/media/platform/vicodec/vicodec-core.c Dafna Hirschfeld 2019-01-21 1195 return -EINVAL;
9e812549883730 drivers/media/platform/vicodec/vicodec-core.c Dafna Hirschfeld 2019-01-21 1196
9e812549883730 drivers/media/platform/vicodec/vicodec-core.c Dafna Hirschfeld 2019-01-21 1197 s->r.left = 0;
9e812549883730 drivers/media/platform/vicodec/vicodec-core.c Dafna Hirschfeld 2019-01-21 1198 s->r.top = 0;
9e812549883730 drivers/media/platform/vicodec/vicodec-core.c Dafna Hirschfeld 2019-01-21 @1199 q_data->visible_width = clamp(s->r.width, MIN_WIDTH,
9e812549883730 drivers/media/platform/vicodec/vicodec-core.c Dafna Hirschfeld 2019-01-21 1200 q_data->coded_width);
9e812549883730 drivers/media/platform/vicodec/vicodec-core.c Dafna Hirschfeld 2019-01-21 1201 s->r.width = q_data->visible_width;
9e812549883730 drivers/media/platform/vicodec/vicodec-core.c Dafna Hirschfeld 2019-01-21 @1202 q_data->visible_height = clamp(s->r.height, MIN_HEIGHT,
9e812549883730 drivers/media/platform/vicodec/vicodec-core.c Dafna Hirschfeld 2019-01-21 1203 q_data->coded_height);
9e812549883730 drivers/media/platform/vicodec/vicodec-core.c Dafna Hirschfeld 2019-01-21 1204 s->r.height = q_data->visible_height;
9e812549883730 drivers/media/platform/vicodec/vicodec-core.c Dafna Hirschfeld 2019-01-21 1205 return 0;
9e812549883730 drivers/media/platform/vicodec/vicodec-core.c Dafna Hirschfeld 2019-01-21 1206 }
9e812549883730 drivers/media/platform/vicodec/vicodec-core.c Dafna Hirschfeld 2019-01-21 1207
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
@ 2023-07-29 3:54 kernel test robot
0 siblings, 0 replies; 45+ messages in thread
From: kernel test robot @ 2023-07-29 3:54 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: drivers/thermal/sprd_thermal.c:204:16: sparse: sparse: bad integer constant expression"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
References: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
TO: David Laight <David.Laight@ACULAB.COM>
TO: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
TO: "'Andy Shevchenko'" <andriy.shevchenko@linux.intel.com>
TO: "'Andrew Morton'" <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: "'Matthew Wilcox (Oracle)'" <willy@infradead.org>
TO: "'Christoph Hellwig'" <hch@infradead.org>
TO: "'Jason A. Donenfeld'" <Jason@zx2c4.com>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master crng-random/master v6.5-rc3 next-20230728]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/a09512c8526b46759669d0b879144563%40AcuMS.aculab.com
patch subject: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
:::::: branch date: 4 days ago
:::::: commit date: 4 days ago
config: parisc-randconfig-r083-20230728 (https://download.01.org/0day-ci/archive/20230729/202307291147.WJTQQTUk-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230729/202307291147.WJTQQTUk-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202307291147.WJTQQTUk-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/thermal/sprd_thermal.c:204:16: sparse: sparse: bad integer constant expression
>> drivers/thermal/sprd_thermal.c:204:16: sparse: sparse: static assertion failed: "clamp() low limit val greater than high limit (u32)(1000 - 1)"
--
>> drivers/media/dvb-frontends/rtl2832_sdr.c:1087:30: sparse: sparse: bad integer constant expression
>> drivers/media/dvb-frontends/rtl2832_sdr.c:1087:30: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(bands_adc[band].rangelow) greater than high limit (unsigned int)(bands_adc[band].rangehigh)"
drivers/media/dvb-frontends/rtl2832_sdr.c:1097:32: sparse: sparse: bad integer constant expression
>> drivers/media/dvb-frontends/rtl2832_sdr.c:1097:32: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(bands_fm[0].rangelow) greater than high limit (unsigned int)(bands_fm[0].rangehigh)"
drivers/media/dvb-frontends/rtl2832_sdr.c:1266:31: sparse: sparse: bad integer constant expression
>> drivers/media/dvb-frontends/rtl2832_sdr.c:1266:31: sparse: sparse: static assertion failed: "clamp() low limit (s32)(dev->bandwidth->minimum) greater than high limit (s32)(dev->bandwidth->maximum)"
vim +204 drivers/thermal/sprd_thermal.c
554fdbaf19b1882 Freeman Liu 2020-02-18 190
554fdbaf19b1882 Freeman Liu 2020-02-18 191 static int sprd_thm_temp_to_rawdata(int temp, struct sprd_thermal_sensor *sen)
554fdbaf19b1882 Freeman Liu 2020-02-18 192 {
554fdbaf19b1882 Freeman Liu 2020-02-18 193 u32 val;
554fdbaf19b1882 Freeman Liu 2020-02-18 194
554fdbaf19b1882 Freeman Liu 2020-02-18 195 clamp(temp, (int)SPRD_THM_TEMP_LOW, (int)SPRD_THM_TEMP_HIGH);
554fdbaf19b1882 Freeman Liu 2020-02-18 196
554fdbaf19b1882 Freeman Liu 2020-02-18 197 /*
554fdbaf19b1882 Freeman Liu 2020-02-18 198 * According to the thermal datasheet, the formula of converting
554fdbaf19b1882 Freeman Liu 2020-02-18 199 * adc value to the temperature value should be:
554fdbaf19b1882 Freeman Liu 2020-02-18 200 * T_final = k_cal * x - b_cal.
554fdbaf19b1882 Freeman Liu 2020-02-18 201 */
554fdbaf19b1882 Freeman Liu 2020-02-18 202 val = (temp + sen->cal_offset) / sen->cal_slope;
554fdbaf19b1882 Freeman Liu 2020-02-18 203
554fdbaf19b1882 Freeman Liu 2020-02-18 @204 return clamp(val, val, (u32)(SPRD_THM_RAW_DATA_HIGH - 1));
554fdbaf19b1882 Freeman Liu 2020-02-18 205 }
554fdbaf19b1882 Freeman Liu 2020-02-18 206
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
@ 2023-07-29 2:41 kernel test robot
0 siblings, 0 replies; 45+ messages in thread
From: kernel test robot @ 2023-07-29 2:41 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: drivers/staging/media/imx/imx-media-csc-scaler.c:367:22: sparse: sparse: bad integer constant expression"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
References: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
TO: David Laight <David.Laight@ACULAB.COM>
TO: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
TO: "'Andy Shevchenko'" <andriy.shevchenko@linux.intel.com>
TO: "'Andrew Morton'" <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: "'Matthew Wilcox (Oracle)'" <willy@infradead.org>
TO: "'Christoph Hellwig'" <hch@infradead.org>
TO: "'Jason A. Donenfeld'" <Jason@zx2c4.com>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master crng-random/master v6.5-rc3 next-20230728]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/a09512c8526b46759669d0b879144563%40AcuMS.aculab.com
patch subject: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
:::::: branch date: 4 days ago
:::::: commit date: 4 days ago
config: sparc64-randconfig-r081-20230728 (https://download.01.org/0day-ci/archive/20230729/202307291049.THzIoWG5-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230729/202307291049.THzIoWG5-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202307291049.THzIoWG5-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
drivers/staging/media/imx/imx-media-csc-scaler.c: note: in included file (through include/video/imx-ipu-v3.h):
include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
>> drivers/staging/media/imx/imx-media-csc-scaler.c:367:22: sparse: sparse: bad integer constant expression
>> drivers/staging/media/imx/imx-media-csc-scaler.c:367:22: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(8) greater than high limit (unsigned int)(((q_data->cur_fmt.width) & ~((__typeof__(q_data->cur_fmt.width))((8)-1))))"
drivers/staging/media/imx/imx-media-csc-scaler.c:369:23: sparse: sparse: bad integer constant expression
>> drivers/staging/media/imx/imx-media-csc-scaler.c:369:23: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(1) greater than high limit (unsigned int)(q_data->cur_fmt.height)"
drivers/staging/media/imx/imx-media-csc-scaler.c:371:21: sparse: sparse: bad integer constant expression
>> drivers/staging/media/imx/imx-media-csc-scaler.c:371:21: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(0) greater than high limit (unsigned int)(q_data->cur_fmt.width - s->r.width)"
drivers/staging/media/imx/imx-media-csc-scaler.c:373:20: sparse: sparse: bad integer constant expression
>> drivers/staging/media/imx/imx-media-csc-scaler.c:373:20: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(0) greater than high limit (unsigned int)(q_data->cur_fmt.height - s->r.height)"
--
>> drivers/staging/media/omap4iss/iss_ipipe.c:231:30: sparse: sparse: bad integer constant expression
>> drivers/staging/media/omap4iss/iss_ipipe.c:231:30: sparse: sparse: static assertion failed: "clamp() low limit (u32)(32) greater than high limit (u32)(fmt->width)"
drivers/staging/media/omap4iss/iss_ipipe.c:232:31: sparse: sparse: bad integer constant expression
>> drivers/staging/media/omap4iss/iss_ipipe.c:232:31: sparse: sparse: static assertion failed: "clamp() low limit (u32)(32) greater than high limit (u32)(fmt->height)"
--
>> drivers/staging/media/omap4iss/iss_video.c:143:23: sparse: sparse: bad integer constant expression
>> drivers/staging/media/omap4iss/iss_video.c:143:23: sparse: sparse: static assertion failed: "clamp() low limit min_bpl greater than high limit video->bpl_max"
--
>> drivers/staging/media/omap4iss/iss_ipipeif.c:417:30: sparse: sparse: bad integer constant expression
>> drivers/staging/media/omap4iss/iss_ipipeif.c:417:30: sparse: sparse: static assertion failed: "clamp() low limit (u32)(32) greater than high limit (u32)((fmt->width + 15) & ~15)"
drivers/staging/media/omap4iss/iss_ipipeif.c:419:31: sparse: sparse: bad integer constant expression
>> drivers/staging/media/omap4iss/iss_ipipeif.c:419:31: sparse: sparse: static assertion failed: "clamp() low limit (u32)(32) greater than high limit (u32)(fmt->height)"
drivers/staging/media/omap4iss/iss_ipipeif.c:428:30: sparse: sparse: bad integer constant expression
>> drivers/staging/media/omap4iss/iss_ipipeif.c:428:30: sparse: sparse: static assertion failed: "clamp() low limit (u32)(32) greater than high limit (u32)(fmt->width)"
drivers/staging/media/omap4iss/iss_ipipeif.c:429:31: sparse: sparse: bad integer constant expression
drivers/staging/media/omap4iss/iss_ipipeif.c:429:31: sparse: sparse: static assertion failed: "clamp() low limit (u32)(32) greater than high limit (u32)(fmt->height)"
--
>> drivers/staging/media/omap4iss/iss_resizer.c:479:30: sparse: sparse: bad integer constant expression
>> drivers/staging/media/omap4iss/iss_resizer.c:479:30: sparse: sparse: static assertion failed: "clamp() low limit (u32)(32) greater than high limit (u32)((fmt->width + 15) & ~15)"
drivers/staging/media/omap4iss/iss_resizer.c:481:31: sparse: sparse: bad integer constant expression
>> drivers/staging/media/omap4iss/iss_resizer.c:481:31: sparse: sparse: static assertion failed: "clamp() low limit (u32)(32) greater than high limit (u32)(fmt->height)"
vim +367 drivers/staging/media/imx/imx-media-csc-scaler.c
a8ef0488cc5929 Philipp Zabel 2019-08-14 333
a8ef0488cc5929 Philipp Zabel 2019-08-14 334 static int ipu_csc_scaler_s_selection(struct file *file, void *priv,
a8ef0488cc5929 Philipp Zabel 2019-08-14 335 struct v4l2_selection *s)
a8ef0488cc5929 Philipp Zabel 2019-08-14 336 {
a8ef0488cc5929 Philipp Zabel 2019-08-14 337 struct ipu_csc_scaler_ctx *ctx = fh_to_ctx(priv);
a8ef0488cc5929 Philipp Zabel 2019-08-14 338 struct ipu_csc_scaler_q_data *q_data;
a8ef0488cc5929 Philipp Zabel 2019-08-14 339
a8ef0488cc5929 Philipp Zabel 2019-08-14 340 switch (s->target) {
a8ef0488cc5929 Philipp Zabel 2019-08-14 341 case V4L2_SEL_TGT_CROP:
a8ef0488cc5929 Philipp Zabel 2019-08-14 342 if (s->type != V4L2_BUF_TYPE_VIDEO_OUTPUT)
a8ef0488cc5929 Philipp Zabel 2019-08-14 343 return -EINVAL;
a8ef0488cc5929 Philipp Zabel 2019-08-14 344 break;
a8ef0488cc5929 Philipp Zabel 2019-08-14 345 case V4L2_SEL_TGT_COMPOSE:
a8ef0488cc5929 Philipp Zabel 2019-08-14 346 if (s->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
a8ef0488cc5929 Philipp Zabel 2019-08-14 347 return -EINVAL;
a8ef0488cc5929 Philipp Zabel 2019-08-14 348 break;
a8ef0488cc5929 Philipp Zabel 2019-08-14 349 default:
a8ef0488cc5929 Philipp Zabel 2019-08-14 350 return -EINVAL;
a8ef0488cc5929 Philipp Zabel 2019-08-14 351 }
a8ef0488cc5929 Philipp Zabel 2019-08-14 352
a8ef0488cc5929 Philipp Zabel 2019-08-14 353 if (s->type != V4L2_BUF_TYPE_VIDEO_CAPTURE &&
a8ef0488cc5929 Philipp Zabel 2019-08-14 354 s->type != V4L2_BUF_TYPE_VIDEO_OUTPUT)
a8ef0488cc5929 Philipp Zabel 2019-08-14 355 return -EINVAL;
a8ef0488cc5929 Philipp Zabel 2019-08-14 356
a8ef0488cc5929 Philipp Zabel 2019-08-14 357 q_data = get_q_data(ctx, s->type);
a8ef0488cc5929 Philipp Zabel 2019-08-14 358
a8ef0488cc5929 Philipp Zabel 2019-08-14 359 /* The input's frame width to the IC must be a multiple of 8 pixels
a8ef0488cc5929 Philipp Zabel 2019-08-14 360 * When performing resizing the frame width must be multiple of burst
a8ef0488cc5929 Philipp Zabel 2019-08-14 361 * size - 8 or 16 pixels as defined by CB#_BURST_16 parameter.
a8ef0488cc5929 Philipp Zabel 2019-08-14 362 */
a8ef0488cc5929 Philipp Zabel 2019-08-14 363 if (s->flags & V4L2_SEL_FLAG_GE)
a8ef0488cc5929 Philipp Zabel 2019-08-14 364 s->r.width = round_up(s->r.width, 8);
a8ef0488cc5929 Philipp Zabel 2019-08-14 365 if (s->flags & V4L2_SEL_FLAG_LE)
a8ef0488cc5929 Philipp Zabel 2019-08-14 366 s->r.width = round_down(s->r.width, 8);
a8ef0488cc5929 Philipp Zabel 2019-08-14 @367 s->r.width = clamp_t(unsigned int, s->r.width, 8,
a8ef0488cc5929 Philipp Zabel 2019-08-14 368 round_down(q_data->cur_fmt.width, 8));
a8ef0488cc5929 Philipp Zabel 2019-08-14 @369 s->r.height = clamp_t(unsigned int, s->r.height, 1,
a8ef0488cc5929 Philipp Zabel 2019-08-14 370 q_data->cur_fmt.height);
a8ef0488cc5929 Philipp Zabel 2019-08-14 @371 s->r.left = clamp_t(unsigned int, s->r.left, 0,
a8ef0488cc5929 Philipp Zabel 2019-08-14 372 q_data->cur_fmt.width - s->r.width);
a8ef0488cc5929 Philipp Zabel 2019-08-14 @373 s->r.top = clamp_t(unsigned int, s->r.top, 0,
a8ef0488cc5929 Philipp Zabel 2019-08-14 374 q_data->cur_fmt.height - s->r.height);
a8ef0488cc5929 Philipp Zabel 2019-08-14 375
a8ef0488cc5929 Philipp Zabel 2019-08-14 376 /* V4L2_SEL_FLAG_KEEP_CONFIG is only valid for subdevices */
a8ef0488cc5929 Philipp Zabel 2019-08-14 377 q_data->rect = s->r;
a8ef0488cc5929 Philipp Zabel 2019-08-14 378
a8ef0488cc5929 Philipp Zabel 2019-08-14 379 return 0;
a8ef0488cc5929 Philipp Zabel 2019-08-14 380 }
a8ef0488cc5929 Philipp Zabel 2019-08-14 381
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
@ 2023-07-29 2:00 kernel test robot
0 siblings, 0 replies; 45+ messages in thread
From: kernel test robot @ 2023-07-29 2:00 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: kernel/sched/fair.c:2427:31: sparse: sparse: static assertion failed: "clamp() low limit task_scan_min(p) greater than high limit task_scan_max(p)""
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
References: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
TO: David Laight <David.Laight@ACULAB.COM>
TO: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
TO: "'Andy Shevchenko'" <andriy.shevchenko@linux.intel.com>
TO: "'Andrew Morton'" <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: "'Matthew Wilcox (Oracle)'" <willy@infradead.org>
TO: "'Christoph Hellwig'" <hch@infradead.org>
TO: "'Jason A. Donenfeld'" <Jason@zx2c4.com>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master crng-random/master v6.5-rc3 next-20230728]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/a09512c8526b46759669d0b879144563%40AcuMS.aculab.com
patch subject: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
:::::: branch date: 4 days ago
:::::: commit date: 4 days ago
config: s390-randconfig-r083-20230728 (https://download.01.org/0day-ci/archive/20230729/202307290936.NsOTbkUu-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230729/202307290936.NsOTbkUu-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202307290936.NsOTbkUu-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
kernel/sched/fair.c:2427:31: sparse: sparse: bad integer constant expression
>> kernel/sched/fair.c:2427:31: sparse: sparse: static assertion failed: "clamp() low limit task_scan_min(p) greater than high limit task_scan_max(p)"
kernel/sched/fair.c:3521:16: sparse: sparse: bad integer constant expression
kernel/sched/fair.c:3521:16: sparse: sparse: static assertion failed: "clamp() low limit (long)((1UL << 1)) greater than high limit (long)(tg_shares)"
kernel/sched/fair.c:9226:20: sparse: sparse: bad integer constant expression
kernel/sched/fair.c:9226:20: sparse: sparse: static assertion failed: "clamp() low limit 1UL greater than high limit max_load_balance_interval"
kernel/sched/fair.c:11091:20: sparse: sparse: bad integer constant expression
kernel/sched/fair.c:11091:20: sparse: sparse: static assertion failed: "clamp() low limit 1UL greater than high limit max_load_balance_interval"
kernel/sched/fair.c:5566:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/fair.c:5566:22: sparse: struct task_struct [noderef] __rcu *
kernel/sched/fair.c:5566:22: sparse: struct task_struct *
kernel/sched/fair.c:9762:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/fair.c:9762:22: sparse: struct task_struct [noderef] __rcu *
kernel/sched/fair.c:9762:22: sparse: struct task_struct *
kernel/sched/fair.c: note: in included file:
kernel/sched/sched.h:2273:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2273:9: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2273:9: sparse: struct task_struct *
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
vim +2427 kernel/sched/fair.c
04bb2f94750542 Rik van Riel 2013-10-07 2354
04bb2f94750542 Rik van Riel 2013-10-07 2355 /*
04bb2f94750542 Rik van Riel 2013-10-07 2356 * Increase the scan period (slow down scanning) if the majority of
04bb2f94750542 Rik van Riel 2013-10-07 2357 * our memory is already on our local node, or if the majority of
04bb2f94750542 Rik van Riel 2013-10-07 2358 * the page accesses are shared with other processes.
04bb2f94750542 Rik van Riel 2013-10-07 2359 * Otherwise, decrease the scan period.
04bb2f94750542 Rik van Riel 2013-10-07 2360 */
04bb2f94750542 Rik van Riel 2013-10-07 2361 static void update_task_scan_period(struct task_struct *p,
04bb2f94750542 Rik van Riel 2013-10-07 2362 unsigned long shared, unsigned long private)
04bb2f94750542 Rik van Riel 2013-10-07 2363 {
04bb2f94750542 Rik van Riel 2013-10-07 2364 unsigned int period_slot;
37ec97deb3a8c6 Rik van Riel 2017-07-31 2365 int lr_ratio, ps_ratio;
04bb2f94750542 Rik van Riel 2013-10-07 2366 int diff;
04bb2f94750542 Rik van Riel 2013-10-07 2367
04bb2f94750542 Rik van Riel 2013-10-07 2368 unsigned long remote = p->numa_faults_locality[0];
04bb2f94750542 Rik van Riel 2013-10-07 2369 unsigned long local = p->numa_faults_locality[1];
04bb2f94750542 Rik van Riel 2013-10-07 2370
04bb2f94750542 Rik van Riel 2013-10-07 2371 /*
04bb2f94750542 Rik van Riel 2013-10-07 2372 * If there were no record hinting faults then either the task is
7d380f24fe6620 Bharata B Rao 2021-10-04 2373 * completely idle or all activity is in areas that are not of interest
074c238177a75f Mel Gorman 2015-03-25 2374 * to automatic numa balancing. Related to that, if there were failed
074c238177a75f Mel Gorman 2015-03-25 2375 * migration then it implies we are migrating too quickly or the local
074c238177a75f Mel Gorman 2015-03-25 2376 * node is overloaded. In either case, scan slower
04bb2f94750542 Rik van Riel 2013-10-07 2377 */
074c238177a75f Mel Gorman 2015-03-25 2378 if (local + shared == 0 || p->numa_faults_locality[2]) {
04bb2f94750542 Rik van Riel 2013-10-07 2379 p->numa_scan_period = min(p->numa_scan_period_max,
04bb2f94750542 Rik van Riel 2013-10-07 2380 p->numa_scan_period << 1);
04bb2f94750542 Rik van Riel 2013-10-07 2381
04bb2f94750542 Rik van Riel 2013-10-07 2382 p->mm->numa_next_scan = jiffies +
04bb2f94750542 Rik van Riel 2013-10-07 2383 msecs_to_jiffies(p->numa_scan_period);
04bb2f94750542 Rik van Riel 2013-10-07 2384
04bb2f94750542 Rik van Riel 2013-10-07 2385 return;
04bb2f94750542 Rik van Riel 2013-10-07 2386 }
04bb2f94750542 Rik van Riel 2013-10-07 2387
04bb2f94750542 Rik van Riel 2013-10-07 2388 /*
04bb2f94750542 Rik van Riel 2013-10-07 2389 * Prepare to scale scan period relative to the current period.
04bb2f94750542 Rik van Riel 2013-10-07 2390 * == NUMA_PERIOD_THRESHOLD scan period stays the same
04bb2f94750542 Rik van Riel 2013-10-07 2391 * < NUMA_PERIOD_THRESHOLD scan period decreases (scan faster)
04bb2f94750542 Rik van Riel 2013-10-07 2392 * >= NUMA_PERIOD_THRESHOLD scan period increases (scan slower)
04bb2f94750542 Rik van Riel 2013-10-07 2393 */
04bb2f94750542 Rik van Riel 2013-10-07 2394 period_slot = DIV_ROUND_UP(p->numa_scan_period, NUMA_PERIOD_SLOTS);
37ec97deb3a8c6 Rik van Riel 2017-07-31 2395 lr_ratio = (local * NUMA_PERIOD_SLOTS) / (local + remote);
37ec97deb3a8c6 Rik van Riel 2017-07-31 2396 ps_ratio = (private * NUMA_PERIOD_SLOTS) / (private + shared);
37ec97deb3a8c6 Rik van Riel 2017-07-31 2397
37ec97deb3a8c6 Rik van Riel 2017-07-31 2398 if (ps_ratio >= NUMA_PERIOD_THRESHOLD) {
37ec97deb3a8c6 Rik van Riel 2017-07-31 2399 /*
37ec97deb3a8c6 Rik van Riel 2017-07-31 2400 * Most memory accesses are local. There is no need to
37ec97deb3a8c6 Rik van Riel 2017-07-31 2401 * do fast NUMA scanning, since memory is already local.
37ec97deb3a8c6 Rik van Riel 2017-07-31 2402 */
37ec97deb3a8c6 Rik van Riel 2017-07-31 2403 int slot = ps_ratio - NUMA_PERIOD_THRESHOLD;
37ec97deb3a8c6 Rik van Riel 2017-07-31 2404 if (!slot)
37ec97deb3a8c6 Rik van Riel 2017-07-31 2405 slot = 1;
37ec97deb3a8c6 Rik van Riel 2017-07-31 2406 diff = slot * period_slot;
37ec97deb3a8c6 Rik van Riel 2017-07-31 2407 } else if (lr_ratio >= NUMA_PERIOD_THRESHOLD) {
37ec97deb3a8c6 Rik van Riel 2017-07-31 2408 /*
37ec97deb3a8c6 Rik van Riel 2017-07-31 2409 * Most memory accesses are shared with other tasks.
37ec97deb3a8c6 Rik van Riel 2017-07-31 2410 * There is no point in continuing fast NUMA scanning,
37ec97deb3a8c6 Rik van Riel 2017-07-31 2411 * since other tasks may just move the memory elsewhere.
37ec97deb3a8c6 Rik van Riel 2017-07-31 2412 */
37ec97deb3a8c6 Rik van Riel 2017-07-31 2413 int slot = lr_ratio - NUMA_PERIOD_THRESHOLD;
04bb2f94750542 Rik van Riel 2013-10-07 2414 if (!slot)
04bb2f94750542 Rik van Riel 2013-10-07 2415 slot = 1;
04bb2f94750542 Rik van Riel 2013-10-07 2416 diff = slot * period_slot;
04bb2f94750542 Rik van Riel 2013-10-07 2417 } else {
04bb2f94750542 Rik van Riel 2013-10-07 2418 /*
37ec97deb3a8c6 Rik van Riel 2017-07-31 2419 * Private memory faults exceed (SLOTS-THRESHOLD)/SLOTS,
37ec97deb3a8c6 Rik van Riel 2017-07-31 2420 * yet they are not on the local NUMA node. Speed up
37ec97deb3a8c6 Rik van Riel 2017-07-31 2421 * NUMA scanning to get the memory moved over.
04bb2f94750542 Rik van Riel 2013-10-07 2422 */
37ec97deb3a8c6 Rik van Riel 2017-07-31 2423 int ratio = max(lr_ratio, ps_ratio);
37ec97deb3a8c6 Rik van Riel 2017-07-31 2424 diff = -(NUMA_PERIOD_THRESHOLD - ratio) * period_slot;
04bb2f94750542 Rik van Riel 2013-10-07 2425 }
04bb2f94750542 Rik van Riel 2013-10-07 2426
04bb2f94750542 Rik van Riel 2013-10-07 @2427 p->numa_scan_period = clamp(p->numa_scan_period + diff,
04bb2f94750542 Rik van Riel 2013-10-07 2428 task_scan_min(p), task_scan_max(p));
04bb2f94750542 Rik van Riel 2013-10-07 2429 memset(p->numa_faults_locality, 0, sizeof(p->numa_faults_locality));
04bb2f94750542 Rik van Riel 2013-10-07 2430 }
04bb2f94750542 Rik van Riel 2013-10-07 2431
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
@ 2023-07-29 1:19 kernel test robot
0 siblings, 0 replies; 45+ messages in thread
From: kernel test robot @ 2023-07-29 1:19 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: drivers/net/virtio_net.c:1719:25: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(rq->min_buf_len) greater than high limit (unsigned int)((1UL << 13) - hdr_len)""
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
References: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
TO: David Laight <David.Laight@ACULAB.COM>
TO: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
TO: "'Andy Shevchenko'" <andriy.shevchenko@linux.intel.com>
TO: "'Andrew Morton'" <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: "'Matthew Wilcox (Oracle)'" <willy@infradead.org>
TO: "'Christoph Hellwig'" <hch@infradead.org>
TO: "'Jason A. Donenfeld'" <Jason@zx2c4.com>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master crng-random/master v6.5-rc3 next-20230728]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/a09512c8526b46759669d0b879144563%40AcuMS.aculab.com
patch subject: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
:::::: branch date: 4 days ago
:::::: commit date: 4 days ago
config: openrisc-randconfig-r081-20230728 (https://download.01.org/0day-ci/archive/20230729/202307290955.JTEbSvfx-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230729/202307290955.JTEbSvfx-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202307290955.JTEbSvfx-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
drivers/net/virtio_net.c:1719:25: sparse: sparse: bad integer constant expression
>> drivers/net/virtio_net.c:1719:25: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(rq->min_buf_len) greater than high limit (unsigned int)((1UL << 13) - hdr_len)"
vim +1719 drivers/net/virtio_net.c
296f96fcfc160e Rusty Russell 2007-10-22 1707
d85b758f72b05a Michael S. Tsirkin 2017-03-09 1708 static unsigned int get_mergeable_buf_len(struct receive_queue *rq,
3cc81a9aac4382 Jason Wang 2018-03-02 1709 struct ewma_pkt_len *avg_pkt_len,
3cc81a9aac4382 Jason Wang 2018-03-02 1710 unsigned int room)
3f2c31d90327f2 Mark McLoughlin 2008-11-16 1711 {
c1ddc42da2b263 Andrew Melnychenko 2022-03-28 1712 struct virtnet_info *vi = rq->vq->vdev->priv;
c1ddc42da2b263 Andrew Melnychenko 2022-03-28 1713 const size_t hdr_len = vi->hdr_len;
fbf28d78f54016 Michael Dalton 2014-01-16 1714 unsigned int len;
fbf28d78f54016 Michael Dalton 2014-01-16 1715
3cc81a9aac4382 Jason Wang 2018-03-02 1716 if (room)
3cc81a9aac4382 Jason Wang 2018-03-02 1717 return PAGE_SIZE - room;
3cc81a9aac4382 Jason Wang 2018-03-02 1718
5377d75823ff90 Johannes Berg 2015-08-19 @1719 len = hdr_len + clamp_t(unsigned int, ewma_pkt_len_read(avg_pkt_len),
f0c3192ceee3c1 Michael S. Tsirkin 2017-06-02 1720 rq->min_buf_len, PAGE_SIZE - hdr_len);
3cc81a9aac4382 Jason Wang 2018-03-02 1721
e377fcc8486d40 Michael S. Tsirkin 2017-03-06 1722 return ALIGN(len, L1_CACHE_BYTES);
fbf28d78f54016 Michael Dalton 2014-01-16 1723 }
fbf28d78f54016 Michael Dalton 2014-01-16 1724
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
@ 2023-07-28 23:47 kernel test robot
0 siblings, 0 replies; 45+ messages in thread
From: kernel test robot @ 2023-07-28 23:47 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: drivers/hwmon/bt1-pvt.c:354:24: sparse: sparse: bad integer constant expression"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
References: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
TO: David Laight <David.Laight@ACULAB.COM>
TO: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
TO: "'Andy Shevchenko'" <andriy.shevchenko@linux.intel.com>
TO: "'Andrew Morton'" <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: "'Matthew Wilcox (Oracle)'" <willy@infradead.org>
TO: "'Christoph Hellwig'" <hch@infradead.org>
TO: "'Jason A. Donenfeld'" <Jason@zx2c4.com>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master crng-random/master v6.5-rc3 next-20230728]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/a09512c8526b46759669d0b879144563%40AcuMS.aculab.com
patch subject: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
:::::: branch date: 3 days ago
:::::: commit date: 3 days ago
config: sparc64-randconfig-r082-20230728 (https://download.01.org/0day-ci/archive/20230729/202307290758.YrrAnTBI-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230729/202307290758.YrrAnTBI-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202307290758.YrrAnTBI-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/hwmon/bt1-pvt.c:354:24: sparse: sparse: bad integer constant expression
>> drivers/hwmon/bt1-pvt.c:354:24: sparse: sparse: static assertion failed: "clamp() low limit (typeof(data))(0) greater than high limit (typeof(data))(limit)"
drivers/hwmon/bt1-pvt.c:359:24: sparse: sparse: bad integer constant expression
>> drivers/hwmon/bt1-pvt.c:359:24: sparse: sparse: static assertion failed: "clamp() low limit (typeof(data))(limit) greater than high limit (typeof(data))(((((0)) + (((~(((0UL)))) - ((((1UL))) << (0)) + 1) & (~(((0UL))) >> (64 - 1 - (9))))) >> 0))"
--
>> drivers/powercap/arm_scmi_powercap.c:107:17: sparse: sparse: bad integer constant expression
>> drivers/powercap/arm_scmi_powercap.c:107:17: sparse: sparse: static assertion failed: "clamp() low limit (u32)(spz->info->min_power_cap) greater than high limit (u32)(spz->info->max_power_cap)"
drivers/powercap/arm_scmi_powercap.c:158:17: sparse: sparse: bad integer constant expression
>> drivers/powercap/arm_scmi_powercap.c:158:17: sparse: sparse: static assertion failed: "clamp() low limit (u32)(spz->info->min_pai) greater than high limit (u32)(spz->info->max_pai)"
vim +354 drivers/hwmon/bt1-pvt.c
87976ce2825d9f Serge Semin 2020-05-28 330
87976ce2825d9f Serge Semin 2020-05-28 331 static int pvt_write_limit(struct pvt_hwmon *pvt, enum pvt_sensor_type type,
87976ce2825d9f Serge Semin 2020-05-28 332 bool is_low, long val)
87976ce2825d9f Serge Semin 2020-05-28 333 {
87976ce2825d9f Serge Semin 2020-05-28 334 u32 data, limit, mask;
87976ce2825d9f Serge Semin 2020-05-28 335 int ret;
87976ce2825d9f Serge Semin 2020-05-28 336
87976ce2825d9f Serge Semin 2020-05-28 337 if (type == PVT_TEMP) {
87976ce2825d9f Serge Semin 2020-05-28 338 val = clamp(val, PVT_TEMP_MIN, PVT_TEMP_MAX);
e0daf1a60ed478 Michael Walle 2022-04-01 339 data = polynomial_calc(&poly_temp_to_N, val);
87976ce2825d9f Serge Semin 2020-05-28 340 } else {
87976ce2825d9f Serge Semin 2020-05-28 341 val = clamp(val, PVT_VOLT_MIN, PVT_VOLT_MAX);
e0daf1a60ed478 Michael Walle 2022-04-01 342 data = polynomial_calc(&poly_volt_to_N, val);
87976ce2825d9f Serge Semin 2020-05-28 343 }
87976ce2825d9f Serge Semin 2020-05-28 344
87976ce2825d9f Serge Semin 2020-05-28 345 /* Serialize limit update, since a part of the register is changed. */
87976ce2825d9f Serge Semin 2020-05-28 346 ret = mutex_lock_interruptible(&pvt->iface_mtx);
87976ce2825d9f Serge Semin 2020-05-28 347 if (ret)
87976ce2825d9f Serge Semin 2020-05-28 348 return ret;
87976ce2825d9f Serge Semin 2020-05-28 349
87976ce2825d9f Serge Semin 2020-05-28 350 /* Make sure the upper and lower ranges don't intersect. */
87976ce2825d9f Serge Semin 2020-05-28 351 limit = readl(pvt->regs + pvt_info[type].thres_base);
87976ce2825d9f Serge Semin 2020-05-28 352 if (is_low) {
87976ce2825d9f Serge Semin 2020-05-28 353 limit = FIELD_GET(PVT_THRES_HI_MASK, limit);
87976ce2825d9f Serge Semin 2020-05-28 @354 data = clamp_val(data, PVT_DATA_MIN, limit);
87976ce2825d9f Serge Semin 2020-05-28 355 data = FIELD_PREP(PVT_THRES_LO_MASK, data);
87976ce2825d9f Serge Semin 2020-05-28 356 mask = PVT_THRES_LO_MASK;
87976ce2825d9f Serge Semin 2020-05-28 357 } else {
87976ce2825d9f Serge Semin 2020-05-28 358 limit = FIELD_GET(PVT_THRES_LO_MASK, limit);
87976ce2825d9f Serge Semin 2020-05-28 @359 data = clamp_val(data, limit, PVT_DATA_MAX);
87976ce2825d9f Serge Semin 2020-05-28 360 data = FIELD_PREP(PVT_THRES_HI_MASK, data);
87976ce2825d9f Serge Semin 2020-05-28 361 mask = PVT_THRES_HI_MASK;
87976ce2825d9f Serge Semin 2020-05-28 362 }
87976ce2825d9f Serge Semin 2020-05-28 363
87976ce2825d9f Serge Semin 2020-05-28 364 pvt_update(pvt->regs + pvt_info[type].thres_base, mask, data);
87976ce2825d9f Serge Semin 2020-05-28 365
87976ce2825d9f Serge Semin 2020-05-28 366 mutex_unlock(&pvt->iface_mtx);
87976ce2825d9f Serge Semin 2020-05-28 367
87976ce2825d9f Serge Semin 2020-05-28 368 return 0;
87976ce2825d9f Serge Semin 2020-05-28 369 }
87976ce2825d9f Serge Semin 2020-05-28 370
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
@ 2023-07-28 10:25 kernel test robot
0 siblings, 0 replies; 45+ messages in thread
From: kernel test robot @ 2023-07-28 10:25 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: drivers/hid/hid-nintendo.c:1568:32: sparse: sparse: bad integer constant expression"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
References: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
TO: David Laight <David.Laight@ACULAB.COM>
TO: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
TO: "'Andy Shevchenko'" <andriy.shevchenko@linux.intel.com>
TO: "'Andrew Morton'" <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: "'Matthew Wilcox (Oracle)'" <willy@infradead.org>
TO: "'Christoph Hellwig'" <hch@infradead.org>
TO: "'Jason A. Donenfeld'" <Jason@zx2c4.com>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master v6.5-rc3 next-20230728]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/a09512c8526b46759669d0b879144563%40AcuMS.aculab.com
patch subject: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
:::::: branch date: 3 days ago
:::::: commit date: 3 days ago
config: sparc-randconfig-r091-20230727 (https://download.01.org/0day-ci/archive/20230728/202307281858.Z5bry3r7-lkp@intel.com/config)
compiler: sparc-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230728/202307281858.Z5bry3r7-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202307281858.Z5bry3r7-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/hid/hid-nintendo.c:1568:32: sparse: sparse: bad integer constant expression
>> drivers/hid/hid-nintendo.c:1568:32: sparse: sparse: static assertion failed: "clamp() low limit JOYCON_MIN_RUMBLE_LOW_FREQ greater than high limit JOYCON_MAX_RUMBLE_LOW_FREQ"
drivers/hid/hid-nintendo.c:1571:32: sparse: sparse: bad integer constant expression
>> drivers/hid/hid-nintendo.c:1571:32: sparse: sparse: static assertion failed: "clamp() low limit JOYCON_MIN_RUMBLE_HIGH_FREQ greater than high limit JOYCON_MAX_RUMBLE_HIGH_FREQ"
drivers/hid/hid-nintendo.c:1574:32: sparse: sparse: bad integer constant expression
drivers/hid/hid-nintendo.c:1574:32: sparse: sparse: static assertion failed: "clamp() low limit JOYCON_MIN_RUMBLE_LOW_FREQ greater than high limit JOYCON_MAX_RUMBLE_LOW_FREQ"
drivers/hid/hid-nintendo.c:1577:32: sparse: sparse: bad integer constant expression
drivers/hid/hid-nintendo.c:1577:32: sparse: sparse: static assertion failed: "clamp() low limit JOYCON_MIN_RUMBLE_HIGH_FREQ greater than high limit JOYCON_MAX_RUMBLE_HIGH_FREQ"
--
>> sound/pci/emu10k1/emuproc.c:370:17: sparse: sparse: bad integer constant expression
>> sound/pci/emu10k1/emuproc.c:370:17: sparse: sparse: static assertion failed: "clamp() low limit 0 greater than high limit nspaces"
vim +1568 drivers/hid/hid-nintendo.c
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 1562
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 1563 static void joycon_clamp_rumble_freqs(struct joycon_ctlr *ctlr)
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 1564 {
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 1565 unsigned long flags;
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 1566
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 1567 spin_lock_irqsave(&ctlr->lock, flags);
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 @1568 ctlr->rumble_ll_freq = clamp(ctlr->rumble_ll_freq,
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 1569 JOYCON_MIN_RUMBLE_LOW_FREQ,
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 1570 JOYCON_MAX_RUMBLE_LOW_FREQ);
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 @1571 ctlr->rumble_lh_freq = clamp(ctlr->rumble_lh_freq,
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 1572 JOYCON_MIN_RUMBLE_HIGH_FREQ,
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 1573 JOYCON_MAX_RUMBLE_HIGH_FREQ);
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 1574 ctlr->rumble_rl_freq = clamp(ctlr->rumble_rl_freq,
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 1575 JOYCON_MIN_RUMBLE_LOW_FREQ,
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 1576 JOYCON_MAX_RUMBLE_LOW_FREQ);
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 1577 ctlr->rumble_rh_freq = clamp(ctlr->rumble_rh_freq,
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 1578 JOYCON_MIN_RUMBLE_HIGH_FREQ,
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 1579 JOYCON_MAX_RUMBLE_HIGH_FREQ);
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 1580 spin_unlock_irqrestore(&ctlr->lock, flags);
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 1581 }
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 1582
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
@ 2023-07-28 9:53 kernel test robot
0 siblings, 0 replies; 45+ messages in thread
From: kernel test robot @ 2023-07-28 9:53 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: drivers/clk/baikal-t1/ccu-div.c:227:16: sparse: sparse: bad integer constant expression"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
References: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
TO: David Laight <David.Laight@ACULAB.COM>
TO: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
TO: "'Andy Shevchenko'" <andriy.shevchenko@linux.intel.com>
TO: "'Andrew Morton'" <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: "'Matthew Wilcox (Oracle)'" <willy@infradead.org>
TO: "'Christoph Hellwig'" <hch@infradead.org>
TO: "'Jason A. Donenfeld'" <Jason@zx2c4.com>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master crng-random/master v6.5-rc3 next-20230728]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/a09512c8526b46759669d0b879144563%40AcuMS.aculab.com
patch subject: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
:::::: branch date: 3 days ago
:::::: commit date: 3 days ago
config: m68k-randconfig-r092-20230727 (https://download.01.org/0day-ci/archive/20230728/202307281720.mbvQspFC-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230728/202307281720.mbvQspFC-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202307281720.mbvQspFC-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/clk/baikal-t1/ccu-div.c:227:16: sparse: sparse: bad integer constant expression
>> drivers/clk/baikal-t1/ccu-div.c:227:16: sparse: sparse: static assertion failed: "clamp() low limit (unsigned long)(0) greater than high limit (unsigned long)(((mask) >> 4))"
--
>> drivers/clk/ingenic/jz4760-cgu.c:67:13: sparse: sparse: bad integer constant expression
>> drivers/clk/ingenic/jz4760-cgu.c:67:13: sparse: sparse: static assertion failed: "clamp() low limit (typeof(n))(2) greater than high limit (typeof(n))(1 << pll_info->n_bits)"
--
>> drivers/media/radio/dsbr100.c:209:39: sparse: sparse: bad integer constant expression
>> drivers/media/radio/dsbr100.c:209:39: sparse: sparse: static assertion failed: "clamp() low limit (unsigned)(87.5 * 16000) greater than high limit (unsigned)(108.0 * 16000)"
--
>> drivers/clk/renesas/rcar-gen2-cpg.c:78:16: sparse: sparse: bad integer constant expression
>> drivers/clk/renesas/rcar-gen2-cpg.c:78:16: sparse: sparse: static assertion failed: "clamp() low limit min_mult greater than high limit max_mult"
--
>> drivers/clk/renesas/rcar-gen3-cpg.c:79:16: sparse: sparse: bad integer constant expression
>> drivers/clk/renesas/rcar-gen3-cpg.c:79:16: sparse: sparse: static assertion failed: "clamp() low limit min_mult greater than high limit max_mult"
drivers/clk/renesas/rcar-gen3-cpg.c:214:16: sparse: sparse: bad integer constant expression
drivers/clk/renesas/rcar-gen3-cpg.c:214:16: sparse: sparse: static assertion failed: "clamp() low limit min_mult greater than high limit max_mult"
--
>> drivers/clk/renesas/rcar-gen4-cpg.c:94:16: sparse: sparse: bad integer constant expression
>> drivers/clk/renesas/rcar-gen4-cpg.c:94:16: sparse: sparse: static assertion failed: "clamp() low limit min_mult greater than high limit max_mult"
drivers/clk/renesas/rcar-gen4-cpg.c:234:16: sparse: sparse: bad integer constant expression
drivers/clk/renesas/rcar-gen4-cpg.c:234:16: sparse: sparse: static assertion failed: "clamp() low limit min_mult greater than high limit max_mult"
--
>> drivers/clk/renesas/clk-div6.c:127:23: sparse: sparse: bad integer constant expression
>> drivers/clk/renesas/clk-div6.c:127:23: sparse: sparse: static assertion failed: "clamp() low limit min_div greater than high limit max_div"
--
>> drivers/net/phy/bcm54140.c:311:15: sparse: sparse: bad integer constant expression
>> drivers/net/phy/bcm54140.c:311:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))((413350L - (mask) * 491)) greater than high limit (typeof(val))((413350L - (0) * 491))"
drivers/net/phy/bcm54140.c:336:15: sparse: sparse: bad integer constant expression
>> drivers/net/phy/bcm54140.c:336:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(((channel) ? ((mask) * 4400 >> 12) : ((mask) * 2514 >> 11)))"
--
>> drivers/media/usb/airspy/airspy.c:758:28: sparse: sparse: bad integer constant expression
>> drivers/media/usb/airspy/airspy.c:758:28: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(bands[0].rangelow) greater than high limit (unsigned int)(bands[0].rangehigh)"
drivers/media/usb/airspy/airspy.c:764:27: sparse: sparse: bad integer constant expression
>> drivers/media/usb/airspy/airspy.c:764:27: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(bands_rf[0].rangelow) greater than high limit (unsigned int)(bands_rf[0].rangehigh)"
--
>> drivers/media/usb/hackrf/hackrf.c:1098:25: sparse: sparse: bad integer constant expression
>> drivers/media/usb/hackrf/hackrf.c:1098:25: sparse: sparse: static assertion failed: "clamp() low limit bands_adc_dac[0].rangelow greater than high limit bands_adc_dac[0].rangehigh"
drivers/media/usb/hackrf/hackrf.c:1108:25: sparse: sparse: bad integer constant expression
>> drivers/media/usb/hackrf/hackrf.c:1108:25: sparse: sparse: static assertion failed: "clamp() low limit bands_rx_tx[0].rangelow greater than high limit bands_rx_tx[0].rangehigh"
vim +227 drivers/clk/baikal-t1/ccu-div.c
353afa3a8d2ef4a Serge Semin 2020-05-27 219
353afa3a8d2ef4a Serge Semin 2020-05-27 220 static inline unsigned long ccu_div_var_calc_divider(unsigned long rate,
353afa3a8d2ef4a Serge Semin 2020-05-27 221 unsigned long parent_rate,
353afa3a8d2ef4a Serge Semin 2020-05-27 222 unsigned int mask)
353afa3a8d2ef4a Serge Semin 2020-05-27 223 {
353afa3a8d2ef4a Serge Semin 2020-05-27 224 unsigned long divider;
353afa3a8d2ef4a Serge Semin 2020-05-27 225
353afa3a8d2ef4a Serge Semin 2020-05-27 226 divider = parent_rate / rate;
353afa3a8d2ef4a Serge Semin 2020-05-27 @227 return clamp_t(unsigned long, divider, CCU_DIV_CLKDIV_MIN,
353afa3a8d2ef4a Serge Semin 2020-05-27 228 CCU_DIV_CLKDIV_MAX(mask));
353afa3a8d2ef4a Serge Semin 2020-05-27 229 }
353afa3a8d2ef4a Serge Semin 2020-05-27 230
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
@ 2023-07-27 21:24 kernel test robot
0 siblings, 0 replies; 45+ messages in thread
From: kernel test robot @ 2023-07-27 21:24 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: fs/inode.c:2462:20: sparse: sparse: bad integer constant expression"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
References: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
TO: David Laight <David.Laight@ACULAB.COM>
TO: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
TO: "'Andy Shevchenko'" <andriy.shevchenko@linux.intel.com>
TO: "'Andrew Morton'" <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: "'Matthew Wilcox (Oracle)'" <willy@infradead.org>
TO: "'Christoph Hellwig'" <hch@infradead.org>
TO: "'Jason A. Donenfeld'" <Jason@zx2c4.com>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master v6.5-rc3 next-20230727]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/a09512c8526b46759669d0b879144563%40AcuMS.aculab.com
patch subject: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: microblaze-randconfig-r092-20230725 (https://download.01.org/0day-ci/archive/20230728/202307280529.mXOy9Qpi-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230728/202307280529.mXOy9Qpi-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202307280529.mXOy9Qpi-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> fs/inode.c:2462:20: sparse: sparse: bad integer constant expression
>> fs/inode.c:2462:20: sparse: sparse: static assertion failed: "clamp() low limit sb->s_time_min greater than high limit sb->s_time_max"
--
>> kernel/workqueue.c:4579:16: sparse: sparse: bad integer constant expression
>> kernel/workqueue.c:4579:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(max_active))(1) greater than high limit (typeof(max_active))(lim)"
--
>> lib/dynamic_queue_limits.c:101:17: sparse: sparse: bad integer constant expression
>> lib/dynamic_queue_limits.c:101:17: sparse: sparse: static assertion failed: "clamp() low limit dql->min_limit greater than high limit dql->max_limit"
--
>> mm/mm_init.c:908:21: sparse: sparse: bad integer constant expression
>> mm/mm_init.c:908:21: sparse: sparse: static assertion failed: "clamp() low limit zone_start_pfn greater than high limit zone_end_pfn"
mm/mm_init.c:909:19: sparse: sparse: bad integer constant expression
mm/mm_init.c:909:19: sparse: sparse: static assertion failed: "clamp() low limit zone_start_pfn greater than high limit zone_end_pfn"
mm/mm_init.c:1145:29: sparse: sparse: bad integer constant expression
>> mm/mm_init.c:1145:29: sparse: sparse: static assertion failed: "clamp() low limit range_start_pfn greater than high limit range_end_pfn"
mm/mm_init.c:1146:27: sparse: sparse: bad integer constant expression
mm/mm_init.c:1146:27: sparse: sparse: static assertion failed: "clamp() low limit range_start_pfn greater than high limit range_end_pfn"
mm/mm_init.c:1189:37: sparse: sparse: bad integer constant expression
mm/mm_init.c:1189:37: sparse: sparse: static assertion failed: "clamp() low limit zone_start_pfn greater than high limit zone_end_pfn"
mm/mm_init.c:1191:35: sparse: sparse: bad integer constant expression
mm/mm_init.c:1191:35: sparse: sparse: static assertion failed: "clamp() low limit zone_start_pfn greater than high limit zone_end_pfn"
mm/mm_init.c:1222:27: sparse: sparse: bad integer constant expression
>> mm/mm_init.c:1222:27: sparse: sparse: static assertion failed: "clamp() low limit zone_low greater than high limit zone_high"
mm/mm_init.c:1223:25: sparse: sparse: bad integer constant expression
mm/mm_init.c:1223:25: sparse: sparse: static assertion failed: "clamp() low limit zone_low greater than high limit zone_high"
--
>> mm/memblock.c:222:30: sparse: sparse: bad integer constant expression
>> mm/memblock.c:222:30: sparse: sparse: static assertion failed: "clamp() low limit start greater than high limit end"
mm/memblock.c:223:28: sparse: sparse: bad integer constant expression
mm/memblock.c:223:28: sparse: sparse: static assertion failed: "clamp() low limit start greater than high limit end"
mm/memblock.c:258:30: sparse: sparse: bad integer constant expression
mm/memblock.c:258:30: sparse: sparse: static assertion failed: "clamp() low limit start greater than high limit end"
mm/memblock.c:259:28: sparse: sparse: bad integer constant expression
mm/memblock.c:259:28: sparse: sparse: static assertion failed: "clamp() low limit start greater than high limit end"
--
>> mm/page_alloc.c:2415:17: sparse: sparse: bad integer constant expression
>> mm/page_alloc.c:2415:17: sparse: sparse: static assertion failed: "clamp() low limit min_nr_free greater than high limit max_nr_free"
--
>> drivers/clk/clk.c:1484:29: sparse: sparse: bad integer constant expression
>> drivers/clk/clk.c:1484:29: sparse: sparse: static assertion failed: "clamp() low limit req->min_rate greater than high limit req->max_rate"
drivers/clk/clk.c:2613:16: sparse: sparse: bad integer constant expression
>> drivers/clk/clk.c:2613:16: sparse: sparse: static assertion failed: "clamp() low limit min greater than high limit max"
--
>> drivers/clk/clk-versaclock5.c:456:16: sparse: sparse: bad integer constant expression
>> drivers/clk/clk-versaclock5.c:456:16: sparse: sparse: static assertion failed: "clamp() low limit 2500000000UL greater than high limit vc5->chip_info->vco_max"
--
>> security/apparmor/lsm.c:1559:42: sparse: sparse: bad integer constant expression
>> security/apparmor/lsm.c:1559:42: sparse: sparse: static assertion failed: "clamp() low limit zstd_min_clevel() greater than high limit zstd_max_clevel()"
--
>> drivers/hwmon/w83793.c:201:16: sparse: sparse: bad integer constant expression
>> drivers/hwmon/w83793.c:201:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof((val + (val < 0 ? -500 : 500)) / 1000))(min) greater than high limit (typeof((val + (val < 0 ? -500 : 500)) / 1000))(max)"
--
>> drivers/hwmon/w83795.c:273:16: sparse: sparse: bad integer constant expression
>> drivers/hwmon/w83795.c:273:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val / 1000))(min) greater than high limit (typeof(val / 1000))(max)"
--
>> drivers/hwmon/adm1026.c:498:28: sparse: sparse: bad integer constant expression
>> drivers/hwmon/adm1026.c:498:28: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(255 * adm1026_scaling[nr] / 192)"
drivers/hwmon/adm1026.c:526:28: sparse: sparse: bad integer constant expression
drivers/hwmon/adm1026.c:526:28: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(255 * adm1026_scaling[nr] / 192)"
drivers/hwmon/adm1026.c:609:28: sparse: sparse: bad integer constant expression
drivers/hwmon/adm1026.c:609:28: sparse: sparse: static assertion failed: "clamp() low limit (typeof(({ __builtin_choose_expr((sizeof(int) == sizeof(*(8 ? ((void *)((long)(((typeof(val))(val)) - ((typeof(val))((-((int)(~0U >> 1)) - 1))) + ((typeof(val))(((int)(~0U >> 1)) - 16000))) * 0l)) : (int *)8))), (((typeof(val))(val)) >= ((typeof(val))(((int)(~0U >> 1)) - 16000)) ? ((typeof(val))(((int)(~0U >> 1)) - 16000)) : (((typeof(val))(val)) <= ((typeof(val))((-((int)(~0U >> 1)) - 1))) ? ((typeof(val))((-((int)(~0U >> 1)) - 1))) : ((typeof(val))(val)))), ({ typeof((typeof(val))(val)) __UNIQUE_ID___val326 = ((typeof(val))(val)); typeof((typeof(val))((-((int)(~0U >> 1)) - 1))) __UNIQUE_ID___lo327 = ((typeof(val))((-((int)(~0U >> 1)) - 1))); typeof((typeof(val))(((int)(~0U >> 1)) - 16000)) __UNIQUE_ID___hi328 = ((typeof(val))(((int)(~0U >> 1)) - 16000)); _Static_assert(!(sizeof(int) == sizeof(*(8 ? ((void *)((long)(((typeof(val))((-((int)(~0U >> 1)) - 1))) > ((typeof(val))(((int)(~0U >> 1)) - 16000))) * 0l)) : (int *)8))) || ((typeof(val))((-((int)(~0U >> 1)) - 1))) <= ((typeof(val))(((int)(~0U >> 1)) - 16000)), "clamp() low limit " "(typeof(val))((-((int)(~0U >> 1)) - 1))" " greater than high limit " "(typeof(val))(((int)(~0U >> 1)) - 16000)"); _Static_assert(((((typeof((typeof(val))(val)))(-1)) < (__attribute__((force)) typeof((typeof(val))(val)))1) == (((typeof((typeof(val))((-((int)(~0U >> 1)) - 1))))(-1)) < (__attribute__((force)) typeof((typeof(val))((-((int)(~0U >> 1)) - 1))))1)), "clamp() 'lo' signedness error"); _Static_assert(((((typeof((typeof(val))(val)))(-1)) < (__attribute__((force)) typeof((typeof(val))(val)))1) == (((typeof((typeof(val))(((int)(~0U >> 1)) - 16000)))(-1)) < (__attribute__((force)) typeof((typeof(val))(((int)(~0U >> 1)) - 16000)))1)), "clamp() 'hi' signedness error"); ((__UNIQUE_ID___val326) >= (__UNIQUE_ID___hi328) ? (__UNIQUE_ID___hi328) : ((__UNIQUE_ID___val326) <= (__UNIQUE_ID___lo327) ? (__UNIQUE_ID___lo327) : (__UNIQUE_ID___val326))); })); }) + 16000))(0) greater than high limit (typeof(({ __builtin_choose_expr((sizeof(int) == sizeof(*(8 ? ((void *)((long)(((typeof(val))(val)) - ((typeof(val))((-((int)(~0U >> 1)) - 1))) + ((typeof(val))(((int)(~0U >> 1)) - 16000))) * 0l)) : (int *)8))), (((typeof(val))(val)) >= ((typeof(val))(((int)(~0U >> 1)) - 16000)) ? ((typeof(val))(((int)(~0U >> 1)) - 16000)) : (((typeof(val))(val)) <= ((typeof(val))((-((int)(~0U >> 1)) - 1))) ? ((typeof(val))((-((int)(~0U >> 1)) - 1))) : ((typeof(val))(val)))), ({ typeof((typeof(val))(val)) __UNIQUE_ID___val326 = ((typeof(val))(val)); typeof((typeof(val))((-((int)(~0U >> 1)) - 1))) __UNIQUE_ID___lo327 = ((typeof(val))((-((int)(~0U >> 1)) - 1))); typeof((typeof(val))(((int)(~0U >> 1)) - 16000)) __UNIQUE_ID___hi328 = ((typeof(val))(((int)(~0U >> 1)) - 16000)); _Static_assert(!(sizeof(int) == sizeof(*(8 ? ((void *)((long)(((typeof(val))((-((int)(~0U >> 1)) - 1))) > ((typeof(val))(((int)(~0U >> 1)) - 16000))) * 0l)) : (int *)8))) || ((typeof(val))((-((int)(~0U >> 1)) - 1))) <= ((typeof(val))(((int)(~0U >> 1)) - 16000)), "clamp() low limit " "(typeof(val))((-((int)(~0U >> 1)) - 1))" " greater than high limit " "(typeof(val))(((int)(~0U >> 1)) - 16000)"); _Static_assert(((((typeof((typeof(val))(val)))(-1)) < (__attribute__((force)) typeof((typeof(val))(val)))1) == (((typeof((typeof(val))((-((int)(~0U >> 1)) - 1))))(-1)) < (__attribute__((force)) typeof((typeof(val))((-((int)(~0U >> 1)) - 1))))1)), "clamp() 'lo' signedness error"); _Static_assert(((((typeof((typeof(val))(val)))(-1)) < (__attribute__((force)) typeof((typeof(val))(val)))1) == (((typeof((typeof(val))(((int)(~0U >> 1)) - 16000)))(-1)) < (__attribute__((force)) typeof((typeof(val))(((int)(~0U >> 1)) - 16000)))1)), "clamp() 'hi' signedness error"); ((__UNIQUE_ID___val326) >= (__UNIQUE_ID___hi328) ? (__UNIQUE_ID___hi328) : ((__UNIQUE_ID___val326) <= (__UNIQUE_ID___lo327) ? (__UNIQUE_ID___lo327) : (__UNIQUE_ID___val326))); })); }) + 16000))(255 * adm1026_scaling[16] / 192)"
drivers/hwmon/adm1026.c:638:28: sparse: sparse: bad integer constant expression
drivers/hwmon/adm1026.c:638:28: sparse: sparse: static assertion failed: "clamp() low limit (typeof(({ __builtin_choose_expr((sizeof(int) == sizeof(*(8 ? ((void *)((long)(((typeof(val))(val)) - ((typeof(val))((-((int)(~0U >> 1)) - 1))) + ((typeof(val))(((int)(~0U >> 1)) - 16000))) * 0l)) : (int *)8))), (((typeof(val))(val)) >= ((typeof(val))(((int)(~0U >> 1)) - 16000)) ? ((typeof(val))(((int)(~0U >> 1)) - 16000)) : (((typeof(val))(val)) <= ((typeof(val))((-((int)(~0U >> 1)) - 1))) ? ((typeof(val))((-((int)(~0U >> 1)) - 1))) : ((typeof(val))(val)))), ({ typeof((typeof(val))(val)) __UNIQUE_ID___val332 = ((typeof(val))(val)); typeof((typeof(val))((-((int)(~0U >> 1)) - 1))) __UNIQUE_ID___lo333 = ((typeof(val))((-((int)(~0U >> 1)) - 1))); typeof((typeof(val))(((int)(~0U >> 1)) - 16000)) __UNIQUE_ID___hi334 = ((typeof(val))(((int)(~0U >> 1)) - 16000)); _Static_assert(!(sizeof(int) == sizeof(*(8 ? ((void *)((long)(((typeof(val))((-((int)(~0U >> 1)) - 1))) > ((typeof(val))(((int)(~0U >> 1)) - 16000))) * 0l)) : (int *)8))) || ((typeof(val))((-((int)(~0U >> 1)) - 1))) <= ((typeof(val))(((int)(~0U >> 1)) - 16000)), "clamp() low limit " "(typeof(val))((-((int)(~0U >> 1)) - 1))" " greater than high limit " "(typeof(val))(((int)(~0U >> 1)) - 16000)"); _Static_assert(((((typeof((typeof(val))(val)))(-1)) < (__attribute__((force)) typeof((typeof(val))(val)))1) == (((typeof((typeof(val))((-((int)(~0U >> 1)) - 1))))(-1)) < (__attribute__((force)) typeof((typeof(val))((-((int)(~0U >> 1)) - 1))))1)), "clamp() 'lo' signedness error"); _Static_assert(((((typeof((typeof(val))(val)))(-1)) < (__attribute__((force)) typeof((typeof(val))(val)))1) == (((typeof((typeof(val))(((int)(~0U >> 1)) - 16000)))(-1)) < (__attribute__((force)) typeof((typeof(val))(((int)(~0U >> 1)) - 16000)))1)), "clamp() 'hi' signedness error"); ((__UNIQUE_ID___val332) >= (__UNIQUE_ID___hi334) ? (__UNIQUE_ID___hi334) : ((__UNIQUE_ID___val332) <= (__UNIQUE_ID___lo333) ? (__UNIQUE_ID___lo333) : (__UNIQUE_ID___val332))); })); }) + 16000))(0) greater than high limit (typeof(({ __builtin_choose_expr((sizeof(int) == sizeof(*(8 ? ((void *)((long)(((typeof(val))(val)) - ((typeof(val))((-((int)(~0U >> 1)) - 1))) + ((typeof(val))(((int)(~0U >> 1)) - 16000))) * 0l)) : (int *)8))), (((typeof(val))(val)) >= ((typeof(val))(((int)(~0U >> 1)) - 16000)) ? ((typeof(val))(((int)(~0U >> 1)) - 16000)) : (((typeof(val))(val)) <= ((typeof(val))((-((int)(~0U >> 1)) - 1))) ? ((typeof(val))((-((int)(~0U >> 1)) - 1))) : ((typeof(val))(val)))), ({ typeof((typeof(val))(val)) __UNIQUE_ID___val332 = ((typeof(val))(val)); typeof((typeof(val))((-((int)(~0U >> 1)) - 1))) __UNIQUE_ID___lo333 = ((typeof(val))((-((int)(~0U >> 1)) - 1))); typeof((typeof(val))(((int)(~0U >> 1)) - 16000)) __UNIQUE_ID___hi334 = ((typeof(val))(((int)(~0U >> 1)) - 16000)); _Static_assert(!(sizeof(int) == sizeof(*(8 ? ((void *)((long)(((typeof(val))((-((int)(~0U >> 1)) - 1))) > ((typeof(val))(((int)(~0U >> 1)) - 16000))) * 0l)) : (int *)8))) || ((typeof(val))((-((int)(~0U >> 1)) - 1))) <= ((typeof(val))(((int)(~0U >> 1)) - 16000)), "clamp() low limit " "(typeof(val))((-((int)(~0U >> 1)) - 1))" " greater than high limit " "(typeof(val))(((int)(~0U >> 1)) - 16000)"); _Static_assert(((((typeof((typeof(val))(val)))(-1)) < (__attribute__((force)) typeof((typeof(val))(val)))1) == (((typeof((typeof(val))((-((int)(~0U >> 1)) - 1))))(-1)) < (__attribute__((force)) typeof((typeof(val))((-((int)(~0U >> 1)) - 1))))1)), "clamp() 'lo' signedness error"); _Static_assert(((((typeof((typeof(val))(val)))(-1)) < (__attribute__((force)) typeof((typeof(val))(val)))1) == (((typeof((typeof(val))(((int)(~0U >> 1)) - 16000)))(-1)) < (__attribute__((force)) typeof((typeof(val))(((int)(~0U >> 1)) - 16000)))1)), "clamp() 'hi' signedness error"); ((__UNIQUE_ID___val332) >= (__UNIQUE_ID___hi334) ? (__UNIQUE_ID___hi334) : ((__UNIQUE_ID___val332) <= (__UNIQUE_ID___lo333) ? (__UNIQUE_ID___lo333) : (__UNIQUE_ID___val332))); })); }) + 16000))(255 * adm1026_scaling[16] / 192)"
/bin/bash: line 1: 52348 Segmentation fault sparse -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise -Wno-return-void -Wno-unknown-attribute -fdiagnostic-prefix -D__CHECK_ENDIAN__ --arch=microblaze -mlittle-endian -m32 -Wp,-MMD,drivers/hwmon/.adm1026.o.d -nostdinc -Iarch/microblaze/include -I./arch/microblaze/include/generated -Iinclude -I./include -Iarch/microblaze/include/uapi -I./arch/microblaze/include/generated/uapi -Iinclude/uapi -I./include/generated/uapi -include include/linux/compiler-version.h -include include/linux/kconfig.h -include include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map== -Wundef -DKBUILD_EXTRA_WARN1 -std=gnu11 -fshort-wchar -funsigned-char -fno-common -fno-PIE -fno-strict-aliasing -Wall -Wundef -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Werror=strict-prototypes -Wno-format-security -Wno-trigraphs -mlittle-endian -ffixed-r31 -mcpu=v7.10.d -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -Os -fno-allow-store-data-races -fno-reorder-blocks -fno-ipa-cp-clone -fno-partial-inlining -Wframe-larger-than=1024 -fno-stack-protector -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-dangling-pointer -ftrivial-auto-var-init=zero -fno-stack-clash-protection -fzero-call-used-regs=used-gpr -pg -fno-inline-functions-called-once -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -Wextra -Wunused -Wno-unused-parameter -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wmissing-include-dirs -Wunused-but-set-variable -Wunused-const-variable -Wpacked-not-aligned -Wstringop-truncation -Wno-missing-field-initializers -Wno-sign-compare -Wno-type-limits -Wno-shift-negative-value -gsplit-dwarf -g -gdwarf-4 -fno-var-tracking -femit-struct-debug-baseonly -gz=zlib -DDEBUG -I drivers/hwmon -I ./drivers/hwmon -DKBUILD_MODFILE='"drivers/hwmon/adm1026"' -DKBUILD_BASENAME='"adm1026"' -DKBUILD_MODNAME='"adm1026"' -D__KBUILD_MODNAME=kmod_adm1026 drivers/hwmon/adm1026.c
--
>> drivers/hwmon/adm9240.c:89:15: sparse: sparse: bad integer constant expression
>> drivers/hwmon/adm9240.c:89:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(nom_mv[n] * 255 / 192)"
--
>> drivers/hwmon/adt7411.c:464:15: sparse: sparse: bad integer constant expression
>> drivers/hwmon/adt7411.c:464:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(255 * data->vref_cached / 256)"
--
>> drivers/hwmon/adt7462.c:899:16: sparse: sparse: bad integer constant expression
>> drivers/hwmon/adt7462.c:899:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(temp))(0) greater than high limit (typeof(temp))(255 * x / 1000)"
drivers/hwmon/adt7462.c:939:16: sparse: sparse: bad integer constant expression
drivers/hwmon/adt7462.c:939:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(temp))(0) greater than high limit (typeof(temp))(255 * x / 1000)"
--
>> drivers/hwmon/asc7621.c:214:18: sparse: sparse: bad integer constant expression
>> drivers/hwmon/asc7621.c:214:18: sparse: sparse: static assertion failed: "clamp() low limit (typeof(reqval))(0) greater than high limit (typeof(reqval))(param->mask[0])"
drivers/hwmon/asc7621.c:479:18: sparse: sparse: bad integer constant expression
>> drivers/hwmon/asc7621.c:479:18: sparse: sparse: static assertion failed: "clamp() low limit (typeof(reqval))(auto_point1 + 2000) greater than high limit (typeof(reqval))(auto_point1 + 80000)"
--
>> drivers/hwmon/dme1737.c:269:15: sparse: sparse: bad integer constant expression
>> drivers/hwmon/dme1737.c:269:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(255 * nominal / 192)"
drivers/hwmon/dme1737.c:325:16: sparse: sparse: bad integer constant expression
>> drivers/hwmon/dme1737.c:325:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(hyst))(temp - 15000) greater than high limit (typeof(hyst))(temp)"
drivers/hwmon/dme1737.c:1050:23: sparse: sparse: bad integer constant expression
>> drivers/hwmon/dme1737.c:1050:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(temp) greater than high limit (typeof(val))(temp + 80000)"
--
>> drivers/hwmon/emc6w201.c:205:15: sparse: sparse: bad integer constant expression
>> drivers/hwmon/emc6w201.c:205:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(255 * nominal_mv[nr] / 192)"
--
>> drivers/hwmon/f71882fg.c:616:15: sparse: sparse: bad integer constant expression
>> drivers/hwmon/f71882fg.c:616:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(data->temp_high[nr] - 15) greater than high limit (typeof(val))(data->temp_high[nr])"
drivers/hwmon/f71882fg.c:1591:15: sparse: sparse: bad integer constant expression
>> drivers/hwmon/f71882fg.c:1591:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(data->pwm_auto_point_temp[nr][point] - 15) greater than high limit (typeof(val))(data->pwm_auto_point_temp[nr][point])"
--
>> drivers/hwmon/g762.c:191:15: sparse: sparse: bad integer constant expression
>> drivers/hwmon/g762.c:191:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(rpm))(f1 / (255 * f2)) greater than high limit (typeof(rpm))((~0UL) / f2)"
--
>> drivers/hwmon/gl520sm.c:390:13: sparse: sparse: bad integer constant expression
>> drivers/hwmon/gl520sm.c:390:13: sparse: sparse: static assertion failed: "clamp() low limit (typeof(v))((480000 >> (data->fan_div[n])) / 255) greater than high limit (typeof(v))((480000 >> (data->fan_div[n])))"
>> drivers/hwmon/gl520sm.c:390:13: sparse: sparse: bad integer constant expression
>> drivers/hwmon/gl520sm.c:390:13: sparse: sparse: static assertion failed: "clamp() low limit (typeof(v))((480000 >> (data->fan_div[n])) / 255) greater than high limit (typeof(v))((480000 >> (data->fan_div[n])))"
>> drivers/hwmon/gl520sm.c:390:13: sparse: sparse: bad integer constant expression
>> drivers/hwmon/gl520sm.c:390:13: sparse: sparse: static assertion failed: "clamp() low limit (typeof(v))((480000 >> (data->fan_div[n])) / 255) greater than high limit (typeof(v))((480000 >> (data->fan_div[n])))"
--
>> drivers/hwmon/ina3221.c:448:22: sparse: sparse: bad integer constant expression
>> drivers/hwmon/ina3221.c:448:22: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))((-((int)(~0U >> 1)) - 1) / resistance_uo) greater than high limit (typeof(val))(((int)(~0U >> 1)) / resistance_uo)"
--
>> drivers/hwmon/jc42.c:219:21: sparse: sparse: bad integer constant expression
>> drivers/hwmon/jc42.c:219:21: sparse: sparse: static assertion failed: "clamp() low limit (typeof(temp))(extended ? (-40000) : 0) greater than high limit (typeof(temp))(125000)"
drivers/hwmon/jc42.c:359:23: sparse: sparse: bad integer constant expression
>> drivers/hwmon/jc42.c:359:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))((data->extended ? (-40000) : 0) - 6000) greater than high limit (typeof(val))(125000)"
--
>> drivers/hwmon/lm85.c:874:28: sparse: sparse: bad integer constant expression
>> drivers/hwmon/lm85.c:874:28: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(255 * lm85_scaling[nr] / 192)"
drivers/hwmon/lm85.c:902:28: sparse: sparse: bad integer constant expression
drivers/hwmon/lm85.c:902:28: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(255 * lm85_scaling[nr] / 192)"
--
>> drivers/hwmon/lm93.c:361:25: sparse: sparse: bad integer constant expression
>> drivers/hwmon/lm93.c:361:25: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(lm93_vin_val_min[nr]) greater than high limit (typeof(val))(lm93_vin_val_max[nr])"
drivers/hwmon/lm93.c:375:18: sparse: sparse: bad integer constant expression
>> drivers/hwmon/lm93.c:375:18: sparse: sparse: static assertion failed: "clamp() low limit (typeof(result))(lm93_vin_reg_min[nr]) greater than high limit (typeof(result))(lm93_vin_reg_max[nr])"
drivers/hwmon/lm93.c:462:15: sparse: sparse: bad integer constant expression
>> drivers/hwmon/lm93.c:462:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(off))((0)) greater than high limit (typeof(off))(mode ? (75) : (150))"
--
>> drivers/hwmon/max6697.c:316:16: sparse: sparse: bad integer constant expression
>> drivers/hwmon/max6697.c:316:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(temp))(0) greater than high limit (typeof(temp))(data->type == max6581 ? 255 : 127)"
--
>> drivers/hwmon/sbrmi.c:239:15: sparse: sparse: bad integer constant expression
>> drivers/hwmon/sbrmi.c:239:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(data->pwr_limit_max)"
--
>> drivers/hwmon/smsc47m192.c:67:15: sparse: sparse: bad integer constant expression
>> drivers/hwmon/smsc47m192.c:67:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(nom_mv[n] * 255 / 192)"
--
>> drivers/hwmon/tmp401.c:388:23: sparse: sparse: bad integer constant expression
>> drivers/hwmon/tmp401.c:388:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(temp - 255000) greater than high limit (typeof(val))(temp)"
--
>> drivers/leds/led-class-flash.c:383:13: sparse: sparse: bad integer constant expression
>> drivers/leds/led-class-flash.c:383:13: sparse: sparse: static assertion failed: "clamp() low limit s->min greater than high limit s->max"
--
>> net/core/flow_dissector.c:949:28: sparse: sparse: bad integer constant expression
>> net/core/flow_dissector.c:949:28: sparse: sparse: static assertion failed: "clamp() low limit (u16)(nhoff) greater than high limit (u16)(hlen)"
net/core/flow_dissector.c:950:28: sparse: sparse: bad integer constant expression
>> net/core/flow_dissector.c:950:28: sparse: sparse: static assertion failed: "clamp() low limit (u16)(flow_keys->nhoff) greater than high limit (u16)(hlen)"
--
>> net/dccp/ccids/ccid3.c:75:30: sparse: sparse: bad integer constant expression
>> net/dccp/ccids/ccid3.c:75:30: sparse: sparse: static assertion failed: "clamp() low limit (__u32)(2 * hc->tx_s) greater than high limit (__u32)(4 * hc->tx_s)"
--
>> drivers/spi/spi-cadence.c:313:15: sparse: sparse: bad integer constant expression
>> drivers/spi/spi-cadence.c:313:15: sparse: sparse: static assertion failed: "clamp() low limit 0 greater than high limit xspi->tx_bytes"
drivers/spi/spi-cadence.c:314:15: sparse: sparse: bad integer constant expression
>> drivers/spi/spi-cadence.c:314:15: sparse: sparse: static assertion failed: "clamp() low limit 0 greater than high limit xspi->rx_bytes"
--
>> drivers/spi/spi-cadence-xspi.c:436:27: sparse: sparse: bad integer constant expression
>> drivers/spi/spi-cadence-xspi.c:436:27: sparse: sparse: static assertion failed: "clamp() low limit (typeof(op->data.nbytes))(0) greater than high limit (typeof(op->data.nbytes))(cdns_xspi->sdmasize)"
--
>> net/ipv4/ip_tunnel.c:1186:23: sparse: sparse: bad integer constant expression
>> net/ipv4/ip_tunnel.c:1186:23: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)68 greater than high limit max"
--
>> net/ipv6/ip6_vti.c:674:28: sparse: sparse: bad integer constant expression
>> net/ipv6/ip6_vti.c:674:28: sparse: sparse: static assertion failed: "clamp() low limit dev->min_mtu greater than high limit dev->max_mtu"
--
>> drivers/power/supply/cpcap-battery.c:730:31: sparse: sparse: bad integer constant expression
>> drivers/power/supply/cpcap-battery.c:730:31: sparse: sparse: static assertion failed: "clamp() low limit 0 greater than high limit ddata->charge_full"
--
>> drivers/power/supply/max77976_charger.c:259:16: sparse: sparse: bad integer constant expression
>> drivers/power/supply/max77976_charger.c:259:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(regval * mult))(clamp_min) greater than high limit (typeof(regval * mult))(clamp_max)"
drivers/power/supply/max77976_charger.c:270:18: sparse: sparse: bad integer constant expression
>> drivers/power/supply/max77976_charger.c:270:18: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(clamp_min) greater than high limit (typeof(val))(clamp_max)"
--
>> drivers/power/supply/bq256xx_charger.c:525:16: sparse: sparse: bad integer constant expression
>> drivers/power/supply/bq256xx_charger.c:525:16: sparse: sparse: static assertion failed: "clamp() low limit 0 greater than high limit ichg_max"
drivers/power/supply/bq256xx_charger.c:538:16: sparse: sparse: bad integer constant expression
drivers/power/supply/bq256xx_charger.c:538:16: sparse: sparse: static assertion failed: "clamp() low limit 0 greater than high limit ichg_max"
drivers/power/supply/bq256xx_charger.c:638:19: sparse: sparse: bad integer constant expression
>> drivers/power/supply/bq256xx_charger.c:638:19: sparse: sparse: static assertion failed: "clamp() low limit 3504000 greater than high limit vbatreg_max"
drivers/power/supply/bq256xx_charger.c:660:19: sparse: sparse: bad integer constant expression
drivers/power/supply/bq256xx_charger.c:660:19: sparse: sparse: static assertion failed: "clamp() low limit 3494000 greater than high limit vbatreg_max"
drivers/power/supply/bq256xx_charger.c:681:19: sparse: sparse: bad integer constant expression
drivers/power/supply/bq256xx_charger.c:681:19: sparse: sparse: static assertion failed: "clamp() low limit 3856000 greater than high limit vbatreg_max"
drivers/power/supply/bq256xx_charger.c:696:19: sparse: sparse: bad integer constant expression
drivers/power/supply/bq256xx_charger.c:696:19: sparse: sparse: static assertion failed: "clamp() low limit 3847000 greater than high limit vbatreg_max"
--
>> drivers/dma/dw/core.c:791:17: sparse: sparse: bad integer constant expression
>> drivers/dma/dw/core.c:791:17: sparse: sparse: static assertion failed: "clamp() low limit 0U greater than high limit dwc->max_burst"
drivers/dma/dw/core.c:793:17: sparse: sparse: bad integer constant expression
drivers/dma/dw/core.c:793:17: sparse: sparse: static assertion failed: "clamp() low limit 0U greater than high limit dwc->max_burst"
--
>> drivers/media/i2c/max2175.c:1107:16: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/max2175.c:1107:16: sparse: sparse: static assertion failed: "clamp() low limit ctx->bands_rf->rangelow greater than high limit ctx->bands_rf->rangehigh"
--
>> drivers/media/i2c/imx296.c:711:25: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/imx296.c:711:25: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(crop->width / 2) greater than high limit (unsigned int)(crop->width)"
drivers/media/i2c/imx296.c:713:26: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/imx296.c:713:26: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(crop->height / 2) greater than high limit (unsigned int)(crop->height)"
--
>> drivers/media/i2c/mt9m001.c:281:21: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/mt9m001.c:281:21: sparse: sparse: static assertion failed: "clamp() low limit (u32)(20) greater than high limit (u32)(20 + 1280 - rect.width)"
drivers/media/i2c/mt9m001.c:286:20: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/mt9m001.c:286:20: sparse: sparse: static assertion failed: "clamp() low limit (u32)(12) greater than high limit (u32)(12 + 1024 - rect.height)"
--
>> drivers/media/i2c/mt9p031.c:604:17: sparse: sparse: bad integer constant expression
drivers/media/i2c/mt9p031.c:604:17: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(__builtin_choose_expr((sizeof(int) == sizeof(*(8 ? ((void *)((long)(((unsigned int)(__crop->width / 7)) - ((unsigned int)(2))) * 0l)) : (int *)8))), (((unsigned int)(__crop->width / 7)) > ((unsigned int)(2)) ? ((unsigned int)(__crop->width / 7)) : ((unsigned int)(2))), ({ typeof((unsigned int)(__crop->width / 7)) __UNIQUE_ID___x324 = ((unsigned int)(__crop->width / 7)); typeof((unsigned int)(2)) __UNIQUE_ID___y325 = ((unsigned int)(2)); _Static_assert(((((typeof((unsigned int)(__crop->width / 7)))(-1)) < (__attribute__((force)) typeof((unsigned int)(__crop->width / 7)))1) == (((typeof((unsigned int)(2)))(-1)) < (__attribute__((force)) typeof((unsigned int)(2)))1)), "max" "(" "(unsigned int)(__crop->width / 7)" ", " "(unsigned int)(2)" ") signedness error, fix types or consider " "max" "_unsigned() before " "max" "_t()"); ((__UNIQUE_ID___x324) > (__UNIQUE_ID___y325) ? (__UNIQUE_ID___x324) : (__UNIQUE_ID___y325)); }))) greater than high limit (unsigned int)(__crop->width)"
drivers/media/i2c/mt9p031.c:608:18: sparse: sparse: bad integer constant expression
drivers/media/i2c/mt9p031.c:608:18: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(__builtin_choose_expr((sizeof(int) == sizeof(*(8 ? ((void *)((long)(((unsigned int)(__crop->height / 8)) - ((unsigned int)(2))) * 0l)) : (int *)8))), (((unsigned int)(__crop->height / 8)) > ((unsigned int)(2)) ? ((unsigned int)(__crop->height / 8)) : ((unsigned int)(2))), ({ typeof((unsigned int)(__crop->height / 8)) __UNIQUE_ID___x329 = ((unsigned int)(__crop->height / 8)); typeof((unsigned int)(2)) __UNIQUE_ID___y330 = ((unsigned int)(2)); _Static_assert(((((typeof((unsigned int)(__crop->height / 8)))(-1)) < (__attribute__((force)) typeof((unsigned int)(__crop->height / 8)))1) == (((typeof((unsigned int)(2)))(-1)) < (__attribute__((force)) typeof((unsigned int)(2)))1)), "max" "(" "(unsigned int)(__crop->height / 8)" ", " "(unsigned int)(2)" ") signedness error, fix types or consider " "max" "_unsigned() before " "max" "_t()"); ((__UNIQUE_ID___x329) > (__UNIQUE_ID___y330) ? (__UNIQUE_ID___x329) : (__UNIQUE_ID___y330)); }))) greater than high limit (unsigned int)(__crop->height)"
/bin/bash: line 1: 62381 Segmentation fault sparse -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise -Wno-return-void -Wno-unknown-attribute -fdiagnostic-prefix -D__CHECK_ENDIAN__ --arch=microblaze -mlittle-endian -m32 -Wp,-MMD,drivers/media/i2c/.mt9p031.o.d -nostdinc -Iarch/microblaze/include -I./arch/microblaze/include/generated -Iinclude -I./include -Iarch/microblaze/include/uapi -I./arch/microblaze/include/generated/uapi -Iinclude/uapi -I./include/generated/uapi -include include/linux/compiler-version.h -include include/linux/kconfig.h -include include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map== -Wundef -DKBUILD_EXTRA_WARN1 -std=gnu11 -fshort-wchar -funsigned-char -fno-common -fno-PIE -fno-strict-aliasing -Wall -Wundef -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Werror=strict-prototypes -Wno-format-security -Wno-trigraphs -mlittle-endian -ffixed-r31 -mcpu=v7.10.d -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -Os -fno-allow-store-data-races -fno-reorder-blocks -fno-ipa-cp-clone -fno-partial-inlining -Wframe-larger-than=1024 -fno-stack-protector -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-dangling-pointer -ftrivial-auto-var-init=zero -fno-stack-clash-protection -fzero-call-used-regs=used-gpr -pg -fno-inline-functions-called-once -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -Wextra -Wunused -Wno-unused-parameter -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wmissing-include-dirs -Wunused-but-set-variable -Wunused-const-variable -Wpacked-not-aligned -Wstringop-truncation -Wno-missing-field-initializers -Wno-sign-compare -Wno-type-limits -Wno-shift-negative-value -gsplit-dwarf -g -gdwarf-4 -fno-var-tracking -femit-struct-debug-baseonly -gz=zlib -I drivers/media/i2c -I ./drivers/media/i2c -DKBUILD_MODFILE='"drivers/media/i2c/mt9p031"' -DKBUILD_BASENAME='"mt9p031"' -DKBUILD_MODNAME='"mt9p031"' -D__KBUILD_MODNAME=kmod_mt9p031 drivers/media/i2c/mt9p031.c
--
>> drivers/media/i2c/mt9v032.c:515:17: sparse: sparse: bad integer constant expression
drivers/media/i2c/mt9v032.c:515:17: sparse: sparse: static assertion failed: "clamp() low limit __builtin_choose_expr((sizeof(int) == sizeof(*(8 ? ((void *)((long)(((unsigned int)(__crop->width / 4)) - ((unsigned int)(1))) * 0l)) : (int *)8))), (((unsigned int)(__crop->width / 4)) > ((unsigned int)(1)) ? ((unsigned int)(__crop->width / 4)) : ((unsigned int)(1))), ({ typeof((unsigned int)(__crop->width / 4)) __UNIQUE_ID___x322 = ((unsigned int)(__crop->width / 4)); typeof((unsigned int)(1)) __UNIQUE_ID___y323 = ((unsigned int)(1)); _Static_assert(((((typeof((unsigned int)(__crop->width / 4)))(-1)) < (__attribute__((force)) typeof((unsigned int)(__crop->width / 4)))1) == (((typeof((unsigned int)(1)))(-1)) < (__attribute__((force)) typeof((unsigned int)(1)))1)), "max" "(" "(unsigned int)(__crop->width / 4)" ", " "(unsigned int)(1)" ") signedness error, fix types or consider " "max" "_unsigned() before " "max" "_t()"); ((__UNIQUE_ID___x322) > (__UNIQUE_ID___y323) ? (__UNIQUE_ID___x322) : (__UNIQUE_ID___y323)); })) greater than high limit __crop->width"
drivers/media/i2c/mt9v032.c:519:18: sparse: sparse: bad integer constant expression
drivers/media/i2c/mt9v032.c:519:18: sparse: sparse: static assertion failed: "clamp() low limit __builtin_choose_expr((sizeof(int) == sizeof(*(8 ? ((void *)((long)(((unsigned int)(__crop->height / 4)) - ((unsigned int)(1))) * 0l)) : (int *)8))), (((unsigned int)(__crop->height / 4)) > ((unsigned int)(1)) ? ((unsigned int)(__crop->height / 4)) : ((unsigned int)(1))), ({ typeof((unsigned int)(__crop->height / 4)) __UNIQUE_ID___x327 = ((unsigned int)(__crop->height / 4)); typeof((unsigned int)(1)) __UNIQUE_ID___y328 = ((unsigned int)(1)); _Static_assert(((((typeof((unsigned int)(__crop->height / 4)))(-1)) < (__attribute__((force)) typeof((unsigned int)(__crop->height / 4)))1) == (((typeof((unsigned int)(1)))(-1)) < (__attribute__((force)) typeof((unsigned int)(1)))1)), "max" "(" "(unsigned int)(__crop->height / 4)" ", " "(unsigned int)(1)" ") signedness error, fix types or consider " "max" "_unsigned() before " "max" "_t()"); ((__UNIQUE_ID___x327) > (__UNIQUE_ID___y328) ? (__UNIQUE_ID___x327) : (__UNIQUE_ID___y328)); })) greater than high limit __crop->height"
/bin/bash: line 1: 62761 Segmentation fault sparse -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise -Wno-return-void -Wno-unknown-attribute -fdiagnostic-prefix -D__CHECK_ENDIAN__ --arch=microblaze -mlittle-endian -m32 -Wp,-MMD,drivers/media/i2c/.mt9v032.o.d -nostdinc -Iarch/microblaze/include -I./arch/microblaze/include/generated -Iinclude -I./include -Iarch/microblaze/include/uapi -I./arch/microblaze/include/generated/uapi -Iinclude/uapi -I./include/generated/uapi -include include/linux/compiler-version.h -include include/linux/kconfig.h -include include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map== -Wundef -DKBUILD_EXTRA_WARN1 -std=gnu11 -fshort-wchar -funsigned-char -fno-common -fno-PIE -fno-strict-aliasing -Wall -Wundef -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Werror=strict-prototypes -Wno-format-security -Wno-trigraphs -mlittle-endian -ffixed-r31 -mcpu=v7.10.d -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -Os -fno-allow-store-data-races -fno-reorder-blocks -fno-ipa-cp-clone -fno-partial-inlining -Wframe-larger-than=1024 -fno-stack-protector -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-dangling-pointer -ftrivial-auto-var-init=zero -fno-stack-clash-protection -fzero-call-used-regs=used-gpr -pg -fno-inline-functions-called-once -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -Wextra -Wunused -Wno-unused-parameter -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wmissing-include-dirs -Wunused-but-set-variable -Wunused-const-variable -Wpacked-not-aligned -Wstringop-truncation -Wno-missing-field-initializers -Wno-sign-compare -Wno-type-limits -Wno-shift-negative-value -gsplit-dwarf -g -gdwarf-4 -fno-var-tracking -femit-struct-debug-baseonly -gz=zlib -I drivers/media/i2c -I ./drivers/media/i2c -DKBUILD_MODFILE='"drivers/media/i2c/mt9v032"' -DKBUILD_BASENAME='"mt9v032"' -DKBUILD_MODNAME='"mt9v032"' -D__KBUILD_MODNAME=kmod_mt9v032 drivers/media/i2c/mt9v032.c
--
>> drivers/media/i2c/ov4689.c:638:19: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/ov4689.c:638:19: sparse: sparse: static assertion failed: "clamp() low limit range->physical_min greater than high limit range->physical_max"
--
>> drivers/media/i2c/ov5640.c:2770:15: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/ov5640.c:2770:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(( { typeof(fi->denominator) __x = fi->denominator; typeof(fi->numerator) __d = fi->numerator; (((typeof(fi->denominator))-1) > 0 || ((typeof(fi->numerator))-1) > 0 || (((__x) > 0) == ((__d) > 0))) ? (((__x) + ((__d) / 2)) / (__d)) : (((__x) - ((__d) / 2)) / (__d)); } )))(minfps) greater than high limit (typeof(( { typeof(fi->denominator) __x = fi->denominator; typeof(fi->numerator) __d = fi->numerator; (((typeof(fi->denominator))-1) > 0 || ((typeof(fi->numerator))-1) > 0 || (((__x) > 0) == ((__d) > 0))) ? (((__x) + ((__d) / 2)) / (__d)) : (((__x) - ((__d) / 2)) / (__d)); } )))(maxfps)"
drivers/media/i2c/ov5640.c:2934:24: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/ov5640.c:2934:24: sparse: sparse: static assertion failed: "clamp() low limit (s32)(sensor->ctrls.exposure->minimum) greater than high limit (s32)(exposure_max)"
/bin/bash: line 1: 65824 Segmentation fault sparse -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise -Wno-return-void -Wno-unknown-attribute -fdiagnostic-prefix -D__CHECK_ENDIAN__ --arch=microblaze -mlittle-endian -m32 -Wp,-MMD,drivers/media/i2c/.ov5640.o.d -nostdinc -Iarch/microblaze/include -I./arch/microblaze/include/generated -Iinclude -I./include -Iarch/microblaze/include/uapi -I./arch/microblaze/include/generated/uapi -Iinclude/uapi -I./include/generated/uapi -include include/linux/compiler-version.h -include include/linux/kconfig.h -include include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map== -Wundef -DKBUILD_EXTRA_WARN1 -std=gnu11 -fshort-wchar -funsigned-char -fno-common -fno-PIE -fno-strict-aliasing -Wall -Wundef -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Werror=strict-prototypes -Wno-format-security -Wno-trigraphs -mlittle-endian -ffixed-r31 -mcpu=v7.10.d -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -Os -fno-allow-store-data-races -fno-reorder-blocks -fno-ipa-cp-clone -fno-partial-inlining -Wframe-larger-than=1024 -fno-stack-protector -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-dangling-pointer -ftrivial-auto-var-init=zero -fno-stack-clash-protection -fzero-call-used-regs=used-gpr -pg -fno-inline-functions-called-once -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -Wextra -Wunused -Wno-unused-parameter -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wmissing-include-dirs -Wunused-but-set-variable -Wunused-const-variable -Wpacked-not-aligned -Wstringop-truncation -Wno-missing-field-initializers -Wno-sign-compare -Wno-type-limits -Wno-shift-negative-value -gsplit-dwarf -g -gdwarf-4 -fno-var-tracking -femit-struct-debug-baseonly -gz=zlib -I drivers/media/i2c -I ./drivers/media/i2c -DKBUILD_MODFILE='"drivers/media/i2c/ov5640"' -DKBUILD_BASENAME='"ov5640"' -DKBUILD_MODNAME='"ov5640"' -D__KBUILD_MODNAME=kmod_ov5640 drivers/media/i2c/ov5640.c
--
>> drivers/media/i2c/ov5693.c:963:17: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/ov5693.c:963:17: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(2) greater than high limit (unsigned int)(crop->width)"
drivers/media/i2c/ov5693.c:965:18: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/ov5693.c:965:18: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(2) greater than high limit (unsigned int)(crop->height)"
--
>> drivers/media/radio/radio-tea5777.c:178:16: sparse: sparse: bad integer constant expression
>> drivers/media/radio/radio-tea5777.c:178:16: sparse: sparse: static assertion failed: "clamp() low limit bands[tea->band].rangelow greater than high limit bands[tea->band].rangehigh"
drivers/media/radio/radio-tea5777.c:398:37: sparse: sparse: bad integer constant expression
>> drivers/media/radio/radio-tea5777.c:398:37: sparse: sparse: static assertion failed: "clamp() low limit rangelow greater than high limit rangehigh"
--
>> drivers/media/radio/radio-si476x.c:699:16: sparse: sparse: bad integer constant expression
>> drivers/media/radio/radio-si476x.c:699:16: sparse: sparse: static assertion failed: "clamp() low limit si476x_bands[band].rangelow greater than high limit si476x_bands[band].rangehigh"
--
>> drivers/media/radio/tea575x.c:170:16: sparse: sparse: bad integer constant expression
>> drivers/media/radio/tea575x.c:170:16: sparse: sparse: static assertion failed: "clamp() low limit bands[tea->band].rangelow greater than high limit bands[tea->band].rangehigh"
drivers/media/radio/tea575x.c:350:21: sparse: sparse: bad integer constant expression
>> drivers/media/radio/tea575x.c:350:21: sparse: sparse: static assertion failed: "clamp() low limit (u32)(bands[tea->band].rangelow) greater than high limit (u32)(bands[tea->band].rangehigh)"
drivers/media/radio/tea575x.c:384:37: sparse: sparse: bad integer constant expression
>> drivers/media/radio/tea575x.c:384:37: sparse: sparse: static assertion failed: "clamp() low limit bands[i].rangelow greater than high limit bands[i].rangehigh"
--
>> drivers/media/radio/radio-ma901.c:252:43: sparse: sparse: bad integer constant expression
>> drivers/media/radio/radio-ma901.c:252:43: sparse: sparse: static assertion failed: "clamp() low limit (unsigned)(87.5 * 16000) greater than high limit (unsigned)(108.0 * 16000)"
--
>> drivers/media/radio/radio-mr800.c:198:16: sparse: sparse: bad integer constant expression
>> drivers/media/radio/radio-mr800.c:198:16: sparse: sparse: static assertion failed: "clamp() low limit (unsigned)(87.5 * 16000) greater than high limit (unsigned)(108.0 * 16000)"
--
>> drivers/media/radio/radio-raremono.c:256:16: sparse: sparse: bad integer constant expression
>> drivers/media/radio/radio-raremono.c:256:16: sparse: sparse: static assertion failed: "clamp() low limit (u32)(bands[band].rangelow) greater than high limit (u32)(bands[band].rangehigh)"
--
>> drivers/iio/magnetometer/ak8975.c:745:16: sparse: sparse: bad integer constant expression
>> drivers/iio/magnetometer/ak8975.c:745:16: sparse: sparse: static assertion failed: "clamp() low limit (s16)(-def->range) greater than high limit (s16)(def->range)"
drivers/iio/magnetometer/ak8975.c:855:34: sparse: sparse: bad integer constant expression
drivers/iio/magnetometer/ak8975.c:855:34: sparse: sparse: static assertion failed: "clamp() low limit (s16)(-def->range) greater than high limit (s16)(def->range)"
drivers/iio/magnetometer/ak8975.c:856:34: sparse: sparse: bad integer constant expression
drivers/iio/magnetometer/ak8975.c:856:34: sparse: sparse: static assertion failed: "clamp() low limit (s16)(-def->range) greater than high limit (s16)(def->range)"
drivers/iio/magnetometer/ak8975.c:857:34: sparse: sparse: bad integer constant expression
drivers/iio/magnetometer/ak8975.c:857:34: sparse: sparse: static assertion failed: "clamp() low limit (s16)(-def->range) greater than high limit (s16)(def->range)"
--
>> drivers/media/tuners/e4000.c:338:28: sparse: sparse: bad integer constant expression
>> drivers/media/tuners/e4000.c:338:28: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(bands[0].rangelow) greater than high limit (unsigned int)(bands[1].rangehigh)"
--
>> drivers/media/tuners/fc2580.c:431:28: sparse: sparse: bad integer constant expression
>> drivers/media/tuners/fc2580.c:431:28: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(bands[0].rangelow) greater than high limit (unsigned int)(bands[0].rangehigh)"
--
>> drivers/media/tuners/msi001.c:341:24: sparse: sparse: bad integer constant expression
>> drivers/media/tuners/msi001.c:341:24: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(bands[band].rangelow) greater than high limit (unsigned int)(bands[band].rangehigh)"
--
>> drivers/media/v4l2-core/v4l2-common.c:100:13: sparse: sparse: bad integer constant expression
>> drivers/media/v4l2-core/v4l2-common.c:100:13: sparse: sparse: static assertion failed: "clamp() low limit (min + ~mask) & mask greater than high limit max & mask"
drivers/media/v4l2-core/v4l2-common.c:112:13: sparse: sparse: bad integer constant expression
>> drivers/media/v4l2-core/v4l2-common.c:112:13: sparse: sparse: static assertion failed: "clamp() low limit min greater than high limit max"
--
>> drivers/media/v4l2-core/v4l2-ctrls-core.c:1188:24: sparse: sparse: bad integer constant expression
>> drivers/media/v4l2-core/v4l2-ctrls-core.c:1188:24: sparse: sparse: static assertion failed: "clamp() low limit (typeof(ptr.p_s32[idx]))((ctrl)->minimum) greater than high limit (typeof(ptr.p_s32[idx]))((ctrl)->maximum)"
drivers/media/v4l2-core/v4l2-ctrls-core.c:1199:23: sparse: sparse: bad integer constant expression
>> drivers/media/v4l2-core/v4l2-ctrls-core.c:1199:23: sparse: sparse: static assertion failed: "clamp() low limit (s64)(ctrl->minimum) greater than high limit (s64)(ctrl->maximum)"
drivers/media/v4l2-core/v4l2-ctrls-core.c:1205:24: sparse: sparse: bad integer constant expression
>> drivers/media/v4l2-core/v4l2-ctrls-core.c:1205:24: sparse: sparse: static assertion failed: "clamp() low limit (typeof(ptr.p_u8[idx]))((ctrl)->minimum) greater than high limit (typeof(ptr.p_u8[idx]))((ctrl)->maximum)"
drivers/media/v4l2-core/v4l2-ctrls-core.c:1207:24: sparse: sparse: bad integer constant expression
>> drivers/media/v4l2-core/v4l2-ctrls-core.c:1207:24: sparse: sparse: static assertion failed: "clamp() low limit (typeof(ptr.p_u16[idx]))((ctrl)->minimum) greater than high limit (typeof(ptr.p_u16[idx]))((ctrl)->maximum)"
drivers/media/v4l2-core/v4l2-ctrls-core.c:1209:24: sparse: sparse: bad integer constant expression
>> drivers/media/v4l2-core/v4l2-ctrls-core.c:1209:24: sparse: sparse: static assertion failed: "clamp() low limit (typeof(ptr.p_u32[idx]))((ctrl)->minimum) greater than high limit (typeof(ptr.p_u32[idx]))((ctrl)->maximum)"
--
>> drivers/usb/core/config.c:347:37: sparse: sparse: bad integer constant expression
>> drivers/usb/core/config.c:347:37: sparse: sparse: static assertion failed: "clamp() low limit i greater than high limit j"
drivers/usb/core/config.c:355:37: sparse: sparse: bad integer constant expression
drivers/usb/core/config.c:355:37: sparse: sparse: static assertion failed: "clamp() low limit i greater than high limit j"
--
drivers/gpu/drm/drm_atomic.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_atomic_uapi.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_blend.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_bridge.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_client.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_client.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_client_modeset.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_color_mgmt.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
>> drivers/gpu/drm/drm_color_mgmt.c:142:15: sparse: sparse: bad integer constant expression
>> drivers/gpu/drm/drm_color_mgmt.c:142:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(mag))(0) greater than high limit (typeof(mag))(negative ? ((((1ULL))) << (n + m - 1)) : ((((1ULL))) << (n + m - 1)) - 1)"
--
drivers/gpu/drm/drm_crtc.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_connector.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_encoder.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_drv.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_client.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_encoder.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_file.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_client.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_edid.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_encoder.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_framebuffer.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_ioctl.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_lease.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_mode_config.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_encoder.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_mode_object.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_modes.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
drivers/gpu/drm/drm_modes.c:2474:29: sparse: sparse: bad integer constant expression
drivers/gpu/drm/drm_modes.c:2474:29: sparse: sparse: static assertion failed: "max(bpp_end_ptr, refresh_end_ptr) signedness error, fix types or consider max_unsigned() before max_t()"
--
drivers/gpu/drm/drm_modeset_lock.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_plane.c: note: in included file (through include/drm/drm_plane.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_property.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_vblank.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_vblank_work.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_writeback.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_panel.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_of.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_debugfs.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_debugfs_crc.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_fb_dma_helper.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_bridge_connector.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_atomic_state_helper.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_crtc_helper.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_damage_helper.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_atomic_helper.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_encoder_slave.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_encoder_slave.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_kms_helper_common.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, drivers/gpu/drm/drm_crtc_helper_internal.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_gem_framebuffer_helper.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_gem_atomic_helper.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_gem_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_modeset_helper.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_plane_helper.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_probe_helper.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_self_refresh_helper.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_simple_kms_helper.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/panel.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_mipi_dbi.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
>> drivers/usb/host/xhci-mem.c:1231:20: sparse: sparse: bad integer constant expression
>> drivers/usb/host/xhci-mem.c:1231:20: sparse: sparse: static assertion failed: "clamp() low limit (typeof(interval))(min_exponent) greater than high limit (typeof(interval))(max_exponent)"
--
>> drivers/media/usb/msi2500/msi2500.c:1043:30: sparse: sparse: bad integer constant expression
>> drivers/media/usb/msi2500/msi2500.c:1043:30: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(bands[0].rangelow) greater than high limit (unsigned int)(bands[0].rangehigh)"
--
>> drivers/media/usb/stk1160/stk1160-v4l.c:385:17: sparse: sparse: bad integer constant expression
>> drivers/media/usb/stk1160/stk1160-v4l.c:385:17: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(base_width / 20) greater than high limit (unsigned int)(base_width)"
drivers/media/usb/stk1160/stk1160-v4l.c:387:18: sparse: sparse: bad integer constant expression
>> drivers/media/usb/stk1160/stk1160-v4l.c:387:18: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(base_height / 20) greater than high limit (unsigned int)(base_height)"
--
>> drivers/video/backlight/bd6107.c:159:28: sparse: sparse: bad integer constant expression
>> drivers/video/backlight/bd6107.c:159:28: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(0) greater than high limit (unsigned int)(props.max_brightness)"
--
>> drivers/media/usb/uvc/uvc_driver.c:454:25: sparse: sparse: bad integer constant expression
>> drivers/media/usb/uvc/uvc_driver.c:454:25: sparse: sparse: static assertion failed: "clamp() low limit frame->dwFrameInterval[0] greater than high limit frame->dwFrameInterval[maxIntervalIndex]"
--
>> drivers/media/usb/uvc/uvc_ctrl.c:1922:40: sparse: sparse: bad integer constant expression
>> drivers/media/usb/uvc/uvc_ctrl.c:1922:40: sparse: sparse: static assertion failed: "clamp() low limit min greater than high limit max"
drivers/media/usb/uvc/uvc_ctrl.c:1924:40: sparse: sparse: bad integer constant expression
>> drivers/media/usb/uvc/uvc_ctrl.c:1924:40: sparse: sparse: static assertion failed: "clamp() low limit (u32)(min) greater than high limit (u32)(max)"
--
>> drivers/usb/gadget/function/u_audio.c:801:15: sparse: sparse: bad integer constant expression
>> drivers/usb/gadget/function/u_audio.c:801:15: sparse: sparse: static assertion failed: "clamp() low limit prm->volume_min greater than high limit prm->volume_max"
drivers/usb/gadget/function/u_audio.c:1041:18: sparse: sparse: bad integer constant expression
drivers/usb/gadget/function/u_audio.c:1041:18: sparse: sparse: static assertion failed: "clamp() low limit prm->volume_min greater than high limit prm->volume_max"
--
>> drivers/media/radio/si470x/radio-si470x-common.c:281:16: sparse: sparse: bad integer constant expression
>> drivers/media/radio/si470x/radio-si470x-common.c:281:16: sparse: sparse: static assertion failed: "clamp() low limit bands[radio->band].rangelow greater than high limit bands[radio->band].rangehigh"
--
>> drivers/media/i2c/ccs/ccs-core.c:1461:17: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/ccs/ccs-core.c:1461:17: sparse: sparse: static assertion failed: "clamp() low limit (u32)(1) greater than high limit (u32)(tmp)"
drivers/media/i2c/ccs/ccs-core.c:2247:17: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/ccs/ccs-core.c:2247:17: sparse: sparse: static assertion failed: "clamp() low limit ccs_get_limit(sensor, 79, 0) greater than high limit ccs_get_limit(sensor, 81, 0)"
drivers/media/i2c/ccs/ccs-core.c:2251:17: sparse: sparse: bad integer constant expression
drivers/media/i2c/ccs/ccs-core.c:2251:17: sparse: sparse: static assertion failed: "clamp() low limit ccs_get_limit(sensor, 80, 0) greater than high limit ccs_get_limit(sensor, 82, 0)"
drivers/media/i2c/ccs/ccs-core.c:2391:13: sparse: sparse: bad integer constant expression
drivers/media/i2c/ccs/ccs-core.c:2391:13: sparse: sparse: static assertion failed: "clamp() low limit ccs_get_limit(sensor, 123, 0) greater than high limit ccs_get_limit(sensor, 124, 0)"
drivers/media/i2c/ccs/ccs-core.c:2393:13: sparse: sparse: bad integer constant expression
drivers/media/i2c/ccs/ccs-core.c:2393:13: sparse: sparse: static assertion failed: "clamp() low limit ccs_get_limit(sensor, 123, 0) greater than high limit ccs_get_limit(sensor, 124, 0)"
drivers/media/i2c/ccs/ccs-core.c:2395:17: sparse: sparse: bad integer constant expression
drivers/media/i2c/ccs/ccs-core.c:2395:17: sparse: sparse: static assertion failed: "clamp() low limit ccs_get_limit(sensor, 123, 0) greater than high limit ccs_get_limit(sensor, 124, 0)"
--
>> drivers/media/i2c/cx25840/cx25840-core.c:1809:22: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/cx25840/cx25840-core.c:1809:22: sparse: sparse: static assertion failed: "clamp() low limit (h_src + 15) / 16 greater than high limit h_src"
drivers/media/i2c/cx25840/cx25840-core.c:1812:31: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/cx25840/cx25840-core.c:1812:31: sparse: sparse: static assertion failed: "clamp() low limit (u32)1 greater than high limit v_src - v_add"
drivers/media/i2c/cx25840/cx25840-core.c:1814:31: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/cx25840/cx25840-core.c:1814:31: sparse: sparse: static assertion failed: "clamp() low limit (v_src - v_add * 8 + 7) / 8 greater than high limit v_src - v_add"
--
>> drivers/leds/flash/leds-mt6360.c:606:18: sparse: sparse: bad integer constant expression
>> drivers/leds/flash/leds-mt6360.c:606:18: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(min) greater than high limit (typeof(val))(max)"
--
>> drivers/leds/flash/leds-mt6370-flash.c:428:18: sparse: sparse: bad integer constant expression
>> drivers/leds/flash/leds-mt6370-flash.c:428:18: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(min) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/arm/display/komeda/komeda_drv.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/arm/display/komeda/komeda_dev.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/arm/display/komeda/komeda_color_mgmt.c: note: in included file (through drivers/gpu/drm/arm/display/komeda/komeda_color_mgmt.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/arm/display/komeda/komeda_pipeline.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/arm/display/komeda/komeda_kms.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/arm/display/komeda/komeda_crtc.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/arm/display/komeda/komeda_plane.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/arm/display/komeda/komeda_event.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/arm/display/komeda/d71/d71_component.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/display/drm_dp_helper.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/display/drm_dp_mst_topology.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/virtio/virtgpu_drv.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/virtio/virtgpu_kms.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/virtio/virtgpu_gem.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/virtio/virtgpu_vram.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/virtio/virtgpu_display.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/virtio/virtgpu_vq.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/virtio/virtgpu_fence.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/virtio/virtgpu_object.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/virtio/virtgpu_debugfs.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/virtio/virtgpu_ioctl.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/virtio/virtgpu_plane.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/virtio/virtgpu_prime.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/virtio/virtgpu_trace_points.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/virtio/virtgpu_submit.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/i2c/ch7006_drv.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_encoder_slave.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/i2c/ch7006_mode.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_encoder_slave.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/panel/panel-lvds.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/panel/panel-ilitek-ili9341.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/panel/panel-innolux-p079zca.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/panel/panel-leadtek-ltk500hd1829.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/panel/panel-magnachip-d53e6ea8966.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_simple_kms_helper.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/panel/panel-newvision-nv3052c.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_simple_kms_helper.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/panel/panel-raydium-rm67191.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/panel/panel-samsung-db7430.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_simple_kms_helper.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/panel/panel-samsung-s6d27a1.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_simple_kms_helper.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_simple_kms_helper.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/panel/panel-tdo-tl070wsh30.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/panel/panel-novatek-nt36523.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/chrontel-ch7033.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/display-connector.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/lontium-lt9211.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/lontium-lt9611.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/ite-it6505.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/parade-ps8622.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/lontium-lt9611uxc.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/sii9234.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/sil-sii8620.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/thc63lvd1024.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/simple-bridge.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/tc358762.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/tc358764.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/tc358768.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/tc358767.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/tc358775.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/ti-sn65dsi83.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/ti-tfp410.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/ti-sn65dsi86.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/ti-tpd12s015.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/nwl-dsi.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/tiny/arcpgu.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/tiny/gm12u320.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/tiny/hx8357d.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/tiny/ili9341.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/tiny/mi0283qt.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/tiny/repaper.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/tiny/st7586.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/tiny/st7735r.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/solomon/ssd130x.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/solomon/ssd130x-spi.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, drivers/gpu/drm/solomon/ssd130x.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/analogix/anx7625.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/bridge/analogix_dp.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/bridge/analogix_dp.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/cadence/cdns-dsi-j721e.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-hdcp.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-j721e.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
>> drivers/hwmon/pmbus/pmbus_core.c:969:20: sparse: sparse: too long token expansion
--
>> drivers/hwmon/pmbus/lm25066.c:394:46: sparse: sparse: bad integer constant expression
>> drivers/hwmon/pmbus/lm25066.c:394:46: sparse: sparse: static assertion failed: "clamp() low limit (typeof(word))(0) greater than high limit (typeof(word))(data->rlimit)"
drivers/hwmon/pmbus/lm25066.c:398:46: sparse: sparse: bad integer constant expression
drivers/hwmon/pmbus/lm25066.c:398:46: sparse: sparse: static assertion failed: "clamp() low limit (typeof(word))(0) greater than high limit (typeof(word))(data->rlimit)"
drivers/hwmon/pmbus/lm25066.c:404:46: sparse: sparse: bad integer constant expression
drivers/hwmon/pmbus/lm25066.c:404:46: sparse: sparse: static assertion failed: "clamp() low limit (typeof(word))(0) greater than high limit (typeof(word))(data->rlimit)"
drivers/hwmon/pmbus/lm25066.c:412:46: sparse: sparse: bad integer constant expression
drivers/hwmon/pmbus/lm25066.c:412:46: sparse: sparse: static assertion failed: "clamp() low limit (typeof(word))(0) greater than high limit (typeof(word))(data->rlimit)"
drivers/hwmon/pmbus/lm25066.c:419:46: sparse: sparse: bad integer constant expression
drivers/hwmon/pmbus/lm25066.c:419:46: sparse: sparse: static assertion failed: "clamp() low limit (typeof(word))(0) greater than high limit (typeof(word))(data->rlimit)"
vim +2462 fs/inode.c
3cd886666ff19e Deepa Dinamani 2016-09-14 2447
50e17c000c467f Deepa Dinamani 2018-01-21 2448 /**
50e17c000c467f Deepa Dinamani 2018-01-21 2449 * timestamp_truncate - Truncate timespec to a granularity
50e17c000c467f Deepa Dinamani 2018-01-21 2450 * @t: Timespec
50e17c000c467f Deepa Dinamani 2018-01-21 2451 * @inode: inode being updated
50e17c000c467f Deepa Dinamani 2018-01-21 2452 *
50e17c000c467f Deepa Dinamani 2018-01-21 2453 * Truncate a timespec to the granularity supported by the fs
50e17c000c467f Deepa Dinamani 2018-01-21 2454 * containing the inode. Always rounds down. gran must
50e17c000c467f Deepa Dinamani 2018-01-21 2455 * not be 0 nor greater than a second (NSEC_PER_SEC, or 10^9 ns).
50e17c000c467f Deepa Dinamani 2018-01-21 2456 */
50e17c000c467f Deepa Dinamani 2018-01-21 2457 struct timespec64 timestamp_truncate(struct timespec64 t, struct inode *inode)
50e17c000c467f Deepa Dinamani 2018-01-21 2458 {
50e17c000c467f Deepa Dinamani 2018-01-21 2459 struct super_block *sb = inode->i_sb;
50e17c000c467f Deepa Dinamani 2018-01-21 2460 unsigned int gran = sb->s_time_gran;
50e17c000c467f Deepa Dinamani 2018-01-21 2461
50e17c000c467f Deepa Dinamani 2018-01-21 @2462 t.tv_sec = clamp(t.tv_sec, sb->s_time_min, sb->s_time_max);
50e17c000c467f Deepa Dinamani 2018-01-21 2463 if (unlikely(t.tv_sec == sb->s_time_max || t.tv_sec == sb->s_time_min))
50e17c000c467f Deepa Dinamani 2018-01-21 2464 t.tv_nsec = 0;
50e17c000c467f Deepa Dinamani 2018-01-21 2465
50e17c000c467f Deepa Dinamani 2018-01-21 2466 /* Avoid division in the common cases 1 ns and 1 s. */
50e17c000c467f Deepa Dinamani 2018-01-21 2467 if (gran == 1)
50e17c000c467f Deepa Dinamani 2018-01-21 2468 ; /* nothing */
50e17c000c467f Deepa Dinamani 2018-01-21 2469 else if (gran == NSEC_PER_SEC)
50e17c000c467f Deepa Dinamani 2018-01-21 2470 t.tv_nsec = 0;
50e17c000c467f Deepa Dinamani 2018-01-21 2471 else if (gran > 1 && gran < NSEC_PER_SEC)
50e17c000c467f Deepa Dinamani 2018-01-21 2472 t.tv_nsec -= t.tv_nsec % gran;
50e17c000c467f Deepa Dinamani 2018-01-21 2473 else
50e17c000c467f Deepa Dinamani 2018-01-21 2474 WARN(1, "invalid file time granularity: %u", gran);
50e17c000c467f Deepa Dinamani 2018-01-21 2475 return t;
50e17c000c467f Deepa Dinamani 2018-01-21 2476 }
50e17c000c467f Deepa Dinamani 2018-01-21 2477 EXPORT_SYMBOL(timestamp_truncate);
50e17c000c467f Deepa Dinamani 2018-01-21 2478
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
@ 2023-07-27 12:37 kernel test robot
0 siblings, 0 replies; 45+ messages in thread
From: kernel test robot @ 2023-07-27 12:37 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: block/kyber-iosched.c:269:17: sparse: sparse: bad integer constant expression"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
References: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
TO: David Laight <David.Laight@ACULAB.COM>
TO: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
TO: "'Andy Shevchenko'" <andriy.shevchenko@linux.intel.com>
TO: "'Andrew Morton'" <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: "'Matthew Wilcox (Oracle)'" <willy@infradead.org>
TO: "'Christoph Hellwig'" <hch@infradead.org>
TO: "'Jason A. Donenfeld'" <Jason@zx2c4.com>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master crng-random/master v6.5-rc3 next-20230727]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/a09512c8526b46759669d0b879144563%40AcuMS.aculab.com
patch subject: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: xtensa-randconfig-r093-20230725 (https://download.01.org/0day-ci/archive/20230727/202307272044.StbwTfqy-lkp@intel.com/config)
compiler: xtensa-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230727/202307272044.StbwTfqy-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202307272044.StbwTfqy-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
block/kyber-iosched.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/kernel.h):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> block/kyber-iosched.c:269:17: sparse: sparse: bad integer constant expression
>> block/kyber-iosched.c:269:17: sparse: sparse: static assertion failed: "clamp() low limit 1U greater than high limit kyber_depth[sched_domain]"
--
block/bfq-iosched.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/log2.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> block/bfq-iosched.c:1120:16: sparse: sparse: bad integer constant expression
>> block/bfq-iosched.c:1120:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(dur))(msecs_to_jiffies(3000)) greater than high limit (typeof(dur))(msecs_to_jiffies(25000))"
--
mm/memtest.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/kernel.h):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> mm/memtest.c:79:30: sparse: sparse: bad integer constant expression
>> mm/memtest.c:79:30: sparse: sparse: static assertion failed: "clamp() low limit start greater than high limit end"
mm/memtest.c:80:28: sparse: sparse: bad integer constant expression
mm/memtest.c:80:28: sparse: sparse: static assertion failed: "clamp() low limit start greater than high limit end"
--
drivers/regulator/rtmv20-regulator.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/log2.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> drivers/regulator/rtmv20-regulator.c:192:22: sparse: sparse: bad integer constant expression
>> drivers/regulator/rtmv20-regulator.c:192:22: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(min) greater than high limit (typeof(val))(max)"
--
drivers/clk/xilinx/xlnx_vcu.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/kernel.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> drivers/clk/xilinx/xlnx_vcu.c:317:16: sparse: sparse: bad integer constant expression
>> drivers/clk/xilinx/xlnx_vcu.c:317:16: sparse: sparse: static assertion failed: "clamp() low limit (unsigned long)(pll->fvco_min) greater than high limit (unsigned long)(pll->fvco_max)"
--
fs/btrfs/async-thread.c: note: in included file (through arch/xtensa/include/asm/thread_info.h, arch/xtensa/include/asm/current.h, include/linux/sched.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> fs/btrfs/async-thread.c:197:30: sparse: sparse: bad integer constant expression
>> fs/btrfs/async-thread.c:197:30: sparse: sparse: static assertion failed: "clamp() low limit (typeof(new_current_active))(1) greater than high limit (typeof(new_current_active))(wq->limit_active)"
--
fs/btrfs/discard.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/log2.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> fs/btrfs/discard.c:621:17: sparse: sparse: bad integer constant expression
>> fs/btrfs/discard.c:621:17: sparse: sparse: static assertion failed: "clamp() low limit min_delay greater than high limit (1000UL)"
--
drivers/md/bcache/sysfs.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/log2.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> drivers/md/bcache/sysfs.c:315:9: sparse: sparse: bad integer constant expression
>> drivers/md/bcache/sysfs.c:315:9: sparse: sparse: static assertion failed: "clamp() low limit (typeof(v))(0) greater than high limit (typeof(v))(bch_cutoff_writeback)"
drivers/md/bcache/sysfs.c:341:9: sparse: sparse: bad integer constant expression
>> drivers/md/bcache/sysfs.c:341:9: sparse: sparse: static assertion failed: "clamp() low limit (typeof(v))(1) greater than high limit (typeof(v))(dc->writeback_rate_fp_term_mid - 1)"
drivers/md/bcache/sysfs.c:344:9: sparse: sparse: bad integer constant expression
>> drivers/md/bcache/sysfs.c:344:9: sparse: sparse: static assertion failed: "clamp() low limit (typeof(v))(dc->writeback_rate_fp_term_low + 1) greater than high limit (typeof(v))(dc->writeback_rate_fp_term_high - 1)"
drivers/md/bcache/sysfs.c:348:9: sparse: sparse: bad integer constant expression
>> drivers/md/bcache/sysfs.c:348:9: sparse: sparse: static assertion failed: "clamp() low limit (typeof(v))(dc->writeback_rate_fp_term_mid + 1) greater than high limit (typeof(v))((~0U))"
--
drivers/md/bcache/writeback.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/log2.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> drivers/md/bcache/writeback.c:149:20: sparse: sparse: bad integer constant expression
>> drivers/md/bcache/writeback.c:149:20: sparse: sparse: static assertion failed: "clamp() low limit (int32_t)(dc->writeback_rate_minimum) greater than high limit (int32_t)(1000000000L)"
--
fs/gfs2/rgrp.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/log2.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> fs/gfs2/rgrp.c:1586:26: sparse: sparse: bad integer constant expression
>> fs/gfs2/rgrp.c:1586:26: sparse: sparse: static assertion failed: "clamp() low limit (u32)32 greater than high limit free_blocks"
--
drivers/nvme/host/core.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/log2.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> drivers/nvme/host/core.c:3064:42: sparse: sparse: bad integer constant expression
>> drivers/nvme/host/core.c:3064:42: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(shutdown_timeout) greater than high limit (unsigned int)(60)"
--
drivers/video/backlight/lv5207lp.c: note: in included file (through arch/xtensa/include/asm/thread_info.h, arch/xtensa/include/asm/current.h, include/linux/sched.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> drivers/video/backlight/lv5207lp.c:109:28: sparse: sparse: bad integer constant expression
>> drivers/video/backlight/lv5207lp.c:109:28: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(0) greater than high limit (unsigned int)(props.max_brightness)"
vim +269 block/kyber-iosched.c
00e043936e9a1c Omar Sandoval 2017-04-14 265
6e25cb01ea2063 Omar Sandoval 2018-09-27 266 static void kyber_resize_domain(struct kyber_queue_data *kqd,
6e25cb01ea2063 Omar Sandoval 2018-09-27 267 unsigned int sched_domain, unsigned int depth)
6e25cb01ea2063 Omar Sandoval 2018-09-27 268 {
00e043936e9a1c Omar Sandoval 2017-04-14 @269 depth = clamp(depth, 1U, kyber_depth[sched_domain]);
6c3b7af1c975b8 Omar Sandoval 2018-09-27 270 if (depth != kqd->domain_tokens[sched_domain].sb.depth) {
00e043936e9a1c Omar Sandoval 2017-04-14 271 sbitmap_queue_resize(&kqd->domain_tokens[sched_domain], depth);
c41108049d1433 Christoph Hellwig 2021-10-12 272 trace_kyber_adjust(kqd->dev, kyber_domain_names[sched_domain],
6c3b7af1c975b8 Omar Sandoval 2018-09-27 273 depth);
6c3b7af1c975b8 Omar Sandoval 2018-09-27 274 }
00e043936e9a1c Omar Sandoval 2017-04-14 275 }
00e043936e9a1c Omar Sandoval 2017-04-14 276
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
@ 2023-07-27 3:27 kernel test robot
0 siblings, 0 replies; 45+ messages in thread
From: kernel test robot @ 2023-07-27 3:27 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: fs/inode.c:2462:20: sparse: sparse: bad integer constant expression"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
References: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
TO: David Laight <David.Laight@ACULAB.COM>
TO: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
TO: "'Andy Shevchenko'" <andriy.shevchenko@linux.intel.com>
TO: "'Andrew Morton'" <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: "'Matthew Wilcox (Oracle)'" <willy@infradead.org>
TO: "'Christoph Hellwig'" <hch@infradead.org>
TO: "'Jason A. Donenfeld'" <Jason@zx2c4.com>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master v6.5-rc3 next-20230726]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/a09512c8526b46759669d0b879144563%40AcuMS.aculab.com
patch subject: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: microblaze-randconfig-r092-20230725 (https://download.01.org/0day-ci/archive/20230727/202307271134.BYUR61oT-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230727/202307271134.BYUR61oT-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202307271134.BYUR61oT-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> fs/inode.c:2462:20: sparse: sparse: bad integer constant expression
>> fs/inode.c:2462:20: sparse: sparse: static assertion failed: "clamp() low limit sb->s_time_min greater than high limit sb->s_time_max"
--
>> kernel/workqueue.c:4579:16: sparse: sparse: bad integer constant expression
>> kernel/workqueue.c:4579:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(max_active))(1) greater than high limit (typeof(max_active))(lim)"
--
>> lib/dynamic_queue_limits.c:101:17: sparse: sparse: bad integer constant expression
>> lib/dynamic_queue_limits.c:101:17: sparse: sparse: static assertion failed: "clamp() low limit dql->min_limit greater than high limit dql->max_limit"
--
>> mm/mm_init.c:908:21: sparse: sparse: bad integer constant expression
>> mm/mm_init.c:908:21: sparse: sparse: static assertion failed: "clamp() low limit zone_start_pfn greater than high limit zone_end_pfn"
mm/mm_init.c:909:19: sparse: sparse: bad integer constant expression
mm/mm_init.c:909:19: sparse: sparse: static assertion failed: "clamp() low limit zone_start_pfn greater than high limit zone_end_pfn"
mm/mm_init.c:1145:29: sparse: sparse: bad integer constant expression
>> mm/mm_init.c:1145:29: sparse: sparse: static assertion failed: "clamp() low limit range_start_pfn greater than high limit range_end_pfn"
mm/mm_init.c:1146:27: sparse: sparse: bad integer constant expression
mm/mm_init.c:1146:27: sparse: sparse: static assertion failed: "clamp() low limit range_start_pfn greater than high limit range_end_pfn"
mm/mm_init.c:1189:37: sparse: sparse: bad integer constant expression
mm/mm_init.c:1189:37: sparse: sparse: static assertion failed: "clamp() low limit zone_start_pfn greater than high limit zone_end_pfn"
mm/mm_init.c:1191:35: sparse: sparse: bad integer constant expression
mm/mm_init.c:1191:35: sparse: sparse: static assertion failed: "clamp() low limit zone_start_pfn greater than high limit zone_end_pfn"
mm/mm_init.c:1222:27: sparse: sparse: bad integer constant expression
>> mm/mm_init.c:1222:27: sparse: sparse: static assertion failed: "clamp() low limit zone_low greater than high limit zone_high"
mm/mm_init.c:1223:25: sparse: sparse: bad integer constant expression
mm/mm_init.c:1223:25: sparse: sparse: static assertion failed: "clamp() low limit zone_low greater than high limit zone_high"
--
>> mm/page_alloc.c:2415:17: sparse: sparse: bad integer constant expression
>> mm/page_alloc.c:2415:17: sparse: sparse: static assertion failed: "clamp() low limit min_nr_free greater than high limit max_nr_free"
--
>> mm/memblock.c:222:30: sparse: sparse: bad integer constant expression
>> mm/memblock.c:222:30: sparse: sparse: static assertion failed: "clamp() low limit start greater than high limit end"
mm/memblock.c:223:28: sparse: sparse: bad integer constant expression
mm/memblock.c:223:28: sparse: sparse: static assertion failed: "clamp() low limit start greater than high limit end"
mm/memblock.c:258:30: sparse: sparse: bad integer constant expression
mm/memblock.c:258:30: sparse: sparse: static assertion failed: "clamp() low limit start greater than high limit end"
mm/memblock.c:259:28: sparse: sparse: bad integer constant expression
mm/memblock.c:259:28: sparse: sparse: static assertion failed: "clamp() low limit start greater than high limit end"
--
>> drivers/clk/clk.c:1484:29: sparse: sparse: bad integer constant expression
>> drivers/clk/clk.c:1484:29: sparse: sparse: static assertion failed: "clamp() low limit req->min_rate greater than high limit req->max_rate"
drivers/clk/clk.c:2613:16: sparse: sparse: bad integer constant expression
>> drivers/clk/clk.c:2613:16: sparse: sparse: static assertion failed: "clamp() low limit min greater than high limit max"
--
>> drivers/clk/clk-versaclock5.c:456:16: sparse: sparse: bad integer constant expression
>> drivers/clk/clk-versaclock5.c:456:16: sparse: sparse: static assertion failed: "clamp() low limit 2500000000UL greater than high limit vc5->chip_info->vco_max"
--
>> drivers/hwmon/w83793.c:201:16: sparse: sparse: bad integer constant expression
>> drivers/hwmon/w83793.c:201:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof((val + (val < 0 ? -500 : 500)) / 1000))(min) greater than high limit (typeof((val + (val < 0 ? -500 : 500)) / 1000))(max)"
--
>> drivers/hwmon/w83795.c:273:16: sparse: sparse: bad integer constant expression
>> drivers/hwmon/w83795.c:273:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val / 1000))(min) greater than high limit (typeof(val / 1000))(max)"
--
>> drivers/hwmon/adm1026.c:498:28: sparse: sparse: bad integer constant expression
>> drivers/hwmon/adm1026.c:498:28: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(255 * adm1026_scaling[nr] / 192)"
drivers/hwmon/adm1026.c:526:28: sparse: sparse: bad integer constant expression
drivers/hwmon/adm1026.c:526:28: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(255 * adm1026_scaling[nr] / 192)"
drivers/hwmon/adm1026.c:609:28: sparse: sparse: bad integer constant expression
drivers/hwmon/adm1026.c:609:28: sparse: sparse: static assertion failed: "clamp() low limit (typeof(({ __builtin_choose_expr((sizeof(int) == sizeof(*(8 ? ((void *)((long)(((typeof(val))(val)) - ((typeof(val))((-((int)(~0U >> 1)) - 1))) + ((typeof(val))(((int)(~0U >> 1)) - 16000))) * 0l)) : (int *)8))), (((typeof(val))(val)) >= ((typeof(val))(((int)(~0U >> 1)) - 16000)) ? ((typeof(val))(((int)(~0U >> 1)) - 16000)) : (((typeof(val))(val)) <= ((typeof(val))((-((int)(~0U >> 1)) - 1))) ? ((typeof(val))((-((int)(~0U >> 1)) - 1))) : ((typeof(val))(val)))), ({ typeof((typeof(val))(val)) __UNIQUE_ID___val326 = ((typeof(val))(val)); typeof((typeof(val))((-((int)(~0U >> 1)) - 1))) __UNIQUE_ID___lo327 = ((typeof(val))((-((int)(~0U >> 1)) - 1))); typeof((typeof(val))(((int)(~0U >> 1)) - 16000)) __UNIQUE_ID___hi328 = ((typeof(val))(((int)(~0U >> 1)) - 16000)); _Static_assert(!(sizeof(int) == sizeof(*(8 ? ((void *)((long)(((typeof(val))((-((int)(~0U >> 1)) - 1))) > ((typeof(val))(((int)(~0U >> 1)) - 16000))) * 0l)) : (int *)8))) || ((typeof(val))((-((int)(~0U >> 1)) - 1))) <= ((typeof(val))(((int)(~0U >> 1)) - 16000)), "clamp() low limit " "(typeof(val))((-((int)(~0U >> 1)) - 1))" " greater than high limit " "(typeof(val))(((int)(~0U >> 1)) - 16000)"); _Static_assert(((((typeof((typeof(val))(val)))(-1)) < (__attribute__((force)) typeof((typeof(val))(val)))1) == (((typeof((typeof(val))((-((int)(~0U >> 1)) - 1))))(-1)) < (__attribute__((force)) typeof((typeof(val))((-((int)(~0U >> 1)) - 1))))1)), "clamp() 'lo' signedness error"); _Static_assert(((((typeof((typeof(val))(val)))(-1)) < (__attribute__((force)) typeof((typeof(val))(val)))1) == (((typeof((typeof(val))(((int)(~0U >> 1)) - 16000)))(-1)) < (__attribute__((force)) typeof((typeof(val))(((int)(~0U >> 1)) - 16000)))1)), "clamp() 'hi' signedness error"); ((__UNIQUE_ID___val326) >= (__UNIQUE_ID___hi328) ? (__UNIQUE_ID___hi328) : ((__UNIQUE_ID___val326) <= (__UNIQUE_ID___lo327) ? (__UNIQUE_ID___lo327) : (__UNIQUE_ID___val326))); })); }) + 16000))(0) greater than high limit (typeof(({ __builtin_choose_expr((sizeof(int) == sizeof(*(8 ? ((void *)((long)(((typeof(val))(val)) - ((typeof(val))((-((int)(~0U >> 1)) - 1))) + ((typeof(val))(((int)(~0U >> 1)) - 16000))) * 0l)) : (int *)8))), (((typeof(val))(val)) >= ((typeof(val))(((int)(~0U >> 1)) - 16000)) ? ((typeof(val))(((int)(~0U >> 1)) - 16000)) : (((typeof(val))(val)) <= ((typeof(val))((-((int)(~0U >> 1)) - 1))) ? ((typeof(val))((-((int)(~0U >> 1)) - 1))) : ((typeof(val))(val)))), ({ typeof((typeof(val))(val)) __UNIQUE_ID___val326 = ((typeof(val))(val)); typeof((typeof(val))((-((int)(~0U >> 1)) - 1))) __UNIQUE_ID___lo327 = ((typeof(val))((-((int)(~0U >> 1)) - 1))); typeof((typeof(val))(((int)(~0U >> 1)) - 16000)) __UNIQUE_ID___hi328 = ((typeof(val))(((int)(~0U >> 1)) - 16000)); _Static_assert(!(sizeof(int) == sizeof(*(8 ? ((void *)((long)(((typeof(val))((-((int)(~0U >> 1)) - 1))) > ((typeof(val))(((int)(~0U >> 1)) - 16000))) * 0l)) : (int *)8))) || ((typeof(val))((-((int)(~0U >> 1)) - 1))) <= ((typeof(val))(((int)(~0U >> 1)) - 16000)), "clamp() low limit " "(typeof(val))((-((int)(~0U >> 1)) - 1))" " greater than high limit " "(typeof(val))(((int)(~0U >> 1)) - 16000)"); _Static_assert(((((typeof((typeof(val))(val)))(-1)) < (__attribute__((force)) typeof((typeof(val))(val)))1) == (((typeof((typeof(val))((-((int)(~0U >> 1)) - 1))))(-1)) < (__attribute__((force)) typeof((typeof(val))((-((int)(~0U >> 1)) - 1))))1)), "clamp() 'lo' signedness error"); _Static_assert(((((typeof((typeof(val))(val)))(-1)) < (__attribute__((force)) typeof((typeof(val))(val)))1) == (((typeof((typeof(val))(((int)(~0U >> 1)) - 16000)))(-1)) < (__attribute__((force)) typeof((typeof(val))(((int)(~0U >> 1)) - 16000)))1)), "clamp() 'hi' signedness error"); ((__UNIQUE_ID___val326) >= (__UNIQUE_ID___hi328) ? (__UNIQUE_ID___hi328) : ((__UNIQUE_ID___val326) <= (__UNIQUE_ID___lo327) ? (__UNIQUE_ID___lo327) : (__UNIQUE_ID___val326))); })); }) + 16000))(255 * adm1026_scaling[16] / 192)"
drivers/hwmon/adm1026.c:638:28: sparse: sparse: bad integer constant expression
drivers/hwmon/adm1026.c:638:28: sparse: sparse: static assertion failed: "clamp() low limit (typeof(({ __builtin_choose_expr((sizeof(int) == sizeof(*(8 ? ((void *)((long)(((typeof(val))(val)) - ((typeof(val))((-((int)(~0U >> 1)) - 1))) + ((typeof(val))(((int)(~0U >> 1)) - 16000))) * 0l)) : (int *)8))), (((typeof(val))(val)) >= ((typeof(val))(((int)(~0U >> 1)) - 16000)) ? ((typeof(val))(((int)(~0U >> 1)) - 16000)) : (((typeof(val))(val)) <= ((typeof(val))((-((int)(~0U >> 1)) - 1))) ? ((typeof(val))((-((int)(~0U >> 1)) - 1))) : ((typeof(val))(val)))), ({ typeof((typeof(val))(val)) __UNIQUE_ID___val332 = ((typeof(val))(val)); typeof((typeof(val))((-((int)(~0U >> 1)) - 1))) __UNIQUE_ID___lo333 = ((typeof(val))((-((int)(~0U >> 1)) - 1))); typeof((typeof(val))(((int)(~0U >> 1)) - 16000)) __UNIQUE_ID___hi334 = ((typeof(val))(((int)(~0U >> 1)) - 16000)); _Static_assert(!(sizeof(int) == sizeof(*(8 ? ((void *)((long)(((typeof(val))((-((int)(~0U >> 1)) - 1))) > ((typeof(val))(((int)(~0U >> 1)) - 16000))) * 0l)) : (int *)8))) || ((typeof(val))((-((int)(~0U >> 1)) - 1))) <= ((typeof(val))(((int)(~0U >> 1)) - 16000)), "clamp() low limit " "(typeof(val))((-((int)(~0U >> 1)) - 1))" " greater than high limit " "(typeof(val))(((int)(~0U >> 1)) - 16000)"); _Static_assert(((((typeof((typeof(val))(val)))(-1)) < (__attribute__((force)) typeof((typeof(val))(val)))1) == (((typeof((typeof(val))((-((int)(~0U >> 1)) - 1))))(-1)) < (__attribute__((force)) typeof((typeof(val))((-((int)(~0U >> 1)) - 1))))1)), "clamp() 'lo' signedness error"); _Static_assert(((((typeof((typeof(val))(val)))(-1)) < (__attribute__((force)) typeof((typeof(val))(val)))1) == (((typeof((typeof(val))(((int)(~0U >> 1)) - 16000)))(-1)) < (__attribute__((force)) typeof((typeof(val))(((int)(~0U >> 1)) - 16000)))1)), "clamp() 'hi' signedness error"); ((__UNIQUE_ID___val332) >= (__UNIQUE_ID___hi334) ? (__UNIQUE_ID___hi334) : ((__UNIQUE_ID___val332) <= (__UNIQUE_ID___lo333) ? (__UNIQUE_ID___lo333) : (__UNIQUE_ID___val332))); })); }) + 16000))(0) greater than high limit (typeof(({ __builtin_choose_expr((sizeof(int) == sizeof(*(8 ? ((void *)((long)(((typeof(val))(val)) - ((typeof(val))((-((int)(~0U >> 1)) - 1))) + ((typeof(val))(((int)(~0U >> 1)) - 16000))) * 0l)) : (int *)8))), (((typeof(val))(val)) >= ((typeof(val))(((int)(~0U >> 1)) - 16000)) ? ((typeof(val))(((int)(~0U >> 1)) - 16000)) : (((typeof(val))(val)) <= ((typeof(val))((-((int)(~0U >> 1)) - 1))) ? ((typeof(val))((-((int)(~0U >> 1)) - 1))) : ((typeof(val))(val)))), ({ typeof((typeof(val))(val)) __UNIQUE_ID___val332 = ((typeof(val))(val)); typeof((typeof(val))((-((int)(~0U >> 1)) - 1))) __UNIQUE_ID___lo333 = ((typeof(val))((-((int)(~0U >> 1)) - 1))); typeof((typeof(val))(((int)(~0U >> 1)) - 16000)) __UNIQUE_ID___hi334 = ((typeof(val))(((int)(~0U >> 1)) - 16000)); _Static_assert(!(sizeof(int) == sizeof(*(8 ? ((void *)((long)(((typeof(val))((-((int)(~0U >> 1)) - 1))) > ((typeof(val))(((int)(~0U >> 1)) - 16000))) * 0l)) : (int *)8))) || ((typeof(val))((-((int)(~0U >> 1)) - 1))) <= ((typeof(val))(((int)(~0U >> 1)) - 16000)), "clamp() low limit " "(typeof(val))((-((int)(~0U >> 1)) - 1))" " greater than high limit " "(typeof(val))(((int)(~0U >> 1)) - 16000)"); _Static_assert(((((typeof((typeof(val))(val)))(-1)) < (__attribute__((force)) typeof((typeof(val))(val)))1) == (((typeof((typeof(val))((-((int)(~0U >> 1)) - 1))))(-1)) < (__attribute__((force)) typeof((typeof(val))((-((int)(~0U >> 1)) - 1))))1)), "clamp() 'lo' signedness error"); _Static_assert(((((typeof((typeof(val))(val)))(-1)) < (__attribute__((force)) typeof((typeof(val))(val)))1) == (((typeof((typeof(val))(((int)(~0U >> 1)) - 16000)))(-1)) < (__attribute__((force)) typeof((typeof(val))(((int)(~0U >> 1)) - 16000)))1)), "clamp() 'hi' signedness error"); ((__UNIQUE_ID___val332) >= (__UNIQUE_ID___hi334) ? (__UNIQUE_ID___hi334) : ((__UNIQUE_ID___val332) <= (__UNIQUE_ID___lo333) ? (__UNIQUE_ID___lo333) : (__UNIQUE_ID___val332))); })); }) + 16000))(255 * adm1026_scaling[16] / 192)"
/bin/bash: line 1: 51808 Segmentation fault sparse -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise -Wno-return-void -Wno-unknown-attribute -fdiagnostic-prefix -D__CHECK_ENDIAN__ --arch=microblaze -mlittle-endian -m32 -Wp,-MMD,drivers/hwmon/.adm1026.o.d -nostdinc -Iarch/microblaze/include -I./arch/microblaze/include/generated -Iinclude -I./include -Iarch/microblaze/include/uapi -I./arch/microblaze/include/generated/uapi -Iinclude/uapi -I./include/generated/uapi -include include/linux/compiler-version.h -include include/linux/kconfig.h -include include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map== -Wundef -DKBUILD_EXTRA_WARN1 -std=gnu11 -fshort-wchar -funsigned-char -fno-common -fno-PIE -fno-strict-aliasing -Wall -Wundef -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Werror=strict-prototypes -Wno-format-security -Wno-trigraphs -mlittle-endian -ffixed-r31 -mcpu=v7.10.d -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -Os -fno-allow-store-data-races -fno-reorder-blocks -fno-ipa-cp-clone -fno-partial-inlining -Wframe-larger-than=1024 -fno-stack-protector -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-dangling-pointer -ftrivial-auto-var-init=zero -fno-stack-clash-protection -fzero-call-used-regs=used-gpr -pg -fno-inline-functions-called-once -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -Wextra -Wunused -Wno-unused-parameter -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wmissing-include-dirs -Wunused-but-set-variable -Wunused-const-variable -Wpacked-not-aligned -Wstringop-truncation -Wno-missing-field-initializers -Wno-sign-compare -Wno-type-limits -Wno-shift-negative-value -gsplit-dwarf -g -gdwarf-4 -fno-var-tracking -femit-struct-debug-baseonly -gz=zlib -DDEBUG -I drivers/hwmon -I ./drivers/hwmon -DKBUILD_MODFILE='"drivers/hwmon/adm1026"' -DKBUILD_BASENAME='"adm1026"' -DKBUILD_MODNAME='"adm1026"' -D__KBUILD_MODNAME=kmod_adm1026 drivers/hwmon/adm1026.c
--
>> drivers/hwmon/adm9240.c:89:15: sparse: sparse: bad integer constant expression
>> drivers/hwmon/adm9240.c:89:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(nom_mv[n] * 255 / 192)"
--
>> drivers/hwmon/adt7411.c:464:15: sparse: sparse: bad integer constant expression
>> drivers/hwmon/adt7411.c:464:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(255 * data->vref_cached / 256)"
--
>> drivers/hwmon/adt7462.c:899:16: sparse: sparse: bad integer constant expression
>> drivers/hwmon/adt7462.c:899:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(temp))(0) greater than high limit (typeof(temp))(255 * x / 1000)"
drivers/hwmon/adt7462.c:939:16: sparse: sparse: bad integer constant expression
drivers/hwmon/adt7462.c:939:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(temp))(0) greater than high limit (typeof(temp))(255 * x / 1000)"
--
>> drivers/hwmon/asc7621.c:214:18: sparse: sparse: bad integer constant expression
>> drivers/hwmon/asc7621.c:214:18: sparse: sparse: static assertion failed: "clamp() low limit (typeof(reqval))(0) greater than high limit (typeof(reqval))(param->mask[0])"
drivers/hwmon/asc7621.c:479:18: sparse: sparse: bad integer constant expression
>> drivers/hwmon/asc7621.c:479:18: sparse: sparse: static assertion failed: "clamp() low limit (typeof(reqval))(auto_point1 + 2000) greater than high limit (typeof(reqval))(auto_point1 + 80000)"
--
>> drivers/hwmon/dme1737.c:269:15: sparse: sparse: bad integer constant expression
>> drivers/hwmon/dme1737.c:269:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(255 * nominal / 192)"
drivers/hwmon/dme1737.c:325:16: sparse: sparse: bad integer constant expression
>> drivers/hwmon/dme1737.c:325:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(hyst))(temp - 15000) greater than high limit (typeof(hyst))(temp)"
drivers/hwmon/dme1737.c:1050:23: sparse: sparse: bad integer constant expression
>> drivers/hwmon/dme1737.c:1050:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(temp) greater than high limit (typeof(val))(temp + 80000)"
--
>> drivers/hwmon/emc6w201.c:205:15: sparse: sparse: bad integer constant expression
>> drivers/hwmon/emc6w201.c:205:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(255 * nominal_mv[nr] / 192)"
--
>> drivers/hwmon/f71882fg.c:616:15: sparse: sparse: bad integer constant expression
>> drivers/hwmon/f71882fg.c:616:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(data->temp_high[nr] - 15) greater than high limit (typeof(val))(data->temp_high[nr])"
drivers/hwmon/f71882fg.c:1591:15: sparse: sparse: bad integer constant expression
>> drivers/hwmon/f71882fg.c:1591:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(data->pwm_auto_point_temp[nr][point] - 15) greater than high limit (typeof(val))(data->pwm_auto_point_temp[nr][point])"
--
>> drivers/hwmon/g762.c:191:15: sparse: sparse: bad integer constant expression
>> drivers/hwmon/g762.c:191:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(rpm))(f1 / (255 * f2)) greater than high limit (typeof(rpm))((~0UL) / f2)"
--
>> drivers/hwmon/gl520sm.c:390:13: sparse: sparse: bad integer constant expression
>> drivers/hwmon/gl520sm.c:390:13: sparse: sparse: static assertion failed: "clamp() low limit (typeof(v))((480000 >> (data->fan_div[n])) / 255) greater than high limit (typeof(v))((480000 >> (data->fan_div[n])))"
>> drivers/hwmon/gl520sm.c:390:13: sparse: sparse: bad integer constant expression
>> drivers/hwmon/gl520sm.c:390:13: sparse: sparse: static assertion failed: "clamp() low limit (typeof(v))((480000 >> (data->fan_div[n])) / 255) greater than high limit (typeof(v))((480000 >> (data->fan_div[n])))"
>> drivers/hwmon/gl520sm.c:390:13: sparse: sparse: bad integer constant expression
>> drivers/hwmon/gl520sm.c:390:13: sparse: sparse: static assertion failed: "clamp() low limit (typeof(v))((480000 >> (data->fan_div[n])) / 255) greater than high limit (typeof(v))((480000 >> (data->fan_div[n])))"
--
>> drivers/hwmon/ina3221.c:448:22: sparse: sparse: bad integer constant expression
>> drivers/hwmon/ina3221.c:448:22: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))((-((int)(~0U >> 1)) - 1) / resistance_uo) greater than high limit (typeof(val))(((int)(~0U >> 1)) / resistance_uo)"
--
>> drivers/hwmon/jc42.c:219:21: sparse: sparse: bad integer constant expression
>> drivers/hwmon/jc42.c:219:21: sparse: sparse: static assertion failed: "clamp() low limit (typeof(temp))(extended ? (-40000) : 0) greater than high limit (typeof(temp))(125000)"
drivers/hwmon/jc42.c:359:23: sparse: sparse: bad integer constant expression
>> drivers/hwmon/jc42.c:359:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))((data->extended ? (-40000) : 0) - 6000) greater than high limit (typeof(val))(125000)"
--
>> drivers/hwmon/lm85.c:874:28: sparse: sparse: bad integer constant expression
>> drivers/hwmon/lm85.c:874:28: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(255 * lm85_scaling[nr] / 192)"
drivers/hwmon/lm85.c:902:28: sparse: sparse: bad integer constant expression
drivers/hwmon/lm85.c:902:28: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(255 * lm85_scaling[nr] / 192)"
--
>> drivers/hwmon/lm93.c:361:25: sparse: sparse: bad integer constant expression
>> drivers/hwmon/lm93.c:361:25: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(lm93_vin_val_min[nr]) greater than high limit (typeof(val))(lm93_vin_val_max[nr])"
drivers/hwmon/lm93.c:375:18: sparse: sparse: bad integer constant expression
>> drivers/hwmon/lm93.c:375:18: sparse: sparse: static assertion failed: "clamp() low limit (typeof(result))(lm93_vin_reg_min[nr]) greater than high limit (typeof(result))(lm93_vin_reg_max[nr])"
drivers/hwmon/lm93.c:462:15: sparse: sparse: bad integer constant expression
>> drivers/hwmon/lm93.c:462:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(off))((0)) greater than high limit (typeof(off))(mode ? (75) : (150))"
--
>> drivers/hwmon/max6697.c:316:16: sparse: sparse: bad integer constant expression
>> drivers/hwmon/max6697.c:316:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(temp))(0) greater than high limit (typeof(temp))(data->type == max6581 ? 255 : 127)"
--
>> drivers/hwmon/sbrmi.c:239:15: sparse: sparse: bad integer constant expression
>> drivers/hwmon/sbrmi.c:239:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(data->pwr_limit_max)"
--
>> drivers/hwmon/smsc47m192.c:67:15: sparse: sparse: bad integer constant expression
>> drivers/hwmon/smsc47m192.c:67:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(nom_mv[n] * 255 / 192)"
--
>> drivers/hwmon/tmp401.c:388:23: sparse: sparse: bad integer constant expression
>> drivers/hwmon/tmp401.c:388:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(temp - 255000) greater than high limit (typeof(val))(temp)"
--
>> drivers/dma/dw/core.c:791:17: sparse: sparse: bad integer constant expression
>> drivers/dma/dw/core.c:791:17: sparse: sparse: static assertion failed: "clamp() low limit 0U greater than high limit dwc->max_burst"
drivers/dma/dw/core.c:793:17: sparse: sparse: bad integer constant expression
drivers/dma/dw/core.c:793:17: sparse: sparse: static assertion failed: "clamp() low limit 0U greater than high limit dwc->max_burst"
--
>> drivers/leds/led-class-flash.c:383:13: sparse: sparse: bad integer constant expression
>> drivers/leds/led-class-flash.c:383:13: sparse: sparse: static assertion failed: "clamp() low limit s->min greater than high limit s->max"
--
>> net/core/flow_dissector.c:949:28: sparse: sparse: bad integer constant expression
>> net/core/flow_dissector.c:949:28: sparse: sparse: static assertion failed: "clamp() low limit (u16)(nhoff) greater than high limit (u16)(hlen)"
net/core/flow_dissector.c:950:28: sparse: sparse: bad integer constant expression
>> net/core/flow_dissector.c:950:28: sparse: sparse: static assertion failed: "clamp() low limit (u16)(flow_keys->nhoff) greater than high limit (u16)(hlen)"
--
>> net/dccp/ccids/ccid3.c:75:30: sparse: sparse: bad integer constant expression
>> net/dccp/ccids/ccid3.c:75:30: sparse: sparse: static assertion failed: "clamp() low limit (__u32)(2 * hc->tx_s) greater than high limit (__u32)(4 * hc->tx_s)"
--
>> security/apparmor/lsm.c:1559:42: sparse: sparse: bad integer constant expression
>> security/apparmor/lsm.c:1559:42: sparse: sparse: static assertion failed: "clamp() low limit zstd_min_clevel() greater than high limit zstd_max_clevel()"
--
>> net/ipv4/ip_tunnel.c:1186:23: sparse: sparse: bad integer constant expression
>> net/ipv4/ip_tunnel.c:1186:23: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)68 greater than high limit max"
--
>> drivers/spi/spi-cadence.c:313:15: sparse: sparse: bad integer constant expression
>> drivers/spi/spi-cadence.c:313:15: sparse: sparse: static assertion failed: "clamp() low limit 0 greater than high limit xspi->tx_bytes"
drivers/spi/spi-cadence.c:314:15: sparse: sparse: bad integer constant expression
>> drivers/spi/spi-cadence.c:314:15: sparse: sparse: static assertion failed: "clamp() low limit 0 greater than high limit xspi->rx_bytes"
--
>> drivers/spi/spi-cadence-xspi.c:436:27: sparse: sparse: bad integer constant expression
>> drivers/spi/spi-cadence-xspi.c:436:27: sparse: sparse: static assertion failed: "clamp() low limit (typeof(op->data.nbytes))(0) greater than high limit (typeof(op->data.nbytes))(cdns_xspi->sdmasize)"
--
drivers/gpu/drm/drm_atomic.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_atomic_uapi.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_blend.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_bridge.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_client.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_client.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_client_modeset.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_color_mgmt.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
>> drivers/gpu/drm/drm_color_mgmt.c:142:15: sparse: sparse: bad integer constant expression
>> drivers/gpu/drm/drm_color_mgmt.c:142:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(mag))(0) greater than high limit (typeof(mag))(negative ? ((((1ULL))) << (n + m - 1)) : ((((1ULL))) << (n + m - 1)) - 1)"
--
drivers/gpu/drm/drm_crtc.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_connector.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_encoder.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_drv.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_client.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_encoder.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_edid.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_encoder.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_file.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_client.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_framebuffer.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_ioctl.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_lease.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_mode_config.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_encoder.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_mode_object.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_modes.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
drivers/gpu/drm/drm_modes.c:2474:29: sparse: sparse: bad integer constant expression
drivers/gpu/drm/drm_modes.c:2474:29: sparse: sparse: static assertion failed: "max(bpp_end_ptr, refresh_end_ptr) signedness error, fix types or consider max_unsigned() before max_t()"
--
drivers/gpu/drm/drm_modeset_lock.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_plane.c: note: in included file (through include/drm/drm_plane.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_property.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_vblank_work.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_vblank.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_writeback.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_panel.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_of.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_debugfs.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_debugfs_crc.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_fb_dma_helper.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_atomic_state_helper.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_bridge_connector.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_crtc_helper.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_atomic_helper.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_damage_helper.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_encoder_slave.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_encoder_slave.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_gem_atomic_helper.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_gem_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_kms_helper_common.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, drivers/gpu/drm/drm_crtc_helper_internal.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_gem_framebuffer_helper.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_plane_helper.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_modeset_helper.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_probe_helper.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_simple_kms_helper.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_self_refresh_helper.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/panel.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/drm_mipi_dbi.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
>> net/ipv6/ip6_vti.c:674:28: sparse: sparse: bad integer constant expression
>> net/ipv6/ip6_vti.c:674:28: sparse: sparse: static assertion failed: "clamp() low limit dev->min_mtu greater than high limit dev->max_mtu"
--
>> drivers/usb/core/config.c:347:37: sparse: sparse: bad integer constant expression
>> drivers/usb/core/config.c:347:37: sparse: sparse: static assertion failed: "clamp() low limit i greater than high limit j"
drivers/usb/core/config.c:355:37: sparse: sparse: bad integer constant expression
drivers/usb/core/config.c:355:37: sparse: sparse: static assertion failed: "clamp() low limit i greater than high limit j"
--
>> drivers/media/i2c/max2175.c:1107:16: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/max2175.c:1107:16: sparse: sparse: static assertion failed: "clamp() low limit ctx->bands_rf->rangelow greater than high limit ctx->bands_rf->rangehigh"
--
>> drivers/media/i2c/imx296.c:711:25: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/imx296.c:711:25: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(crop->width / 2) greater than high limit (unsigned int)(crop->width)"
drivers/media/i2c/imx296.c:713:26: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/imx296.c:713:26: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(crop->height / 2) greater than high limit (unsigned int)(crop->height)"
--
>> drivers/media/i2c/mt9m001.c:281:21: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/mt9m001.c:281:21: sparse: sparse: static assertion failed: "clamp() low limit (u32)(20) greater than high limit (u32)(20 + 1280 - rect.width)"
drivers/media/i2c/mt9m001.c:286:20: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/mt9m001.c:286:20: sparse: sparse: static assertion failed: "clamp() low limit (u32)(12) greater than high limit (u32)(12 + 1024 - rect.height)"
--
>> drivers/media/i2c/mt9v032.c:515:17: sparse: sparse: bad integer constant expression
drivers/media/i2c/mt9v032.c:515:17: sparse: sparse: static assertion failed: "clamp() low limit __builtin_choose_expr((sizeof(int) == sizeof(*(8 ? ((void *)((long)(((unsigned int)(__crop->width / 4)) - ((unsigned int)(1))) * 0l)) : (int *)8))), (((unsigned int)(__crop->width / 4)) > ((unsigned int)(1)) ? ((unsigned int)(__crop->width / 4)) : ((unsigned int)(1))), ({ typeof((unsigned int)(__crop->width / 4)) __UNIQUE_ID___x322 = ((unsigned int)(__crop->width / 4)); typeof((unsigned int)(1)) __UNIQUE_ID___y323 = ((unsigned int)(1)); _Static_assert(((((typeof((unsigned int)(__crop->width / 4)))(-1)) < (__attribute__((force)) typeof((unsigned int)(__crop->width / 4)))1) == (((typeof((unsigned int)(1)))(-1)) < (__attribute__((force)) typeof((unsigned int)(1)))1)), "max" "(" "(unsigned int)(__crop->width / 4)" ", " "(unsigned int)(1)" ") signedness error, fix types or consider " "max" "_unsigned() before " "max" "_t()"); ((__UNIQUE_ID___x322) > (__UNIQUE_ID___y323) ? (__UNIQUE_ID___x322) : (__UNIQUE_ID___y323)); })) greater than high limit __crop->width"
drivers/media/i2c/mt9v032.c:519:18: sparse: sparse: bad integer constant expression
drivers/media/i2c/mt9v032.c:519:18: sparse: sparse: static assertion failed: "clamp() low limit __builtin_choose_expr((sizeof(int) == sizeof(*(8 ? ((void *)((long)(((unsigned int)(__crop->height / 4)) - ((unsigned int)(1))) * 0l)) : (int *)8))), (((unsigned int)(__crop->height / 4)) > ((unsigned int)(1)) ? ((unsigned int)(__crop->height / 4)) : ((unsigned int)(1))), ({ typeof((unsigned int)(__crop->height / 4)) __UNIQUE_ID___x327 = ((unsigned int)(__crop->height / 4)); typeof((unsigned int)(1)) __UNIQUE_ID___y328 = ((unsigned int)(1)); _Static_assert(((((typeof((unsigned int)(__crop->height / 4)))(-1)) < (__attribute__((force)) typeof((unsigned int)(__crop->height / 4)))1) == (((typeof((unsigned int)(1)))(-1)) < (__attribute__((force)) typeof((unsigned int)(1)))1)), "max" "(" "(unsigned int)(__crop->height / 4)" ", " "(unsigned int)(1)" ") signedness error, fix types or consider " "max" "_unsigned() before " "max" "_t()"); ((__UNIQUE_ID___x327) > (__UNIQUE_ID___y328) ? (__UNIQUE_ID___x327) : (__UNIQUE_ID___y328)); })) greater than high limit __crop->height"
/bin/bash: line 1: 62201 Segmentation fault sparse -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise -Wno-return-void -Wno-unknown-attribute -fdiagnostic-prefix -D__CHECK_ENDIAN__ --arch=microblaze -mlittle-endian -m32 -Wp,-MMD,drivers/media/i2c/.mt9v032.o.d -nostdinc -Iarch/microblaze/include -I./arch/microblaze/include/generated -Iinclude -I./include -Iarch/microblaze/include/uapi -I./arch/microblaze/include/generated/uapi -Iinclude/uapi -I./include/generated/uapi -include include/linux/compiler-version.h -include include/linux/kconfig.h -include include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map== -Wundef -DKBUILD_EXTRA_WARN1 -std=gnu11 -fshort-wchar -funsigned-char -fno-common -fno-PIE -fno-strict-aliasing -Wall -Wundef -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Werror=strict-prototypes -Wno-format-security -Wno-trigraphs -mlittle-endian -ffixed-r31 -mcpu=v7.10.d -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -Os -fno-allow-store-data-races -fno-reorder-blocks -fno-ipa-cp-clone -fno-partial-inlining -Wframe-larger-than=1024 -fno-stack-protector -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-dangling-pointer -ftrivial-auto-var-init=zero -fno-stack-clash-protection -fzero-call-used-regs=used-gpr -pg -fno-inline-functions-called-once -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -Wextra -Wunused -Wno-unused-parameter -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wmissing-include-dirs -Wunused-but-set-variable -Wunused-const-variable -Wpacked-not-aligned -Wstringop-truncation -Wno-missing-field-initializers -Wno-sign-compare -Wno-type-limits -Wno-shift-negative-value -gsplit-dwarf -g -gdwarf-4 -fno-var-tracking -femit-struct-debug-baseonly -gz=zlib -I drivers/media/i2c -I ./drivers/media/i2c -DKBUILD_MODFILE='"drivers/media/i2c/mt9v032"' -DKBUILD_BASENAME='"mt9v032"' -DKBUILD_MODNAME='"mt9v032"' -D__KBUILD_MODNAME=kmod_mt9v032 drivers/media/i2c/mt9v032.c
--
>> drivers/media/i2c/mt9p031.c:604:17: sparse: sparse: bad integer constant expression
drivers/media/i2c/mt9p031.c:604:17: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(__builtin_choose_expr((sizeof(int) == sizeof(*(8 ? ((void *)((long)(((unsigned int)(__crop->width / 7)) - ((unsigned int)(2))) * 0l)) : (int *)8))), (((unsigned int)(__crop->width / 7)) > ((unsigned int)(2)) ? ((unsigned int)(__crop->width / 7)) : ((unsigned int)(2))), ({ typeof((unsigned int)(__crop->width / 7)) __UNIQUE_ID___x324 = ((unsigned int)(__crop->width / 7)); typeof((unsigned int)(2)) __UNIQUE_ID___y325 = ((unsigned int)(2)); _Static_assert(((((typeof((unsigned int)(__crop->width / 7)))(-1)) < (__attribute__((force)) typeof((unsigned int)(__crop->width / 7)))1) == (((typeof((unsigned int)(2)))(-1)) < (__attribute__((force)) typeof((unsigned int)(2)))1)), "max" "(" "(unsigned int)(__crop->width / 7)" ", " "(unsigned int)(2)" ") signedness error, fix types or consider " "max" "_unsigned() before " "max" "_t()"); ((__UNIQUE_ID___x324) > (__UNIQUE_ID___y325) ? (__UNIQUE_ID___x324) : (__UNIQUE_ID___y325)); }))) greater than high limit (unsigned int)(__crop->width)"
drivers/media/i2c/mt9p031.c:608:18: sparse: sparse: bad integer constant expression
drivers/media/i2c/mt9p031.c:608:18: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(__builtin_choose_expr((sizeof(int) == sizeof(*(8 ? ((void *)((long)(((unsigned int)(__crop->height / 8)) - ((unsigned int)(2))) * 0l)) : (int *)8))), (((unsigned int)(__crop->height / 8)) > ((unsigned int)(2)) ? ((unsigned int)(__crop->height / 8)) : ((unsigned int)(2))), ({ typeof((unsigned int)(__crop->height / 8)) __UNIQUE_ID___x329 = ((unsigned int)(__crop->height / 8)); typeof((unsigned int)(2)) __UNIQUE_ID___y330 = ((unsigned int)(2)); _Static_assert(((((typeof((unsigned int)(__crop->height / 8)))(-1)) < (__attribute__((force)) typeof((unsigned int)(__crop->height / 8)))1) == (((typeof((unsigned int)(2)))(-1)) < (__attribute__((force)) typeof((unsigned int)(2)))1)), "max" "(" "(unsigned int)(__crop->height / 8)" ", " "(unsigned int)(2)" ") signedness error, fix types or consider " "max" "_unsigned() before " "max" "_t()"); ((__UNIQUE_ID___x329) > (__UNIQUE_ID___y330) ? (__UNIQUE_ID___x329) : (__UNIQUE_ID___y330)); }))) greater than high limit (unsigned int)(__crop->height)"
/bin/bash: line 1: 62278 Segmentation fault sparse -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise -Wno-return-void -Wno-unknown-attribute -fdiagnostic-prefix -D__CHECK_ENDIAN__ --arch=microblaze -mlittle-endian -m32 -Wp,-MMD,drivers/media/i2c/.mt9p031.o.d -nostdinc -Iarch/microblaze/include -I./arch/microblaze/include/generated -Iinclude -I./include -Iarch/microblaze/include/uapi -I./arch/microblaze/include/generated/uapi -Iinclude/uapi -I./include/generated/uapi -include include/linux/compiler-version.h -include include/linux/kconfig.h -include include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map== -Wundef -DKBUILD_EXTRA_WARN1 -std=gnu11 -fshort-wchar -funsigned-char -fno-common -fno-PIE -fno-strict-aliasing -Wall -Wundef -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Werror=strict-prototypes -Wno-format-security -Wno-trigraphs -mlittle-endian -ffixed-r31 -mcpu=v7.10.d -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -Os -fno-allow-store-data-races -fno-reorder-blocks -fno-ipa-cp-clone -fno-partial-inlining -Wframe-larger-than=1024 -fno-stack-protector -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-dangling-pointer -ftrivial-auto-var-init=zero -fno-stack-clash-protection -fzero-call-used-regs=used-gpr -pg -fno-inline-functions-called-once -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -Wextra -Wunused -Wno-unused-parameter -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wmissing-include-dirs -Wunused-but-set-variable -Wunused-const-variable -Wpacked-not-aligned -Wstringop-truncation -Wno-missing-field-initializers -Wno-sign-compare -Wno-type-limits -Wno-shift-negative-value -gsplit-dwarf -g -gdwarf-4 -fno-var-tracking -femit-struct-debug-baseonly -gz=zlib -I drivers/media/i2c -I ./drivers/media/i2c -DKBUILD_MODFILE='"drivers/media/i2c/mt9p031"' -DKBUILD_BASENAME='"mt9p031"' -DKBUILD_MODNAME='"mt9p031"' -D__KBUILD_MODNAME=kmod_mt9p031 drivers/media/i2c/mt9p031.c
--
>> drivers/media/i2c/ov4689.c:638:19: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/ov4689.c:638:19: sparse: sparse: static assertion failed: "clamp() low limit range->physical_min greater than high limit range->physical_max"
--
>> drivers/media/i2c/ov5640.c:2770:15: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/ov5640.c:2770:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(( { typeof(fi->denominator) __x = fi->denominator; typeof(fi->numerator) __d = fi->numerator; (((typeof(fi->denominator))-1) > 0 || ((typeof(fi->numerator))-1) > 0 || (((__x) > 0) == ((__d) > 0))) ? (((__x) + ((__d) / 2)) / (__d)) : (((__x) - ((__d) / 2)) / (__d)); } )))(minfps) greater than high limit (typeof(( { typeof(fi->denominator) __x = fi->denominator; typeof(fi->numerator) __d = fi->numerator; (((typeof(fi->denominator))-1) > 0 || ((typeof(fi->numerator))-1) > 0 || (((__x) > 0) == ((__d) > 0))) ? (((__x) + ((__d) / 2)) / (__d)) : (((__x) - ((__d) / 2)) / (__d)); } )))(maxfps)"
drivers/media/i2c/ov5640.c:2934:24: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/ov5640.c:2934:24: sparse: sparse: static assertion failed: "clamp() low limit (s32)(sensor->ctrls.exposure->minimum) greater than high limit (s32)(exposure_max)"
/bin/bash: line 1: 64522 Segmentation fault sparse -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise -Wno-return-void -Wno-unknown-attribute -fdiagnostic-prefix -D__CHECK_ENDIAN__ --arch=microblaze -mlittle-endian -m32 -Wp,-MMD,drivers/media/i2c/.ov5640.o.d -nostdinc -Iarch/microblaze/include -I./arch/microblaze/include/generated -Iinclude -I./include -Iarch/microblaze/include/uapi -I./arch/microblaze/include/generated/uapi -Iinclude/uapi -I./include/generated/uapi -include include/linux/compiler-version.h -include include/linux/kconfig.h -include include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map== -Wundef -DKBUILD_EXTRA_WARN1 -std=gnu11 -fshort-wchar -funsigned-char -fno-common -fno-PIE -fno-strict-aliasing -Wall -Wundef -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Werror=strict-prototypes -Wno-format-security -Wno-trigraphs -mlittle-endian -ffixed-r31 -mcpu=v7.10.d -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -Os -fno-allow-store-data-races -fno-reorder-blocks -fno-ipa-cp-clone -fno-partial-inlining -Wframe-larger-than=1024 -fno-stack-protector -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-dangling-pointer -ftrivial-auto-var-init=zero -fno-stack-clash-protection -fzero-call-used-regs=used-gpr -pg -fno-inline-functions-called-once -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -Wextra -Wunused -Wno-unused-parameter -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wmissing-include-dirs -Wunused-but-set-variable -Wunused-const-variable -Wpacked-not-aligned -Wstringop-truncation -Wno-missing-field-initializers -Wno-sign-compare -Wno-type-limits -Wno-shift-negative-value -gsplit-dwarf -g -gdwarf-4 -fno-var-tracking -femit-struct-debug-baseonly -gz=zlib -I drivers/media/i2c -I ./drivers/media/i2c -DKBUILD_MODFILE='"drivers/media/i2c/ov5640"' -DKBUILD_BASENAME='"ov5640"' -DKBUILD_MODNAME='"ov5640"' -D__KBUILD_MODNAME=kmod_ov5640 drivers/media/i2c/ov5640.c
--
>> drivers/media/i2c/ov5693.c:963:17: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/ov5693.c:963:17: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(2) greater than high limit (unsigned int)(crop->width)"
drivers/media/i2c/ov5693.c:965:18: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/ov5693.c:965:18: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(2) greater than high limit (unsigned int)(crop->height)"
--
>> drivers/media/radio/radio-tea5777.c:178:16: sparse: sparse: bad integer constant expression
>> drivers/media/radio/radio-tea5777.c:178:16: sparse: sparse: static assertion failed: "clamp() low limit bands[tea->band].rangelow greater than high limit bands[tea->band].rangehigh"
drivers/media/radio/radio-tea5777.c:398:37: sparse: sparse: bad integer constant expression
>> drivers/media/radio/radio-tea5777.c:398:37: sparse: sparse: static assertion failed: "clamp() low limit rangelow greater than high limit rangehigh"
--
>> drivers/media/radio/radio-si476x.c:699:16: sparse: sparse: bad integer constant expression
>> drivers/media/radio/radio-si476x.c:699:16: sparse: sparse: static assertion failed: "clamp() low limit si476x_bands[band].rangelow greater than high limit si476x_bands[band].rangehigh"
--
>> drivers/media/radio/tea575x.c:170:16: sparse: sparse: bad integer constant expression
>> drivers/media/radio/tea575x.c:170:16: sparse: sparse: static assertion failed: "clamp() low limit bands[tea->band].rangelow greater than high limit bands[tea->band].rangehigh"
drivers/media/radio/tea575x.c:350:21: sparse: sparse: bad integer constant expression
>> drivers/media/radio/tea575x.c:350:21: sparse: sparse: static assertion failed: "clamp() low limit (u32)(bands[tea->band].rangelow) greater than high limit (u32)(bands[tea->band].rangehigh)"
drivers/media/radio/tea575x.c:384:37: sparse: sparse: bad integer constant expression
>> drivers/media/radio/tea575x.c:384:37: sparse: sparse: static assertion failed: "clamp() low limit bands[i].rangelow greater than high limit bands[i].rangehigh"
--
>> drivers/media/radio/radio-ma901.c:252:43: sparse: sparse: bad integer constant expression
>> drivers/media/radio/radio-ma901.c:252:43: sparse: sparse: static assertion failed: "clamp() low limit (unsigned)(87.5 * 16000) greater than high limit (unsigned)(108.0 * 16000)"
--
>> drivers/media/radio/radio-mr800.c:198:16: sparse: sparse: bad integer constant expression
>> drivers/media/radio/radio-mr800.c:198:16: sparse: sparse: static assertion failed: "clamp() low limit (unsigned)(87.5 * 16000) greater than high limit (unsigned)(108.0 * 16000)"
--
>> drivers/media/radio/radio-raremono.c:256:16: sparse: sparse: bad integer constant expression
>> drivers/media/radio/radio-raremono.c:256:16: sparse: sparse: static assertion failed: "clamp() low limit (u32)(bands[band].rangelow) greater than high limit (u32)(bands[band].rangehigh)"
--
>> drivers/usb/host/xhci-mem.c:1231:20: sparse: sparse: bad integer constant expression
>> drivers/usb/host/xhci-mem.c:1231:20: sparse: sparse: static assertion failed: "clamp() low limit (typeof(interval))(min_exponent) greater than high limit (typeof(interval))(max_exponent)"
--
>> drivers/iio/magnetometer/ak8975.c:745:16: sparse: sparse: bad integer constant expression
>> drivers/iio/magnetometer/ak8975.c:745:16: sparse: sparse: static assertion failed: "clamp() low limit (s16)(-def->range) greater than high limit (s16)(def->range)"
drivers/iio/magnetometer/ak8975.c:855:34: sparse: sparse: bad integer constant expression
drivers/iio/magnetometer/ak8975.c:855:34: sparse: sparse: static assertion failed: "clamp() low limit (s16)(-def->range) greater than high limit (s16)(def->range)"
drivers/iio/magnetometer/ak8975.c:856:34: sparse: sparse: bad integer constant expression
drivers/iio/magnetometer/ak8975.c:856:34: sparse: sparse: static assertion failed: "clamp() low limit (s16)(-def->range) greater than high limit (s16)(def->range)"
drivers/iio/magnetometer/ak8975.c:857:34: sparse: sparse: bad integer constant expression
drivers/iio/magnetometer/ak8975.c:857:34: sparse: sparse: static assertion failed: "clamp() low limit (s16)(-def->range) greater than high limit (s16)(def->range)"
--
>> drivers/power/supply/cpcap-battery.c:730:31: sparse: sparse: bad integer constant expression
>> drivers/power/supply/cpcap-battery.c:730:31: sparse: sparse: static assertion failed: "clamp() low limit 0 greater than high limit ddata->charge_full"
--
>> drivers/power/supply/max77976_charger.c:259:16: sparse: sparse: bad integer constant expression
>> drivers/power/supply/max77976_charger.c:259:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(regval * mult))(clamp_min) greater than high limit (typeof(regval * mult))(clamp_max)"
drivers/power/supply/max77976_charger.c:270:18: sparse: sparse: bad integer constant expression
>> drivers/power/supply/max77976_charger.c:270:18: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(clamp_min) greater than high limit (typeof(val))(clamp_max)"
--
>> drivers/power/supply/bq256xx_charger.c:525:16: sparse: sparse: bad integer constant expression
>> drivers/power/supply/bq256xx_charger.c:525:16: sparse: sparse: static assertion failed: "clamp() low limit 0 greater than high limit ichg_max"
drivers/power/supply/bq256xx_charger.c:538:16: sparse: sparse: bad integer constant expression
drivers/power/supply/bq256xx_charger.c:538:16: sparse: sparse: static assertion failed: "clamp() low limit 0 greater than high limit ichg_max"
drivers/power/supply/bq256xx_charger.c:638:19: sparse: sparse: bad integer constant expression
>> drivers/power/supply/bq256xx_charger.c:638:19: sparse: sparse: static assertion failed: "clamp() low limit 3504000 greater than high limit vbatreg_max"
drivers/power/supply/bq256xx_charger.c:660:19: sparse: sparse: bad integer constant expression
drivers/power/supply/bq256xx_charger.c:660:19: sparse: sparse: static assertion failed: "clamp() low limit 3494000 greater than high limit vbatreg_max"
drivers/power/supply/bq256xx_charger.c:681:19: sparse: sparse: bad integer constant expression
drivers/power/supply/bq256xx_charger.c:681:19: sparse: sparse: static assertion failed: "clamp() low limit 3856000 greater than high limit vbatreg_max"
drivers/power/supply/bq256xx_charger.c:696:19: sparse: sparse: bad integer constant expression
drivers/power/supply/bq256xx_charger.c:696:19: sparse: sparse: static assertion failed: "clamp() low limit 3847000 greater than high limit vbatreg_max"
--
>> drivers/media/tuners/e4000.c:338:28: sparse: sparse: bad integer constant expression
>> drivers/media/tuners/e4000.c:338:28: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(bands[0].rangelow) greater than high limit (unsigned int)(bands[1].rangehigh)"
--
>> drivers/media/tuners/fc2580.c:431:28: sparse: sparse: bad integer constant expression
>> drivers/media/tuners/fc2580.c:431:28: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(bands[0].rangelow) greater than high limit (unsigned int)(bands[0].rangehigh)"
--
>> drivers/media/tuners/msi001.c:341:24: sparse: sparse: bad integer constant expression
>> drivers/media/tuners/msi001.c:341:24: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(bands[band].rangelow) greater than high limit (unsigned int)(bands[band].rangehigh)"
--
>> drivers/video/backlight/bd6107.c:159:28: sparse: sparse: bad integer constant expression
>> drivers/video/backlight/bd6107.c:159:28: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(0) greater than high limit (unsigned int)(props.max_brightness)"
--
>> drivers/media/v4l2-core/v4l2-common.c:100:13: sparse: sparse: bad integer constant expression
>> drivers/media/v4l2-core/v4l2-common.c:100:13: sparse: sparse: static assertion failed: "clamp() low limit (min + ~mask) & mask greater than high limit max & mask"
drivers/media/v4l2-core/v4l2-common.c:112:13: sparse: sparse: bad integer constant expression
>> drivers/media/v4l2-core/v4l2-common.c:112:13: sparse: sparse: static assertion failed: "clamp() low limit min greater than high limit max"
--
>> drivers/media/v4l2-core/v4l2-ctrls-core.c:1188:24: sparse: sparse: bad integer constant expression
>> drivers/media/v4l2-core/v4l2-ctrls-core.c:1188:24: sparse: sparse: static assertion failed: "clamp() low limit (typeof(ptr.p_s32[idx]))((ctrl)->minimum) greater than high limit (typeof(ptr.p_s32[idx]))((ctrl)->maximum)"
drivers/media/v4l2-core/v4l2-ctrls-core.c:1199:23: sparse: sparse: bad integer constant expression
>> drivers/media/v4l2-core/v4l2-ctrls-core.c:1199:23: sparse: sparse: static assertion failed: "clamp() low limit (s64)(ctrl->minimum) greater than high limit (s64)(ctrl->maximum)"
drivers/media/v4l2-core/v4l2-ctrls-core.c:1205:24: sparse: sparse: bad integer constant expression
>> drivers/media/v4l2-core/v4l2-ctrls-core.c:1205:24: sparse: sparse: static assertion failed: "clamp() low limit (typeof(ptr.p_u8[idx]))((ctrl)->minimum) greater than high limit (typeof(ptr.p_u8[idx]))((ctrl)->maximum)"
drivers/media/v4l2-core/v4l2-ctrls-core.c:1207:24: sparse: sparse: bad integer constant expression
>> drivers/media/v4l2-core/v4l2-ctrls-core.c:1207:24: sparse: sparse: static assertion failed: "clamp() low limit (typeof(ptr.p_u16[idx]))((ctrl)->minimum) greater than high limit (typeof(ptr.p_u16[idx]))((ctrl)->maximum)"
drivers/media/v4l2-core/v4l2-ctrls-core.c:1209:24: sparse: sparse: bad integer constant expression
>> drivers/media/v4l2-core/v4l2-ctrls-core.c:1209:24: sparse: sparse: static assertion failed: "clamp() low limit (typeof(ptr.p_u32[idx]))((ctrl)->minimum) greater than high limit (typeof(ptr.p_u32[idx]))((ctrl)->maximum)"
--
>> drivers/usb/gadget/function/u_audio.c:801:15: sparse: sparse: bad integer constant expression
>> drivers/usb/gadget/function/u_audio.c:801:15: sparse: sparse: static assertion failed: "clamp() low limit prm->volume_min greater than high limit prm->volume_max"
drivers/usb/gadget/function/u_audio.c:1041:18: sparse: sparse: bad integer constant expression
drivers/usb/gadget/function/u_audio.c:1041:18: sparse: sparse: static assertion failed: "clamp() low limit prm->volume_min greater than high limit prm->volume_max"
--
>> drivers/media/usb/msi2500/msi2500.c:1043:30: sparse: sparse: bad integer constant expression
>> drivers/media/usb/msi2500/msi2500.c:1043:30: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(bands[0].rangelow) greater than high limit (unsigned int)(bands[0].rangehigh)"
--
>> drivers/media/usb/stk1160/stk1160-v4l.c:385:17: sparse: sparse: bad integer constant expression
>> drivers/media/usb/stk1160/stk1160-v4l.c:385:17: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(base_width / 20) greater than high limit (unsigned int)(base_width)"
drivers/media/usb/stk1160/stk1160-v4l.c:387:18: sparse: sparse: bad integer constant expression
>> drivers/media/usb/stk1160/stk1160-v4l.c:387:18: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(base_height / 20) greater than high limit (unsigned int)(base_height)"
--
>> drivers/media/usb/uvc/uvc_driver.c:454:25: sparse: sparse: bad integer constant expression
>> drivers/media/usb/uvc/uvc_driver.c:454:25: sparse: sparse: static assertion failed: "clamp() low limit frame->dwFrameInterval[0] greater than high limit frame->dwFrameInterval[maxIntervalIndex]"
--
>> drivers/media/usb/uvc/uvc_ctrl.c:1922:40: sparse: sparse: bad integer constant expression
>> drivers/media/usb/uvc/uvc_ctrl.c:1922:40: sparse: sparse: static assertion failed: "clamp() low limit min greater than high limit max"
drivers/media/usb/uvc/uvc_ctrl.c:1924:40: sparse: sparse: bad integer constant expression
>> drivers/media/usb/uvc/uvc_ctrl.c:1924:40: sparse: sparse: static assertion failed: "clamp() low limit (u32)(min) greater than high limit (u32)(max)"
--
>> drivers/media/radio/si470x/radio-si470x-common.c:281:16: sparse: sparse: bad integer constant expression
>> drivers/media/radio/si470x/radio-si470x-common.c:281:16: sparse: sparse: static assertion failed: "clamp() low limit bands[radio->band].rangelow greater than high limit bands[radio->band].rangehigh"
--
>> drivers/media/i2c/ccs/ccs-core.c:1461:17: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/ccs/ccs-core.c:1461:17: sparse: sparse: static assertion failed: "clamp() low limit (u32)(1) greater than high limit (u32)(tmp)"
drivers/media/i2c/ccs/ccs-core.c:2247:17: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/ccs/ccs-core.c:2247:17: sparse: sparse: static assertion failed: "clamp() low limit ccs_get_limit(sensor, 79, 0) greater than high limit ccs_get_limit(sensor, 81, 0)"
drivers/media/i2c/ccs/ccs-core.c:2251:17: sparse: sparse: bad integer constant expression
drivers/media/i2c/ccs/ccs-core.c:2251:17: sparse: sparse: static assertion failed: "clamp() low limit ccs_get_limit(sensor, 80, 0) greater than high limit ccs_get_limit(sensor, 82, 0)"
drivers/media/i2c/ccs/ccs-core.c:2391:13: sparse: sparse: bad integer constant expression
drivers/media/i2c/ccs/ccs-core.c:2391:13: sparse: sparse: static assertion failed: "clamp() low limit ccs_get_limit(sensor, 123, 0) greater than high limit ccs_get_limit(sensor, 124, 0)"
drivers/media/i2c/ccs/ccs-core.c:2393:13: sparse: sparse: bad integer constant expression
drivers/media/i2c/ccs/ccs-core.c:2393:13: sparse: sparse: static assertion failed: "clamp() low limit ccs_get_limit(sensor, 123, 0) greater than high limit ccs_get_limit(sensor, 124, 0)"
drivers/media/i2c/ccs/ccs-core.c:2395:17: sparse: sparse: bad integer constant expression
drivers/media/i2c/ccs/ccs-core.c:2395:17: sparse: sparse: static assertion failed: "clamp() low limit ccs_get_limit(sensor, 123, 0) greater than high limit ccs_get_limit(sensor, 124, 0)"
--
>> drivers/media/i2c/cx25840/cx25840-core.c:1809:22: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/cx25840/cx25840-core.c:1809:22: sparse: sparse: static assertion failed: "clamp() low limit (h_src + 15) / 16 greater than high limit h_src"
drivers/media/i2c/cx25840/cx25840-core.c:1812:31: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/cx25840/cx25840-core.c:1812:31: sparse: sparse: static assertion failed: "clamp() low limit (u32)1 greater than high limit v_src - v_add"
drivers/media/i2c/cx25840/cx25840-core.c:1814:31: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/cx25840/cx25840-core.c:1814:31: sparse: sparse: static assertion failed: "clamp() low limit (v_src - v_add * 8 + 7) / 8 greater than high limit v_src - v_add"
--
>> drivers/leds/flash/leds-mt6360.c:606:18: sparse: sparse: bad integer constant expression
>> drivers/leds/flash/leds-mt6360.c:606:18: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(min) greater than high limit (typeof(val))(max)"
--
>> drivers/leds/flash/leds-mt6370-flash.c:428:18: sparse: sparse: bad integer constant expression
>> drivers/leds/flash/leds-mt6370-flash.c:428:18: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(min) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/arm/display/komeda/komeda_drv.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/arm/display/komeda/komeda_dev.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/arm/display/komeda/komeda_color_mgmt.c: note: in included file (through drivers/gpu/drm/arm/display/komeda/komeda_color_mgmt.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/arm/display/komeda/komeda_pipeline.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/arm/display/komeda/komeda_kms.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/arm/display/komeda/komeda_crtc.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/arm/display/komeda/komeda_plane.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/arm/display/komeda/komeda_event.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/arm/display/komeda/d71/d71_component.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/display/drm_dp_helper.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/display/drm_dp_mst_topology.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/virtio/virtgpu_drv.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/virtio/virtgpu_kms.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/virtio/virtgpu_gem.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/virtio/virtgpu_vram.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/virtio/virtgpu_display.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/virtio/virtgpu_fence.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/virtio/virtgpu_vq.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/virtio/virtgpu_debugfs.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/virtio/virtgpu_object.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/virtio/virtgpu_plane.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/virtio/virtgpu_ioctl.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/virtio/virtgpu_prime.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/virtio/virtgpu_trace_points.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/virtio/virtgpu_submit.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/i2c/ch7006_drv.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_encoder_slave.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/i2c/ch7006_mode.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_encoder_slave.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/panel/panel-lvds.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/panel/panel-ilitek-ili9341.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/panel/panel-innolux-p079zca.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/panel/panel-leadtek-ltk500hd1829.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/panel/panel-magnachip-d53e6ea8966.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_simple_kms_helper.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/panel/panel-newvision-nv3052c.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_simple_kms_helper.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/panel/panel-samsung-db7430.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_simple_kms_helper.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/panel/panel-raydium-rm67191.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_simple_kms_helper.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/panel/panel-samsung-s6d27a1.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_simple_kms_helper.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/panel/panel-tdo-tl070wsh30.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/panel/panel-novatek-nt36523.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/chrontel-ch7033.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/display-connector.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/lontium-lt9611.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/lontium-lt9611uxc.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/ite-it6505.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/lontium-lt9211.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/parade-ps8622.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/sil-sii8620.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/sii9234.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/simple-bridge.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/thc63lvd1024.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/tc358762.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/tc358764.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/tc358768.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/tc358767.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/tc358775.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/ti-tpd12s015.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/ti-sn65dsi83.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/ti-tfp410.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/nwl-dsi.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/ti-sn65dsi86.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/tiny/arcpgu.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/tiny/gm12u320.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/tiny/hx8357d.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/tiny/ili9341.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/tiny/mi0283qt.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/tiny/st7586.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/tiny/st7735r.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/tiny/repaper.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/solomon/ssd130x.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/solomon/ssd130x-spi.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, drivers/gpu/drm/solomon/ssd130x.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/analogix/anx7625.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/bridge/analogix_dp.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/bridge/analogix_dp.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
>> drivers/hwmon/pmbus/pmbus_core.c:969:20: sparse: sparse: too long token expansion
--
>> drivers/hwmon/pmbus/lm25066.c:394:46: sparse: sparse: bad integer constant expression
>> drivers/hwmon/pmbus/lm25066.c:394:46: sparse: sparse: static assertion failed: "clamp() low limit (typeof(word))(0) greater than high limit (typeof(word))(data->rlimit)"
drivers/hwmon/pmbus/lm25066.c:398:46: sparse: sparse: bad integer constant expression
drivers/hwmon/pmbus/lm25066.c:398:46: sparse: sparse: static assertion failed: "clamp() low limit (typeof(word))(0) greater than high limit (typeof(word))(data->rlimit)"
drivers/hwmon/pmbus/lm25066.c:404:46: sparse: sparse: bad integer constant expression
drivers/hwmon/pmbus/lm25066.c:404:46: sparse: sparse: static assertion failed: "clamp() low limit (typeof(word))(0) greater than high limit (typeof(word))(data->rlimit)"
drivers/hwmon/pmbus/lm25066.c:412:46: sparse: sparse: bad integer constant expression
drivers/hwmon/pmbus/lm25066.c:412:46: sparse: sparse: static assertion failed: "clamp() low limit (typeof(word))(0) greater than high limit (typeof(word))(data->rlimit)"
drivers/hwmon/pmbus/lm25066.c:419:46: sparse: sparse: bad integer constant expression
drivers/hwmon/pmbus/lm25066.c:419:46: sparse: sparse: static assertion failed: "clamp() low limit (typeof(word))(0) greater than high limit (typeof(word))(data->rlimit)"
--
drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic_helper.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/cadence/cdns-dsi-j721e.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-hdcp.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-j721e.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h):
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
>> include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
vim +2462 fs/inode.c
3cd886666ff19e Deepa Dinamani 2016-09-14 2447
50e17c000c467f Deepa Dinamani 2018-01-21 2448 /**
50e17c000c467f Deepa Dinamani 2018-01-21 2449 * timestamp_truncate - Truncate timespec to a granularity
50e17c000c467f Deepa Dinamani 2018-01-21 2450 * @t: Timespec
50e17c000c467f Deepa Dinamani 2018-01-21 2451 * @inode: inode being updated
50e17c000c467f Deepa Dinamani 2018-01-21 2452 *
50e17c000c467f Deepa Dinamani 2018-01-21 2453 * Truncate a timespec to the granularity supported by the fs
50e17c000c467f Deepa Dinamani 2018-01-21 2454 * containing the inode. Always rounds down. gran must
50e17c000c467f Deepa Dinamani 2018-01-21 2455 * not be 0 nor greater than a second (NSEC_PER_SEC, or 10^9 ns).
50e17c000c467f Deepa Dinamani 2018-01-21 2456 */
50e17c000c467f Deepa Dinamani 2018-01-21 2457 struct timespec64 timestamp_truncate(struct timespec64 t, struct inode *inode)
50e17c000c467f Deepa Dinamani 2018-01-21 2458 {
50e17c000c467f Deepa Dinamani 2018-01-21 2459 struct super_block *sb = inode->i_sb;
50e17c000c467f Deepa Dinamani 2018-01-21 2460 unsigned int gran = sb->s_time_gran;
50e17c000c467f Deepa Dinamani 2018-01-21 2461
50e17c000c467f Deepa Dinamani 2018-01-21 @2462 t.tv_sec = clamp(t.tv_sec, sb->s_time_min, sb->s_time_max);
50e17c000c467f Deepa Dinamani 2018-01-21 2463 if (unlikely(t.tv_sec == sb->s_time_max || t.tv_sec == sb->s_time_min))
50e17c000c467f Deepa Dinamani 2018-01-21 2464 t.tv_nsec = 0;
50e17c000c467f Deepa Dinamani 2018-01-21 2465
50e17c000c467f Deepa Dinamani 2018-01-21 2466 /* Avoid division in the common cases 1 ns and 1 s. */
50e17c000c467f Deepa Dinamani 2018-01-21 2467 if (gran == 1)
50e17c000c467f Deepa Dinamani 2018-01-21 2468 ; /* nothing */
50e17c000c467f Deepa Dinamani 2018-01-21 2469 else if (gran == NSEC_PER_SEC)
50e17c000c467f Deepa Dinamani 2018-01-21 2470 t.tv_nsec = 0;
50e17c000c467f Deepa Dinamani 2018-01-21 2471 else if (gran > 1 && gran < NSEC_PER_SEC)
50e17c000c467f Deepa Dinamani 2018-01-21 2472 t.tv_nsec -= t.tv_nsec % gran;
50e17c000c467f Deepa Dinamani 2018-01-21 2473 else
50e17c000c467f Deepa Dinamani 2018-01-21 2474 WARN(1, "invalid file time granularity: %u", gran);
50e17c000c467f Deepa Dinamani 2018-01-21 2475 return t;
50e17c000c467f Deepa Dinamani 2018-01-21 2476 }
50e17c000c467f Deepa Dinamani 2018-01-21 2477 EXPORT_SYMBOL(timestamp_truncate);
50e17c000c467f Deepa Dinamani 2018-01-21 2478
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
@ 2023-07-26 23:47 kernel test robot
0 siblings, 0 replies; 45+ messages in thread
From: kernel test robot @ 2023-07-26 23:47 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: drivers/pwm/pwm-lpss.c:143:21: sparse: sparse: bad integer constant expression"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
References: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
TO: David Laight <David.Laight@ACULAB.COM>
TO: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
TO: "'Andy Shevchenko'" <andriy.shevchenko@linux.intel.com>
TO: "'Andrew Morton'" <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: "'Matthew Wilcox (Oracle)'" <willy@infradead.org>
TO: "'Christoph Hellwig'" <hch@infradead.org>
TO: "'Jason A. Donenfeld'" <Jason@zx2c4.com>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master v6.5-rc3 next-20230726]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/a09512c8526b46759669d0b879144563%40AcuMS.aculab.com
patch subject: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
:::::: branch date: 35 hours ago
:::::: commit date: 35 hours ago
config: um-randconfig-r072-20230725 (https://download.01.org/0day-ci/archive/20230727/202307270701.pbyoBrgu-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230727/202307270701.pbyoBrgu-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202307270701.pbyoBrgu-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/pwm/pwm-lpss.c:143:21: sparse: sparse: bad integer constant expression
>> drivers/pwm/pwm-lpss.c:143:21: sparse: sparse: static assertion failed: "clamp() low limit (typeof(base_unit))(1) greater than high limit (typeof(base_unit))(base_unit_range - 1)"
--
>> drivers/media/i2c/mt9m111.c:474:21: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/mt9m111.c:474:21: sparse: sparse: static assertion failed: "clamp() low limit 26 greater than high limit 26 + 1280 - (__s32)rect.width"
drivers/media/i2c/mt9m111.c:477:20: sparse: sparse: bad integer constant expression
>> drivers/media/i2c/mt9m111.c:477:20: sparse: sparse: static assertion failed: "clamp() low limit 8 greater than high limit 8 + 1024 - (__s32)rect.height"
--
>> drivers/spi/spi-stm32.c:482:18: sparse: sparse: bad integer constant expression
>> drivers/spi/spi-stm32.c:482:18: sparse: sparse: static assertion failed: "clamp() low limit 1U greater than high limit spi->fifo_size / 2"
--
>> drivers/spi/spi-ep93xx.c:123:16: sparse: sparse: bad integer constant expression
>> drivers/spi/spi-ep93xx.c:123:16: sparse: sparse: static assertion failed: "clamp() low limit master->min_speed_hz greater than high limit master->max_speed_hz"
--
>> drivers/spi/spi-bcm-qspi.c:687:16: sparse: sparse: bad integer constant expression
>> drivers/spi/spi-bcm-qspi.c:687:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(spbr))(bcm_qspi_spbr_min(qspi)) greater than high limit (typeof(spbr))(255U)"
--
>> drivers/thermal/gov_step_wise.c:48:39: sparse: sparse: bad integer constant expression
>> drivers/thermal/gov_step_wise.c:48:39: sparse: sparse: static assertion failed: "clamp() low limit instance->lower greater than high limit instance->upper"
drivers/thermal/gov_step_wise.c:58:39: sparse: sparse: bad integer constant expression
drivers/thermal/gov_step_wise.c:58:39: sparse: sparse: static assertion failed: "clamp() low limit instance->lower greater than high limit instance->upper"
drivers/thermal/gov_step_wise.c:64:47: sparse: sparse: bad integer constant expression
drivers/thermal/gov_step_wise.c:64:47: sparse: sparse: static assertion failed: "clamp() low limit instance->lower greater than high limit instance->upper"
--
>> drivers/i2c/busses/i2c-omap.c:619:27: sparse: sparse: bad integer constant expression
>> drivers/i2c/busses/i2c-omap.c:619:27: sparse: sparse: static assertion failed: "clamp() low limit (u8) 1 greater than high limit omap->fifo_size"
--
>> drivers/mtd/nand/raw/mtk_nand.c:1031:13: sparse: sparse: bad integer constant expression
>> drivers/mtd/nand/raw/mtk_nand.c:1031:13: sparse: sparse: static assertion failed: "clamp() low limit start greater than high limit end"
--
>> drivers/thermal/tegra/soctherm.c:451:16: sparse: sparse: bad integer constant expression
>> drivers/thermal/tegra/soctherm.c:451:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(trip_temp))(min_low_temp) greater than high limit (typeof(trip_temp))(max_high_temp)"
vim +143 drivers/pwm/pwm-lpss.c
37670676a122a3 Mika Westerberg 2015-11-18 123
b14e8ceff03404 Andy Shevchenko 2017-01-28 124 static void pwm_lpss_prepare(struct pwm_lpss_chip *lpwm, struct pwm_device *pwm,
d16a5aa9e82163 Mika Westerberg 2014-03-20 125 int duty_ns, int period_ns)
d16a5aa9e82163 Mika Westerberg 2014-03-20 126 {
ab248b603960a4 Mika Westerberg 2016-06-10 127 unsigned long long on_time_div;
d9cd4a73693bc7 Andy Shevchenko 2016-07-04 128 unsigned long c = lpwm->info->clk_rate, base_unit_range;
883e4d070fe125 qipeng.zha 2015-11-17 129 unsigned long long base_unit, freq = NSEC_PER_SEC;
d6d54bacb1dd02 Hans de Goede 2020-09-03 130 u32 ctrl;
d16a5aa9e82163 Mika Westerberg 2014-03-20 131
d16a5aa9e82163 Mika Westerberg 2014-03-20 132 do_div(freq, period_ns);
d16a5aa9e82163 Mika Westerberg 2014-03-20 133
883e4d070fe125 qipeng.zha 2015-11-17 134 /*
883e4d070fe125 qipeng.zha 2015-11-17 135 * The equation is:
e5ca42458b6278 Dan O'Donovan 2016-06-01 136 * base_unit = round(base_unit_range * freq / c)
883e4d070fe125 qipeng.zha 2015-11-17 137 */
181f4d2f44463f Hans de Goede 2020-09-03 138 base_unit_range = BIT(lpwm->info->base_unit_bits);
e5ca42458b6278 Dan O'Donovan 2016-06-01 139 freq *= base_unit_range;
d16a5aa9e82163 Mika Westerberg 2014-03-20 140
e5ca42458b6278 Dan O'Donovan 2016-06-01 141 base_unit = DIV_ROUND_CLOSEST_ULL(freq, c);
ef9f60daab3095 Hans de Goede 2020-09-03 142 /* base_unit must not be 0 and we also want to avoid overflowing it */
ef9f60daab3095 Hans de Goede 2020-09-03 @143 base_unit = clamp_val(base_unit, 1, base_unit_range - 1);
d16a5aa9e82163 Mika Westerberg 2014-03-20 144
ab248b603960a4 Mika Westerberg 2016-06-10 145 on_time_div = 255ULL * duty_ns;
ab248b603960a4 Mika Westerberg 2016-06-10 146 do_div(on_time_div, period_ns);
ab248b603960a4 Mika Westerberg 2016-06-10 147 on_time_div = 255ULL - on_time_div;
d16a5aa9e82163 Mika Westerberg 2014-03-20 148
d6d54bacb1dd02 Hans de Goede 2020-09-03 149 ctrl = pwm_lpss_read(pwm);
883e4d070fe125 qipeng.zha 2015-11-17 150 ctrl &= ~PWM_ON_TIME_DIV_MASK;
181f4d2f44463f Hans de Goede 2020-09-03 151 ctrl &= ~((base_unit_range - 1) << PWM_BASE_UNIT_SHIFT);
883e4d070fe125 qipeng.zha 2015-11-17 152 ctrl |= (u32) base_unit << PWM_BASE_UNIT_SHIFT;
d16a5aa9e82163 Mika Westerberg 2014-03-20 153 ctrl |= on_time_div;
2153bbc12f77fb Hans de Goede 2018-10-14 154
4e11f5acb25b0b Mika Westerberg 2015-10-20 155 pwm_lpss_write(pwm, ctrl);
2153bbc12f77fb Hans de Goede 2018-10-14 156 pwm_lpss_write(pwm, ctrl | PWM_SW_UPDATE);
2153bbc12f77fb Hans de Goede 2018-10-14 157 }
d16a5aa9e82163 Mika Westerberg 2014-03-20 158
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
@ 2023-07-26 21:10 kernel test robot
0 siblings, 0 replies; 45+ messages in thread
From: kernel test robot @ 2023-07-26 21:10 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: arch/x86/mm/init.c:590:29: sparse: sparse: bad integer constant expression"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
References: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
TO: David Laight <David.Laight@ACULAB.COM>
TO: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
TO: "'Andy Shevchenko'" <andriy.shevchenko@linux.intel.com>
TO: "'Andrew Morton'" <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: "'Matthew Wilcox (Oracle)'" <willy@infradead.org>
TO: "'Christoph Hellwig'" <hch@infradead.org>
TO: "'Jason A. Donenfeld'" <Jason@zx2c4.com>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master crng-random/master v6.5-rc3 next-20230726]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/a09512c8526b46759669d0b879144563%40AcuMS.aculab.com
patch subject: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
:::::: branch date: 32 hours ago
:::::: commit date: 32 hours ago
config: x86_64-randconfig-r071-20230725 (https://download.01.org/0day-ci/archive/20230727/202307270518.CdmV7NKr-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230727/202307270518.CdmV7NKr-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202307270518.CdmV7NKr-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> arch/x86/mm/init.c:590:29: sparse: sparse: bad integer constant expression
>> arch/x86/mm/init.c:590:29: sparse: sparse: static assertion failed: "clamp() low limit (typeof(((phys_addr_t)(start_pfn) << 12)))(r_start) greater than high limit (typeof(((phys_addr_t)(start_pfn) << 12)))(r_end)"
arch/x86/mm/init.c:591:27: sparse: sparse: bad integer constant expression
>> arch/x86/mm/init.c:591:27: sparse: sparse: static assertion failed: "clamp() low limit (typeof(((phys_addr_t)(end_pfn) << 12)))(r_start) greater than high limit (typeof(((phys_addr_t)(end_pfn) << 12)))(r_end)"
--
drivers/cpufreq/cpufreq_powersave.c: note: in included file:
>> include/linux/cpufreq.h:866:23: sparse: sparse: bad integer constant expression
>> include/linux/cpufreq.h:866:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:934:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:934:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:1019:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:1019:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
--
drivers/cpufreq/cpufreq_performance.c: note: in included file:
>> include/linux/cpufreq.h:866:23: sparse: sparse: bad integer constant expression
>> include/linux/cpufreq.h:866:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:934:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:934:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:1019:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:1019:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
--
drivers/cpufreq/cpufreq_userspace.c: note: in included file:
>> include/linux/cpufreq.h:866:23: sparse: sparse: bad integer constant expression
>> include/linux/cpufreq.h:866:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:934:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:934:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:1019:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:1019:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
--
drivers/cpufreq/freq_table.c: note: in included file:
>> include/linux/cpufreq.h:866:23: sparse: sparse: bad integer constant expression
>> include/linux/cpufreq.h:866:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:934:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:934:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:1019:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:1019:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
--
drivers/cpufreq/cpufreq.c: note: in included file:
>> include/linux/cpufreq.h:866:23: sparse: sparse: bad integer constant expression
>> include/linux/cpufreq.h:866:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:934:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:934:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:1019:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:1019:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
>> drivers/cpufreq/cpufreq.c:538:23: sparse: sparse: bad integer constant expression
>> drivers/cpufreq/cpufreq.c:538:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
drivers/cpufreq/cpufreq.c:2126:23: sparse: sparse: bad integer constant expression
drivers/cpufreq/cpufreq.c:2126:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
--
drivers/cpufreq/cpufreq_ondemand.c: note: in included file (through drivers/cpufreq/cpufreq_governor.h, drivers/cpufreq/cpufreq_ondemand.h):
>> include/linux/cpufreq.h:866:23: sparse: sparse: bad integer constant expression
>> include/linux/cpufreq.h:866:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:934:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:934:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:1019:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:1019:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
--
drivers/cpufreq/cpufreq_governor.c: note: in included file (through drivers/cpufreq/cpufreq_governor.h):
>> include/linux/cpufreq.h:866:23: sparse: sparse: bad integer constant expression
>> include/linux/cpufreq.h:866:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:934:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:934:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:1019:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:1019:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
--
drivers/cpufreq/cpufreq_governor_attr_set.c: note: in included file (through drivers/cpufreq/cpufreq_governor.h):
>> include/linux/cpufreq.h:866:23: sparse: sparse: bad integer constant expression
>> include/linux/cpufreq.h:866:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:934:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:934:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:1019:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:1019:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
--
drivers/cpufreq/cpufreq-dt.c: note: in included file:
>> include/linux/cpufreq.h:866:23: sparse: sparse: bad integer constant expression
>> include/linux/cpufreq.h:866:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:934:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:934:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:1019:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:1019:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
--
drivers/cpufreq/speedstep-lib.c: note: in included file:
>> include/linux/cpufreq.h:866:23: sparse: sparse: bad integer constant expression
>> include/linux/cpufreq.h:866:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:934:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:934:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:1019:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:1019:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
--
drivers/cpufreq/p4-clockmod.c: note: in included file:
>> include/linux/cpufreq.h:866:23: sparse: sparse: bad integer constant expression
>> include/linux/cpufreq.h:866:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:934:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:934:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:1019:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:1019:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
--
>> drivers/firmware/sysfb_simplefb.c:60:34: sparse: sparse: too long token expansion
>> drivers/firmware/sysfb_simplefb.c:60:34: sparse: sparse: too long token expansion
--
fs/ntfs3/fsntfs.c:2679:1: sparse: sparse: no newline at end of file
>> fs/ntfs3/fsntfs.c:419:17: sparse: sparse: bad integer constant expression
>> fs/ntfs3/fsntfs.c:419:17: sparse: sparse: static assertion failed: "clamp() low limit (typeof(len))(zlen2) greater than high limit (typeof(len))(zlen)"
--
>> drivers/powercap/dtpm.c:277:23: sparse: sparse: bad integer constant expression
>> drivers/powercap/dtpm.c:277:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(power_limit))(dtpm->power_min) greater than high limit (typeof(power_limit))(dtpm->power_max)"
--
>> drivers/spi/spi-dw-core.c:682:20: sparse: sparse: bad integer constant expression
>> drivers/spi/spi-dw-core.c:682:20: sparse: sparse: static assertion failed: "clamp() low limit 0U greater than high limit dws->max_mem_freq"
--
arch/x86/kernel/cpu/aperfmperf.c: note: in included file:
>> include/linux/cpufreq.h:866:23: sparse: sparse: bad integer constant expression
>> include/linux/cpufreq.h:866:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:934:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:934:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:1019:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:1019:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
--
arch/x86/kernel/cpu/proc.c: note: in included file:
>> include/linux/cpufreq.h:866:23: sparse: sparse: bad integer constant expression
>> include/linux/cpufreq.h:866:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:934:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:934:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:1019:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:1019:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
--
drivers/base/power/qos.c: note: in included file (through include/trace/events/power.h):
>> include/linux/cpufreq.h:866:23: sparse: sparse: bad integer constant expression
>> include/linux/cpufreq.h:866:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:934:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:934:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:1019:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:1019:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
--
drivers/base/power/wakeup.c: note: in included file (through include/trace/events/power.h):
>> include/linux/cpufreq.h:866:23: sparse: sparse: bad integer constant expression
>> include/linux/cpufreq.h:866:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:934:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:934:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:1019:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:1019:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
--
drivers/base/power/main.c: note: in included file (through include/trace/events/power.h):
>> include/linux/cpufreq.h:866:23: sparse: sparse: bad integer constant expression
>> include/linux/cpufreq.h:866:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:934:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:934:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:1019:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:1019:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
--
>> drivers/leds/flash/leds-max77693.c:700:14: sparse: sparse: bad integer constant expression
>> drivers/leds/flash/leds-max77693.c:700:14: sparse: sparse: static assertion failed: "clamp() low limit (typeof(*v))(min) greater than high limit (typeof(*v))(max)"
--
kernel/sched/fair.c: note: in included file (through kernel/sched/sched.h):
>> include/linux/cpufreq.h:866:23: sparse: sparse: bad integer constant expression
>> include/linux/cpufreq.h:866:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:934:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:934:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:1019:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:1019:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
kernel/sched/fair.c:3521:16: sparse: sparse: bad integer constant expression
>> kernel/sched/fair.c:3521:16: sparse: sparse: static assertion failed: "clamp() low limit (long)((1UL << 1)) greater than high limit (long)(tg_shares)"
kernel/sched/fair.c:9226:20: sparse: sparse: bad integer constant expression
>> kernel/sched/fair.c:9226:20: sparse: sparse: static assertion failed: "clamp() low limit 1UL greater than high limit max_load_balance_interval"
kernel/sched/fair.c:11091:20: sparse: sparse: bad integer constant expression
kernel/sched/fair.c:11091:20: sparse: sparse: static assertion failed: "clamp() low limit 1UL greater than high limit max_load_balance_interval"
kernel/sched/fair.c:5566:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/fair.c:5566:22: sparse: struct task_struct [noderef] __rcu *
kernel/sched/fair.c:5566:22: sparse: struct task_struct *
kernel/sched/fair.c:9762:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/fair.c:9762:22: sparse: struct task_struct [noderef] __rcu *
kernel/sched/fair.c:9762:22: sparse: struct task_struct *
kernel/sched/fair.c: note: in included file:
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
kernel/sched/sched.h:2273:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2273:9: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2273:9: sparse: struct task_struct *
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
--
kernel/sched/core.c: note: in included file (through kernel/sched/sched.h):
>> include/linux/cpufreq.h:866:23: sparse: sparse: bad integer constant expression
>> include/linux/cpufreq.h:866:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:934:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:934:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:1019:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:1019:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
kernel/sched/core.c:264:56: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/core.c:264:56: sparse: struct task_struct [noderef] __rcu *
kernel/sched/core.c:264:56: sparse: struct task_struct *
kernel/sched/core.c:6285:32: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/core.c:6285:32: sparse: struct task_struct [noderef] __rcu *
kernel/sched/core.c:6285:32: sparse: struct task_struct *
kernel/sched/core.c:6316:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/core.c:6316:23: sparse: struct task_struct [noderef] __rcu *
kernel/sched/core.c:6316:23: sparse: struct task_struct *
kernel/sched/core.c:6324:46: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/core.c:6324:46: sparse: struct task_struct *
kernel/sched/core.c:6324:46: sparse: struct task_struct [noderef] __rcu *
kernel/sched/core.c:7128:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/core.c:7128:17: sparse: struct task_struct *
kernel/sched/core.c:7128:17: sparse: struct task_struct [noderef] __rcu *
kernel/sched/core.c:7344:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/core.c:7344:22: sparse: struct task_struct [noderef] __rcu *
kernel/sched/core.c:7344:22: sparse: struct task_struct *
kernel/sched/core.c: note: in included file:
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
kernel/sched/sched.h:2273:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2273:9: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2273:9: sparse: struct task_struct *
kernel/sched/core.c:2178:38: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/core.c:2178:38: sparse: struct task_struct [noderef] __rcu *
kernel/sched/core.c:2178:38: sparse: struct task_struct const *
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
kernel/sched/sched.h:2273:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2273:9: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2273:9: sparse: struct task_struct *
kernel/sched/sched.h:2273:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2273:9: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2273:9: sparse: struct task_struct *
kernel/sched/sched.h:2273:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2273:9: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2273:9: sparse: struct task_struct *
kernel/sched/sched.h:2273:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2273:9: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2273:9: sparse: struct task_struct *
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
kernel/sched/sched.h:2273:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2273:9: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2273:9: sparse: struct task_struct *
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
kernel/sched/sched.h:2273:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2273:9: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2273:9: sparse: struct task_struct *
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
kernel/sched/sched.h:2273:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2273:9: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2273:9: sparse: struct task_struct *
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
kernel/sched/sched.h:2273:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2273:9: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2273:9: sparse: struct task_struct *
--
kernel/sched/build_policy.c: note: in included file (through kernel/sched/sched.h):
>> include/linux/cpufreq.h:866:23: sparse: sparse: bad integer constant expression
>> include/linux/cpufreq.h:866:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:934:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:934:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:1019:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:1019:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
kernel/sched/build_policy.c: note: in included file:
kernel/sched/rt.c:961:70: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/rt.c:961:70: sparse: struct task_struct [noderef] __rcu *
kernel/sched/rt.c:961:70: sparse: struct task_struct *
kernel/sched/rt.c:2418:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/rt.c:2418:25: sparse: struct task_struct *
kernel/sched/rt.c:2418:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/rt.c:2121:13: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/rt.c:2121:13: sparse: struct task_struct *
kernel/sched/rt.c:2121:13: sparse: struct task_struct [noderef] __rcu *
kernel/sched/build_policy.c: note: in included file:
kernel/sched/deadline.c:2317:13: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/deadline.c:2317:13: sparse: struct task_struct *
kernel/sched/deadline.c:2317:13: sparse: struct task_struct [noderef] __rcu *
kernel/sched/deadline.c:2425:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/deadline.c:2425:25: sparse: struct task_struct *
kernel/sched/deadline.c:2425:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/deadline.c:2649:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/deadline.c:2649:22: sparse: struct task_struct [noderef] __rcu *
kernel/sched/deadline.c:2649:22: sparse: struct task_struct *
kernel/sched/build_policy.c: note: in included file:
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
--
kernel/sched/build_utility.c: note: in included file:
>> include/linux/cpufreq.h:866:23: sparse: sparse: bad integer constant expression
>> include/linux/cpufreq.h:866:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:934:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:934:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:1019:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:1019:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
kernel/sched/build_utility.c: note: in included file:
kernel/sched/core_sched.c:276:37: sparse: sparse: incompatible types in conditional expression (different address spaces):
kernel/sched/core_sched.c:276:37: sparse: struct task_struct *
kernel/sched/core_sched.c:276:37: sparse: struct task_struct [noderef] __rcu *
kernel/sched/build_utility.c: note: in included file:
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
vim +590 arch/x86/mm/init.c
c14fa0b63b5b42 Yinghai Lu 2012-11-16 567
66520ebc2df3fe Jacob Shin 2012-11-16 568 /*
cf8b166d5c1c89 Zhang Yanfei 2013-05-09 569 * We need to iterate through the E820 memory map and create direct mappings
09821ff1d50a1e Ingo Molnar 2017-01-28 570 * for only E820_TYPE_RAM and E820_KERN_RESERVED regions. We cannot simply
cf8b166d5c1c89 Zhang Yanfei 2013-05-09 571 * create direct mappings for all pfns from [0 to max_low_pfn) and
cf8b166d5c1c89 Zhang Yanfei 2013-05-09 572 * [4GB to max_pfn) because of possible memory holes in high addresses
cf8b166d5c1c89 Zhang Yanfei 2013-05-09 573 * that cannot be marked as UC by fixed/variable range MTRRs.
cf8b166d5c1c89 Zhang Yanfei 2013-05-09 574 * Depending on the alignment of E820 ranges, this may possibly result
cf8b166d5c1c89 Zhang Yanfei 2013-05-09 575 * in using smaller size (i.e. 4K instead of 2M or 1G) page tables.
cf8b166d5c1c89 Zhang Yanfei 2013-05-09 576 *
cf8b166d5c1c89 Zhang Yanfei 2013-05-09 577 * init_mem_mapping() calls init_range_memory_mapping() with big range.
cf8b166d5c1c89 Zhang Yanfei 2013-05-09 578 * That range would have hole in the middle or ends, and only ram parts
cf8b166d5c1c89 Zhang Yanfei 2013-05-09 579 * will be mapped in init_range_memory_mapping().
66520ebc2df3fe Jacob Shin 2012-11-16 580 */
8d57470d8f8596 Yinghai Lu 2012-11-16 581 static unsigned long __init init_range_memory_mapping(
b8fd39c036ab98 Yinghai Lu 2012-11-16 582 unsigned long r_start,
b8fd39c036ab98 Yinghai Lu 2012-11-16 583 unsigned long r_end)
66520ebc2df3fe Jacob Shin 2012-11-16 584 {
66520ebc2df3fe Jacob Shin 2012-11-16 585 unsigned long start_pfn, end_pfn;
8d57470d8f8596 Yinghai Lu 2012-11-16 586 unsigned long mapped_ram_size = 0;
66520ebc2df3fe Jacob Shin 2012-11-16 587 int i;
66520ebc2df3fe Jacob Shin 2012-11-16 588
66520ebc2df3fe Jacob Shin 2012-11-16 589 for_each_mem_pfn_range(i, MAX_NUMNODES, &start_pfn, &end_pfn, NULL) {
b8fd39c036ab98 Yinghai Lu 2012-11-16 @590 u64 start = clamp_val(PFN_PHYS(start_pfn), r_start, r_end);
b8fd39c036ab98 Yinghai Lu 2012-11-16 @591 u64 end = clamp_val(PFN_PHYS(end_pfn), r_start, r_end);
b8fd39c036ab98 Yinghai Lu 2012-11-16 592 if (start >= end)
66520ebc2df3fe Jacob Shin 2012-11-16 593 continue;
66520ebc2df3fe Jacob Shin 2012-11-16 594
c9b3234a6abada Yinghai Lu 2013-01-24 595 /*
c9b3234a6abada Yinghai Lu 2013-01-24 596 * if it is overlapping with brk pgt, we need to
c9b3234a6abada Yinghai Lu 2013-01-24 597 * alloc pgt buf from memblock instead.
c9b3234a6abada Yinghai Lu 2013-01-24 598 */
c9b3234a6abada Yinghai Lu 2013-01-24 599 can_use_brk_pgt = max(start, (u64)pgt_buf_end<<PAGE_SHIFT) >=
c9b3234a6abada Yinghai Lu 2013-01-24 600 min(end, (u64)pgt_buf_top<<PAGE_SHIFT);
c164fbb40c43f8 Logan Gunthorpe 2020-04-10 601 init_memory_mapping(start, end, PAGE_KERNEL);
8d57470d8f8596 Yinghai Lu 2012-11-16 602 mapped_ram_size += end - start;
c9b3234a6abada Yinghai Lu 2013-01-24 603 can_use_brk_pgt = true;
66520ebc2df3fe Jacob Shin 2012-11-16 604 }
8d57470d8f8596 Yinghai Lu 2012-11-16 605
8d57470d8f8596 Yinghai Lu 2012-11-16 606 return mapped_ram_size;
66520ebc2df3fe Jacob Shin 2012-11-16 607 }
66520ebc2df3fe Jacob Shin 2012-11-16 608
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
@ 2023-07-26 19:58 kernel test robot
0 siblings, 0 replies; 45+ messages in thread
From: kernel test robot @ 2023-07-26 19:58 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: block/kyber-iosched.c:269:17: sparse: sparse: bad integer constant expression"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
References: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
TO: David Laight <David.Laight@ACULAB.COM>
TO: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
TO: "'Andy Shevchenko'" <andriy.shevchenko@linux.intel.com>
TO: "'Andrew Morton'" <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: "'Matthew Wilcox (Oracle)'" <willy@infradead.org>
TO: "'Christoph Hellwig'" <hch@infradead.org>
TO: "'Jason A. Donenfeld'" <Jason@zx2c4.com>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master crng-random/master v6.5-rc3 next-20230726]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/a09512c8526b46759669d0b879144563%40AcuMS.aculab.com
patch subject: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
:::::: branch date: 31 hours ago
:::::: commit date: 31 hours ago
config: xtensa-randconfig-r093-20230725 (https://download.01.org/0day-ci/archive/20230727/202307270322.OFhfaWfS-lkp@intel.com/config)
compiler: xtensa-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230727/202307270322.OFhfaWfS-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202307270322.OFhfaWfS-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
block/kyber-iosched.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/kernel.h):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> block/kyber-iosched.c:269:17: sparse: sparse: bad integer constant expression
>> block/kyber-iosched.c:269:17: sparse: sparse: static assertion failed: "clamp() low limit 1U greater than high limit kyber_depth[sched_domain]"
--
block/bfq-iosched.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/log2.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> block/bfq-iosched.c:1120:16: sparse: sparse: bad integer constant expression
>> block/bfq-iosched.c:1120:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(dur))(msecs_to_jiffies(3000)) greater than high limit (typeof(dur))(msecs_to_jiffies(25000))"
--
mm/memtest.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/kernel.h):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> mm/memtest.c:79:30: sparse: sparse: bad integer constant expression
>> mm/memtest.c:79:30: sparse: sparse: static assertion failed: "clamp() low limit start greater than high limit end"
mm/memtest.c:80:28: sparse: sparse: bad integer constant expression
mm/memtest.c:80:28: sparse: sparse: static assertion failed: "clamp() low limit start greater than high limit end"
--
fs/btrfs/async-thread.c: note: in included file (through arch/xtensa/include/asm/thread_info.h, arch/xtensa/include/asm/current.h, include/linux/sched.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> fs/btrfs/async-thread.c:197:30: sparse: sparse: bad integer constant expression
>> fs/btrfs/async-thread.c:197:30: sparse: sparse: static assertion failed: "clamp() low limit (typeof(new_current_active))(1) greater than high limit (typeof(new_current_active))(wq->limit_active)"
--
fs/btrfs/discard.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/log2.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> fs/btrfs/discard.c:621:17: sparse: sparse: bad integer constant expression
>> fs/btrfs/discard.c:621:17: sparse: sparse: static assertion failed: "clamp() low limit min_delay greater than high limit (1000UL)"
--
fs/gfs2/rgrp.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/log2.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> fs/gfs2/rgrp.c:1586:26: sparse: sparse: bad integer constant expression
>> fs/gfs2/rgrp.c:1586:26: sparse: sparse: static assertion failed: "clamp() low limit (u32)32 greater than high limit free_blocks"
--
drivers/clk/xilinx/xlnx_vcu.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/kernel.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> drivers/clk/xilinx/xlnx_vcu.c:317:16: sparse: sparse: bad integer constant expression
>> drivers/clk/xilinx/xlnx_vcu.c:317:16: sparse: sparse: static assertion failed: "clamp() low limit (unsigned long)(pll->fvco_min) greater than high limit (unsigned long)(pll->fvco_max)"
--
drivers/regulator/rtmv20-regulator.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/log2.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> drivers/regulator/rtmv20-regulator.c:192:22: sparse: sparse: bad integer constant expression
>> drivers/regulator/rtmv20-regulator.c:192:22: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(min) greater than high limit (typeof(val))(max)"
--
drivers/nvme/host/core.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/log2.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> drivers/nvme/host/core.c:3064:42: sparse: sparse: bad integer constant expression
>> drivers/nvme/host/core.c:3064:42: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(shutdown_timeout) greater than high limit (unsigned int)(60)"
--
drivers/md/bcache/sysfs.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/log2.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> drivers/md/bcache/sysfs.c:315:9: sparse: sparse: bad integer constant expression
>> drivers/md/bcache/sysfs.c:315:9: sparse: sparse: static assertion failed: "clamp() low limit (typeof(v))(0) greater than high limit (typeof(v))(bch_cutoff_writeback)"
drivers/md/bcache/sysfs.c:341:9: sparse: sparse: bad integer constant expression
>> drivers/md/bcache/sysfs.c:341:9: sparse: sparse: static assertion failed: "clamp() low limit (typeof(v))(1) greater than high limit (typeof(v))(dc->writeback_rate_fp_term_mid - 1)"
drivers/md/bcache/sysfs.c:344:9: sparse: sparse: bad integer constant expression
>> drivers/md/bcache/sysfs.c:344:9: sparse: sparse: static assertion failed: "clamp() low limit (typeof(v))(dc->writeback_rate_fp_term_low + 1) greater than high limit (typeof(v))(dc->writeback_rate_fp_term_high - 1)"
drivers/md/bcache/sysfs.c:348:9: sparse: sparse: bad integer constant expression
>> drivers/md/bcache/sysfs.c:348:9: sparse: sparse: static assertion failed: "clamp() low limit (typeof(v))(dc->writeback_rate_fp_term_mid + 1) greater than high limit (typeof(v))((~0U))"
--
drivers/md/bcache/writeback.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/log2.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> drivers/md/bcache/writeback.c:149:20: sparse: sparse: bad integer constant expression
>> drivers/md/bcache/writeback.c:149:20: sparse: sparse: static assertion failed: "clamp() low limit (int32_t)(dc->writeback_rate_minimum) greater than high limit (int32_t)(1000000000L)"
--
drivers/video/backlight/lv5207lp.c: note: in included file (through arch/xtensa/include/asm/thread_info.h, arch/xtensa/include/asm/current.h, include/linux/sched.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> drivers/video/backlight/lv5207lp.c:109:28: sparse: sparse: bad integer constant expression
>> drivers/video/backlight/lv5207lp.c:109:28: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(0) greater than high limit (unsigned int)(props.max_brightness)"
vim +269 block/kyber-iosched.c
00e043936e9a1c Omar Sandoval 2017-04-14 265
6e25cb01ea2063 Omar Sandoval 2018-09-27 266 static void kyber_resize_domain(struct kyber_queue_data *kqd,
6e25cb01ea2063 Omar Sandoval 2018-09-27 267 unsigned int sched_domain, unsigned int depth)
6e25cb01ea2063 Omar Sandoval 2018-09-27 268 {
00e043936e9a1c Omar Sandoval 2017-04-14 @269 depth = clamp(depth, 1U, kyber_depth[sched_domain]);
6c3b7af1c975b8 Omar Sandoval 2018-09-27 270 if (depth != kqd->domain_tokens[sched_domain].sb.depth) {
00e043936e9a1c Omar Sandoval 2017-04-14 271 sbitmap_queue_resize(&kqd->domain_tokens[sched_domain], depth);
c41108049d1433 Christoph Hellwig 2021-10-12 272 trace_kyber_adjust(kqd->dev, kyber_domain_names[sched_domain],
6c3b7af1c975b8 Omar Sandoval 2018-09-27 273 depth);
6c3b7af1c975b8 Omar Sandoval 2018-09-27 274 }
00e043936e9a1c Omar Sandoval 2017-04-14 275 }
00e043936e9a1c Omar Sandoval 2017-04-14 276
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
@ 2023-07-26 12:15 kernel test robot
0 siblings, 0 replies; 45+ messages in thread
From: kernel test robot @ 2023-07-26 12:15 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: block/kyber-iosched.c:269:17: sparse: sparse: bad integer constant expression"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
References: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
TO: David Laight <David.Laight@ACULAB.COM>
TO: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
TO: "'Andy Shevchenko'" <andriy.shevchenko@linux.intel.com>
TO: "'Andrew Morton'" <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: "'Matthew Wilcox (Oracle)'" <willy@infradead.org>
TO: "'Christoph Hellwig'" <hch@infradead.org>
TO: "'Jason A. Donenfeld'" <Jason@zx2c4.com>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master crng-random/master v6.5-rc3 next-20230726]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/a09512c8526b46759669d0b879144563%40AcuMS.aculab.com
patch subject: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
:::::: branch date: 23 hours ago
:::::: commit date: 23 hours ago
config: xtensa-randconfig-r093-20230725 (https://download.01.org/0day-ci/archive/20230726/202307262034.GIhyGilK-lkp@intel.com/config)
compiler: xtensa-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230726/202307262034.GIhyGilK-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202307262034.GIhyGilK-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
block/kyber-iosched.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/kernel.h):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> block/kyber-iosched.c:269:17: sparse: sparse: bad integer constant expression
>> block/kyber-iosched.c:269:17: sparse: sparse: static assertion failed: "clamp() low limit 1U greater than high limit kyber_depth[sched_domain]"
--
block/bfq-iosched.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/log2.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> block/bfq-iosched.c:1120:16: sparse: sparse: bad integer constant expression
>> block/bfq-iosched.c:1120:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(dur))(msecs_to_jiffies(3000)) greater than high limit (typeof(dur))(msecs_to_jiffies(25000))"
--
mm/memtest.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/kernel.h):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> mm/memtest.c:79:30: sparse: sparse: bad integer constant expression
>> mm/memtest.c:79:30: sparse: sparse: static assertion failed: "clamp() low limit start greater than high limit end"
mm/memtest.c:80:28: sparse: sparse: bad integer constant expression
mm/memtest.c:80:28: sparse: sparse: static assertion failed: "clamp() low limit start greater than high limit end"
--
drivers/regulator/rtmv20-regulator.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/log2.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> drivers/regulator/rtmv20-regulator.c:192:22: sparse: sparse: bad integer constant expression
>> drivers/regulator/rtmv20-regulator.c:192:22: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(min) greater than high limit (typeof(val))(max)"
--
drivers/md/bcache/sysfs.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/log2.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> drivers/md/bcache/sysfs.c:315:9: sparse: sparse: bad integer constant expression
>> drivers/md/bcache/sysfs.c:315:9: sparse: sparse: static assertion failed: "clamp() low limit (typeof(v))(0) greater than high limit (typeof(v))(bch_cutoff_writeback)"
drivers/md/bcache/sysfs.c:341:9: sparse: sparse: bad integer constant expression
>> drivers/md/bcache/sysfs.c:341:9: sparse: sparse: static assertion failed: "clamp() low limit (typeof(v))(1) greater than high limit (typeof(v))(dc->writeback_rate_fp_term_mid - 1)"
drivers/md/bcache/sysfs.c:344:9: sparse: sparse: bad integer constant expression
>> drivers/md/bcache/sysfs.c:344:9: sparse: sparse: static assertion failed: "clamp() low limit (typeof(v))(dc->writeback_rate_fp_term_low + 1) greater than high limit (typeof(v))(dc->writeback_rate_fp_term_high - 1)"
drivers/md/bcache/sysfs.c:348:9: sparse: sparse: bad integer constant expression
>> drivers/md/bcache/sysfs.c:348:9: sparse: sparse: static assertion failed: "clamp() low limit (typeof(v))(dc->writeback_rate_fp_term_mid + 1) greater than high limit (typeof(v))((~0U))"
--
drivers/md/bcache/writeback.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/log2.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> drivers/md/bcache/writeback.c:149:20: sparse: sparse: bad integer constant expression
>> drivers/md/bcache/writeback.c:149:20: sparse: sparse: static assertion failed: "clamp() low limit (int32_t)(dc->writeback_rate_minimum) greater than high limit (int32_t)(1000000000L)"
--
drivers/clk/xilinx/xlnx_vcu.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/kernel.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> drivers/clk/xilinx/xlnx_vcu.c:317:16: sparse: sparse: bad integer constant expression
>> drivers/clk/xilinx/xlnx_vcu.c:317:16: sparse: sparse: static assertion failed: "clamp() low limit (unsigned long)(pll->fvco_min) greater than high limit (unsigned long)(pll->fvco_max)"
--
fs/btrfs/async-thread.c: note: in included file (through arch/xtensa/include/asm/thread_info.h, arch/xtensa/include/asm/current.h, include/linux/sched.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> fs/btrfs/async-thread.c:197:30: sparse: sparse: bad integer constant expression
>> fs/btrfs/async-thread.c:197:30: sparse: sparse: static assertion failed: "clamp() low limit (typeof(new_current_active))(1) greater than high limit (typeof(new_current_active))(wq->limit_active)"
--
fs/btrfs/discard.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/log2.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> fs/btrfs/discard.c:621:17: sparse: sparse: bad integer constant expression
>> fs/btrfs/discard.c:621:17: sparse: sparse: static assertion failed: "clamp() low limit min_delay greater than high limit (1000UL)"
--
fs/gfs2/rgrp.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/log2.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> fs/gfs2/rgrp.c:1586:26: sparse: sparse: bad integer constant expression
>> fs/gfs2/rgrp.c:1586:26: sparse: sparse: static assertion failed: "clamp() low limit (u32)32 greater than high limit free_blocks"
--
drivers/nvme/host/core.c: note: in included file (through arch/xtensa/include/asm/bitops.h, include/linux/bitops.h, include/linux/log2.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> drivers/nvme/host/core.c:3064:42: sparse: sparse: bad integer constant expression
>> drivers/nvme/host/core.c:3064:42: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(shutdown_timeout) greater than high limit (unsigned int)(60)"
--
drivers/video/backlight/lv5207lp.c: note: in included file (through arch/xtensa/include/asm/thread_info.h, arch/xtensa/include/asm/current.h, include/linux/sched.h, ...):
arch/xtensa/include/asm/processor.h:103:2: sparse: sparse: Unsupported xtensa ABI
arch/xtensa/include/asm/processor.h:133:2: sparse: sparse: Unsupported Xtensa ABI
>> drivers/video/backlight/lv5207lp.c:109:28: sparse: sparse: bad integer constant expression
>> drivers/video/backlight/lv5207lp.c:109:28: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(0) greater than high limit (unsigned int)(props.max_brightness)"
vim +269 block/kyber-iosched.c
00e043936e9a1c Omar Sandoval 2017-04-14 265
6e25cb01ea2063 Omar Sandoval 2018-09-27 266 static void kyber_resize_domain(struct kyber_queue_data *kqd,
6e25cb01ea2063 Omar Sandoval 2018-09-27 267 unsigned int sched_domain, unsigned int depth)
6e25cb01ea2063 Omar Sandoval 2018-09-27 268 {
00e043936e9a1c Omar Sandoval 2017-04-14 @269 depth = clamp(depth, 1U, kyber_depth[sched_domain]);
6c3b7af1c975b8 Omar Sandoval 2018-09-27 270 if (depth != kqd->domain_tokens[sched_domain].sb.depth) {
00e043936e9a1c Omar Sandoval 2017-04-14 271 sbitmap_queue_resize(&kqd->domain_tokens[sched_domain], depth);
c41108049d1433 Christoph Hellwig 2021-10-12 272 trace_kyber_adjust(kqd->dev, kyber_domain_names[sched_domain],
6c3b7af1c975b8 Omar Sandoval 2018-09-27 273 depth);
6c3b7af1c975b8 Omar Sandoval 2018-09-27 274 }
00e043936e9a1c Omar Sandoval 2017-04-14 275 }
00e043936e9a1c Omar Sandoval 2017-04-14 276
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
@ 2023-07-26 9:50 kernel test robot
0 siblings, 0 replies; 45+ messages in thread
From: kernel test robot @ 2023-07-26 9:50 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: drivers/iio/adc/max11410.c:310:16: sparse: sparse: bad integer constant expression"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
References: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
TO: David Laight <David.Laight@ACULAB.COM>
TO: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
TO: "'Andy Shevchenko'" <andriy.shevchenko@linux.intel.com>
TO: "'Andrew Morton'" <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: "'Matthew Wilcox (Oracle)'" <willy@infradead.org>
TO: "'Christoph Hellwig'" <hch@infradead.org>
TO: "'Jason A. Donenfeld'" <Jason@zx2c4.com>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master v6.5-rc3 next-20230726]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/a09512c8526b46759669d0b879144563%40AcuMS.aculab.com
patch subject: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
:::::: branch date: 21 hours ago
:::::: commit date: 21 hours ago
config: i386-randconfig-i062-20230725 (https://download.01.org/0day-ci/archive/20230726/202307261759.cFMqbOSP-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230726/202307261759.cFMqbOSP-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202307261759.cFMqbOSP-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/iio/adc/max11410.c:310:16: sparse: sparse: bad integer constant expression
>> drivers/iio/adc/max11410.c:310:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(rate))(0) greater than high limit (typeof(rate))(max11410_sampling_len[MAX11410_FILTER_SINC4] - 1)"
--
>> drivers/gpu/drm/i915/gt/intel_rps.c:872:23: sparse: sparse: bad integer constant expression
>> drivers/gpu/drm/i915/gt/intel_rps.c:872:23: sparse: sparse: static assertion failed: "clamp() low limit rps->min_freq_softlimit greater than high limit rps->max_freq_softlimit"
drivers/gpu/drm/i915/gt/intel_rps.c:1194:33: sparse: sparse: bad integer constant expression
>> drivers/gpu/drm/i915/gt/intel_rps.c:1194:33: sparse: sparse: static assertion failed: "clamp() low limit (u32)(rps->min_freq) greater than high limit (u32)(rps->max_freq)"
drivers/gpu/drm/i915/gt/intel_rps.c:1874:20: sparse: sparse: bad integer constant expression
>> drivers/gpu/drm/i915/gt/intel_rps.c:1874:20: sparse: sparse: static assertion failed: "clamp() low limit (int)(min) greater than high limit (int)(max)"
drivers/gpu/drm/i915/gt/intel_rps.c:1961:20: sparse: sparse: bad integer constant expression
drivers/gpu/drm/i915/gt/intel_rps.c:1961:20: sparse: sparse: static assertion failed: "clamp() low limit rps->min_freq_softlimit greater than high limit rps->max_freq_softlimit"
drivers/gpu/drm/i915/gt/intel_rps.c:2467:15: sparse: sparse: bad integer constant expression
>> drivers/gpu/drm/i915/gt/intel_rps.c:2467:15: sparse: sparse: static assertion failed: "clamp() low limit (int)(rps->min_freq_softlimit) greater than high limit (int)(rps->max_freq_softlimit)"
drivers/gpu/drm/i915/gt/intel_rps.c:2545:15: sparse: sparse: bad integer constant expression
drivers/gpu/drm/i915/gt/intel_rps.c:2545:15: sparse: sparse: static assertion failed: "clamp() low limit (int)(rps->min_freq_softlimit) greater than high limit (int)(rps->max_freq_softlimit)"
--
>> drivers/gpu/drm/i915/i915_hwmon.c:391:24: sparse: sparse: bad integer constant expression
>> drivers/gpu/drm/i915/i915_hwmon.c:391:24: sparse: sparse: static assertion failed: "clamp() low limit (u64)(min) greater than high limit (u64)(max)"
--
drivers/gpu/drm/i915/display/intel_color.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
>> drivers/gpu/drm/i915/display/intel_color.c:584:13: sparse: sparse: bad integer constant expression
>> drivers/gpu/drm/i915/display/intel_color.c:584:13: sparse: sparse: static assertion failed: "clamp() low limit -(s64)((((1UL))) << (int_bits + frac_bits - 1)) greater than high limit (s64)(((((1UL))) << (int_bits + frac_bits - 1)) - 1)"
drivers/gpu/drm/i915/display/intel_color.c:785:15: sparse: sparse: bad integer constant expression
>> drivers/gpu/drm/i915/display/intel_color.c:785:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/i915/display/intel_backlight.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
>> drivers/gpu/drm/i915/display/intel_backlight.c:47:22: sparse: sparse: bad integer constant expression
>> drivers/gpu/drm/i915/display/intel_backlight.c:47:22: sparse: sparse: static assertion failed: "clamp() low limit source_min greater than high limit source_max"
drivers/gpu/drm/i915/display/intel_backlight.c:69:20: sparse: sparse: bad integer constant expression
>> drivers/gpu/drm/i915/display/intel_backlight.c:69:20: sparse: sparse: static assertion failed: "clamp() low limit panel->backlight.min greater than high limit panel->backlight.max"
drivers/gpu/drm/i915/display/intel_backlight.c:1332:15: sparse: sparse: bad integer constant expression
>> drivers/gpu/drm/i915/display/intel_backlight.c:1332:15: sparse: sparse: static assertion failed: "clamp() low limit panel->backlight.pwm_level_min greater than high limit panel->backlight.pwm_level_max"
--
drivers/gpu/drm/i915/display/intel_dp_aux.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
>> drivers/gpu/drm/i915/display/intel_dp_aux.c:480:39: sparse: sparse: bad integer constant expression
>> drivers/gpu/drm/i915/display/intel_dp_aux.c:480:39: sparse: sparse: static assertion failed: "clamp() low limit (int)(0) greater than high limit (int)(msg->size)"
vim +310 drivers/iio/adc/max11410.c
a44ef7c4609724 Ibrahim Tilki 2022-10-03 296
a44ef7c4609724 Ibrahim Tilki 2022-10-03 297 static ssize_t in_voltage_filter2_notch_center_show(struct device *dev,
a44ef7c4609724 Ibrahim Tilki 2022-10-03 298 struct device_attribute *devattr,
a44ef7c4609724 Ibrahim Tilki 2022-10-03 299 char *buf)
a44ef7c4609724 Ibrahim Tilki 2022-10-03 300 {
a44ef7c4609724 Ibrahim Tilki 2022-10-03 301 struct iio_dev *indio_dev = dev_get_drvdata(dev);
a44ef7c4609724 Ibrahim Tilki 2022-10-03 302 struct max11410_state *state = iio_priv(indio_dev);
a44ef7c4609724 Ibrahim Tilki 2022-10-03 303 int ret, reg, rate, filter;
a44ef7c4609724 Ibrahim Tilki 2022-10-03 304
a44ef7c4609724 Ibrahim Tilki 2022-10-03 305 ret = regmap_read(state->regmap, MAX11410_REG_FILTER, ®);
a44ef7c4609724 Ibrahim Tilki 2022-10-03 306 if (ret)
a44ef7c4609724 Ibrahim Tilki 2022-10-03 307 return ret;
a44ef7c4609724 Ibrahim Tilki 2022-10-03 308
a44ef7c4609724 Ibrahim Tilki 2022-10-03 309 rate = FIELD_GET(MAX11410_FILTER_RATE_MASK, reg);
a44ef7c4609724 Ibrahim Tilki 2022-10-03 @310 rate = clamp_val(rate, 0,
a44ef7c4609724 Ibrahim Tilki 2022-10-03 311 max11410_sampling_len[MAX11410_FILTER_SINC4] - 1);
a44ef7c4609724 Ibrahim Tilki 2022-10-03 312 filter = max11410_sampling_rates[MAX11410_FILTER_SINC4][rate][0];
a44ef7c4609724 Ibrahim Tilki 2022-10-03 313
a44ef7c4609724 Ibrahim Tilki 2022-10-03 314 return sysfs_emit(buf, "%d\n", filter);
a44ef7c4609724 Ibrahim Tilki 2022-10-03 315 }
a44ef7c4609724 Ibrahim Tilki 2022-10-03 316
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
@ 2023-07-26 9:39 kernel test robot
0 siblings, 0 replies; 45+ messages in thread
From: kernel test robot @ 2023-07-26 9:39 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: drivers/hid/hid-udraw-ps3.c:92:16: sparse: sparse: bad integer constant expression"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
References: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
TO: David Laight <David.Laight@ACULAB.COM>
TO: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
TO: "'Andy Shevchenko'" <andriy.shevchenko@linux.intel.com>
TO: "'Andrew Morton'" <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: "'Matthew Wilcox (Oracle)'" <willy@infradead.org>
TO: "'Christoph Hellwig'" <hch@infradead.org>
TO: "'Jason A. Donenfeld'" <Jason@zx2c4.com>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master crng-random/master v6.5-rc3 next-20230726]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/a09512c8526b46759669d0b879144563%40AcuMS.aculab.com
patch subject: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
:::::: branch date: 21 hours ago
:::::: commit date: 21 hours ago
config: x86_64-randconfig-x061-20230726 (https://download.01.org/0day-ci/archive/20230726/202307261747.cMfONhUI-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230726/202307261747.cMfONhUI-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202307261747.cMfONhUI-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/hid/hid-udraw-ps3.c:92:16: sparse: sparse: bad integer constant expression
>> drivers/hid/hid-udraw-ps3.c:92:16: sparse: sparse: static assertion failed: "clamp() low limit accel_limits[offset].min greater than high limit accel_limits[offset].max"
--
>> drivers/media/pci/bt8xx/bttv-vbi.c:271:33: sparse: sparse: bad integer constant expression
>> drivers/media/pci/bt8xx/bttv-vbi.c:271:33: sparse: sparse: static assertion failed: "clamp() low limit min_start greater than high limit max_start"
drivers/media/pci/bt8xx/bttv-vbi.c:275:39: sparse: sparse: bad integer constant expression
>> drivers/media/pci/bt8xx/bttv-vbi.c:275:39: sparse: sparse: static assertion failed: "clamp() low limit (s64) 1 greater than high limit max_end - start"
--
>> drivers/media/pci/bt8xx/bttv-driver.c:1979:26: sparse: sparse: bad integer constant expression
>> drivers/media/pci/bt8xx/bttv-driver.c:1979:26: sparse: sparse: static assertion failed: "clamp() low limit min_width greater than high limit max_width"
drivers/media/pci/bt8xx/bttv-driver.c:1980:27: sparse: sparse: bad integer constant expression
>> drivers/media/pci/bt8xx/bttv-driver.c:1980:27: sparse: sparse: static assertion failed: "clamp() low limit min_height greater than high limit max_height"
drivers/media/pci/bt8xx/bttv-driver.c:2443:23: sparse: sparse: bad integer constant expression
>> drivers/media/pci/bt8xx/bttv-driver.c:2443:23: sparse: sparse: static assertion failed: "clamp() low limit (s32)(b_left) greater than high limit (s32)(b_right - 48)"
drivers/media/pci/bt8xx/bttv-driver.c:2446:24: sparse: sparse: bad integer constant expression
>> drivers/media/pci/bt8xx/bttv-driver.c:2446:24: sparse: sparse: static assertion failed: "clamp() low limit (s32)(48) greater than high limit (s32)(b_right - c.rect.left)"
drivers/media/pci/bt8xx/bttv-driver.c:2449:22: sparse: sparse: bad integer constant expression
>> drivers/media/pci/bt8xx/bttv-driver.c:2449:22: sparse: sparse: static assertion failed: "clamp() low limit (s32)(b_top) greater than high limit (s32)(b_bottom - 32)"
drivers/media/pci/bt8xx/bttv-driver.c:2453:25: sparse: sparse: bad integer constant expression
>> drivers/media/pci/bt8xx/bttv-driver.c:2453:25: sparse: sparse: static assertion failed: "clamp() low limit (s32)(32) greater than high limit (s32)(b_bottom - c.rect.top)"
--
>> drivers/media/pci/ivtv/ivtv-ioctl.c:851:24: sparse: sparse: bad integer constant expression
>> drivers/media/pci/ivtv/ivtv-ioctl.c:851:24: sparse: sparse: static assertion failed: "clamp() low limit 16U greater than high limit r.width"
drivers/media/pci/ivtv/ivtv-ioctl.c:852:25: sparse: sparse: bad integer constant expression
>> drivers/media/pci/ivtv/ivtv-ioctl.c:852:25: sparse: sparse: static assertion failed: "clamp() low limit 16U greater than high limit r.height"
drivers/media/pci/ivtv/ivtv-ioctl.c:853:23: sparse: sparse: bad integer constant expression
>> drivers/media/pci/ivtv/ivtv-ioctl.c:853:23: sparse: sparse: static assertion failed: "clamp() low limit (unsigned)(0) greater than high limit (unsigned)(r.width - sel->r.width)"
drivers/media/pci/ivtv/ivtv-ioctl.c:854:22: sparse: sparse: bad integer constant expression
>> drivers/media/pci/ivtv/ivtv-ioctl.c:854:22: sparse: sparse: static assertion failed: "clamp() low limit (unsigned)(0) greater than high limit (unsigned)(r.height - sel->r.height)"
vim +92 drivers/hid/hid-udraw-ps3.c
0edffe655a52d7c Bastien Nocera 2016-11-15 89
0edffe655a52d7c Bastien Nocera 2016-11-15 90 static int clamp_accel(int axis, int offset)
0edffe655a52d7c Bastien Nocera 2016-11-15 91 {
0edffe655a52d7c Bastien Nocera 2016-11-15 @92 axis = clamp(axis,
0edffe655a52d7c Bastien Nocera 2016-11-15 93 accel_limits[offset].min,
0edffe655a52d7c Bastien Nocera 2016-11-15 94 accel_limits[offset].max);
0edffe655a52d7c Bastien Nocera 2016-11-15 95 axis = (axis - accel_limits[offset].min) /
0edffe655a52d7c Bastien Nocera 2016-11-15 96 ((accel_limits[offset].max -
0edffe655a52d7c Bastien Nocera 2016-11-15 97 accel_limits[offset].min) * 0xFF);
0edffe655a52d7c Bastien Nocera 2016-11-15 98 return axis;
0edffe655a52d7c Bastien Nocera 2016-11-15 99 }
0edffe655a52d7c Bastien Nocera 2016-11-15 100
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
@ 2023-07-26 9:29 kernel test robot
0 siblings, 0 replies; 45+ messages in thread
From: kernel test robot @ 2023-07-26 9:29 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: arch/x86/kernel/check.c:117:25: sparse: sparse: bad integer constant expression"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
References: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
TO: David Laight <David.Laight@ACULAB.COM>
TO: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
TO: "'Andy Shevchenko'" <andriy.shevchenko@linux.intel.com>
TO: "'Andrew Morton'" <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: "'Matthew Wilcox (Oracle)'" <willy@infradead.org>
TO: "'Christoph Hellwig'" <hch@infradead.org>
TO: "'Jason A. Donenfeld'" <Jason@zx2c4.com>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master v6.5-rc3 next-20230726]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/a09512c8526b46759669d0b879144563%40AcuMS.aculab.com
patch subject: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
:::::: branch date: 21 hours ago
:::::: commit date: 21 hours ago
config: i386-randconfig-i061-20230725 (https://download.01.org/0day-ci/archive/20230726/202307261703.ZkkLW0jy-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230726/202307261703.ZkkLW0jy-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202307261703.ZkkLW0jy-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> arch/x86/kernel/check.c:117:25: sparse: sparse: bad integer constant expression
>> arch/x86/kernel/check.c:117:25: sparse: sparse: static assertion failed: "clamp() low limit (phys_addr_t)(((1UL) << 12)) greater than high limit (phys_addr_t)(corruption_check_size)"
arch/x86/kernel/check.c:119:23: sparse: sparse: bad integer constant expression
arch/x86/kernel/check.c:119:23: sparse: sparse: static assertion failed: "clamp() low limit (phys_addr_t)(((1UL) << 12)) greater than high limit (phys_addr_t)(corruption_check_size)"
--
drivers/cpufreq/intel_pstate.c: note: in included file:
include/linux/cpufreq.h:866:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:866:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:934:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:934:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:1019:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:1019:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
>> drivers/cpufreq/intel_pstate.c:1383:31: sparse: sparse: bad integer constant expression
>> drivers/cpufreq/intel_pstate.c:1383:31: sparse: sparse: static assertion failed: "clamp() low limit (int)(global.min_perf_pct) greater than high limit (int)(100)"
drivers/cpufreq/intel_pstate.c:1416:31: sparse: sparse: bad integer constant expression
>> drivers/cpufreq/intel_pstate.c:1416:31: sparse: sparse: static assertion failed: "clamp() low limit (int)(min_perf_pct_min()) greater than high limit (int)(global.max_perf_pct)"
drivers/cpufreq/intel_pstate.c:1779:18: sparse: sparse: bad integer constant expression
>> drivers/cpufreq/intel_pstate.c:1779:18: sparse: sparse: static assertion failed: "clamp() low limit (int32_t)(cpudata->vid.min) greater than high limit (int32_t)(cpudata->vid.max)"
drivers/cpufreq/intel_pstate.c:2269:16: sparse: sparse: bad integer constant expression
>> drivers/cpufreq/intel_pstate.c:2269:16: sparse: sparse: static assertion failed: "clamp() low limit (int)(min_pstate) greater than high limit (int)(max_pstate)"
drivers/cpufreq/intel_pstate.c:2522:35: sparse: sparse: bad integer constant expression
>> drivers/cpufreq/intel_pstate.c:2522:35: sparse: sparse: static assertion failed: "clamp() low limit (int32_t)(0) greater than high limit (int32_t)(max_policy_perf)"
drivers/cpufreq/intel_pstate.c:2554:30: sparse: sparse: bad integer constant expression
>> drivers/cpufreq/intel_pstate.c:2554:30: sparse: sparse: static assertion failed: "clamp() low limit (int32_t)(0) greater than high limit (int32_t)(global_max)"
drivers/cpufreq/intel_pstate.c:2976:25: sparse: sparse: bad integer constant expression
drivers/cpufreq/intel_pstate.c:2976:25: sparse: sparse: static assertion failed: "clamp() low limit (int)(min_pstate) greater than high limit (int)(max_pstate)"
--
>> arch/x86/mm/init_32.c:405:37: sparse: sparse: bad integer constant expression
>> arch/x86/mm/init_32.c:405:37: sparse: sparse: static assertion failed: "clamp() low limit (unsigned long)(start_pfn) greater than high limit (unsigned long)(end_pfn)"
arch/x86/mm/init_32.c:407:39: sparse: sparse: bad integer constant expression
arch/x86/mm/init_32.c:407:39: sparse: sparse: static assertion failed: "clamp() low limit (unsigned long)(start_pfn) greater than high limit (unsigned long)(end_pfn)"
--
>> drivers/net/virtio_net.c:1719:25: sparse: sparse: bad integer constant expression
>> drivers/net/virtio_net.c:1719:25: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(rq->min_buf_len) greater than high limit (unsigned int)(((1UL) << 12) - hdr_len)"
--
kernel/sched/fair.c: note: in included file (through kernel/sched/sched.h):
include/linux/cpufreq.h:866:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:866:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:934:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:934:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:1019:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:1019:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
kernel/sched/fair.c: note: in included file:
>> kernel/sched/sched.h:3066:16: sparse: sparse: bad integer constant expression
>> kernel/sched/sched.h:3066:16: sparse: sparse: static assertion failed: "clamp() low limit min_util greater than high limit max_util"
kernel/sched/fair.c:3521:16: sparse: sparse: bad integer constant expression
kernel/sched/fair.c:3521:16: sparse: sparse: static assertion failed: "clamp() low limit (long)((1UL << 1)) greater than high limit (long)(tg_shares)"
kernel/sched/fair.c:4356:16: sparse: sparse: bad integer constant expression
>> kernel/sched/fair.c:4356:16: sparse: sparse: static assertion failed: "clamp() low limit uclamp_min greater than high limit uclamp_max"
kernel/sched/fair.c:9226:20: sparse: sparse: bad integer constant expression
kernel/sched/fair.c:9226:20: sparse: sparse: static assertion failed: "clamp() low limit 1UL greater than high limit max_load_balance_interval"
kernel/sched/fair.c:11091:20: sparse: sparse: bad integer constant expression
kernel/sched/fair.c:11091:20: sparse: sparse: static assertion failed: "clamp() low limit 1UL greater than high limit max_load_balance_interval"
kernel/sched/fair.c:9762:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/fair.c:9762:22: sparse: struct task_struct [noderef] __rcu *
kernel/sched/fair.c:9762:22: sparse: struct task_struct *
kernel/sched/fair.c:6167:35: sparse: sparse: marked inline, but without a definition
kernel/sched/sched.h:2273:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2273:9: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2273:9: sparse: struct task_struct *
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
--
kernel/sched/core.c: note: in included file (through kernel/sched/sched.h):
include/linux/cpufreq.h:866:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:866:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:934:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:934:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:1019:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:1019:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
kernel/sched/core.c: note: in included file:
>> kernel/sched/sched.h:3066:16: sparse: sparse: bad integer constant expression
>> kernel/sched/sched.h:3066:16: sparse: sparse: static assertion failed: "clamp() low limit min_util greater than high limit max_util"
>> kernel/sched/core.c:1492:17: sparse: sparse: bad integer constant expression
>> kernel/sched/core.c:1492:17: sparse: sparse: static assertion failed: "clamp() low limit tg_min greater than high limit tg_max"
kernel/sched/core.c:7128:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/core.c:7128:17: sparse: struct task_struct *
kernel/sched/core.c:7128:17: sparse: struct task_struct [noderef] __rcu *
kernel/sched/core.c:7344:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/core.c:7344:22: sparse: struct task_struct [noderef] __rcu *
kernel/sched/core.c:7344:22: sparse: struct task_struct *
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
kernel/sched/sched.h:2273:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2273:9: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2273:9: sparse: struct task_struct *
kernel/sched/core.c:2178:38: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/core.c:2178:38: sparse: struct task_struct [noderef] __rcu *
kernel/sched/core.c:2178:38: sparse: struct task_struct const *
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
kernel/sched/sched.h:2273:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2273:9: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2273:9: sparse: struct task_struct *
kernel/sched/sched.h:2273:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2273:9: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2273:9: sparse: struct task_struct *
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
kernel/sched/sched.h:2273:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2273:9: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2273:9: sparse: struct task_struct *
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
kernel/sched/sched.h:2273:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2273:9: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2273:9: sparse: struct task_struct *
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
kernel/sched/sched.h:2273:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2273:9: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2273:9: sparse: struct task_struct *
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
kernel/sched/sched.h:2273:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2273:9: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2273:9: sparse: struct task_struct *
--
kernel/sched/build_utility.c: note: in included file:
include/linux/cpufreq.h:866:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:866:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:934:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:934:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:1019:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:1019:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
kernel/sched/build_utility.c: note: in included file:
>> kernel/sched/sched.h:3066:16: sparse: sparse: bad integer constant expression
>> kernel/sched/sched.h:3066:16: sparse: sparse: static assertion failed: "clamp() low limit min_util greater than high limit max_util"
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
--
kernel/sched/build_policy.c: note: in included file (through kernel/sched/sched.h):
include/linux/cpufreq.h:866:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:866:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:934:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:934:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
include/linux/cpufreq.h:1019:23: sparse: sparse: bad integer constant expression
include/linux/cpufreq.h:1019:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(target_freq))(policy->min) greater than high limit (typeof(target_freq))(policy->max)"
kernel/sched/build_policy.c: note: in included file:
>> kernel/sched/sched.h:3066:16: sparse: sparse: bad integer constant expression
>> kernel/sched/sched.h:3066:16: sparse: sparse: static assertion failed: "clamp() low limit min_util greater than high limit max_util"
kernel/sched/build_policy.c: note: in included file:
kernel/sched/rt.c:961:70: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/rt.c:961:70: sparse: struct task_struct [noderef] __rcu *
kernel/sched/rt.c:961:70: sparse: struct task_struct *
kernel/sched/rt.c:2418:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/rt.c:2418:25: sparse: struct task_struct *
kernel/sched/rt.c:2418:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/rt.c:2121:13: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/rt.c:2121:13: sparse: struct task_struct *
kernel/sched/rt.c:2121:13: sparse: struct task_struct [noderef] __rcu *
kernel/sched/build_policy.c: note: in included file:
kernel/sched/deadline.c:2317:13: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/deadline.c:2317:13: sparse: struct task_struct *
kernel/sched/deadline.c:2317:13: sparse: struct task_struct [noderef] __rcu *
kernel/sched/deadline.c:2425:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/deadline.c:2425:25: sparse: struct task_struct *
kernel/sched/deadline.c:2425:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/deadline.c:2649:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/deadline.c:2649:22: sparse: struct task_struct [noderef] __rcu *
kernel/sched/deadline.c:2649:22: sparse: struct task_struct *
kernel/sched/build_policy.c: note: in included file:
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
kernel/sched/sched.h:2111:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2111:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2111:25: sparse: struct task_struct *
vim +117 arch/x86/kernel/check.c
6784f7d0a5016a Arjan van de Ven 2008-10-05 90
6784f7d0a5016a Arjan van de Ven 2008-10-05 91
6784f7d0a5016a Arjan van de Ven 2008-10-05 92 void __init setup_bios_corruption_check(void)
6784f7d0a5016a Arjan van de Ven 2008-10-05 93 {
8d89ac808417e9 Tejun Heo 2011-07-12 94 phys_addr_t start, end;
8d89ac808417e9 Tejun Heo 2011-07-12 95 u64 i;
6784f7d0a5016a Arjan van de Ven 2008-10-05 96
6784f7d0a5016a Arjan van de Ven 2008-10-05 97 if (memory_corruption_check == -1) {
6784f7d0a5016a Arjan van de Ven 2008-10-05 98 memory_corruption_check =
6784f7d0a5016a Arjan van de Ven 2008-10-05 99 #ifdef CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK
6784f7d0a5016a Arjan van de Ven 2008-10-05 100 1
6784f7d0a5016a Arjan van de Ven 2008-10-05 101 #else
6784f7d0a5016a Arjan van de Ven 2008-10-05 102 0
6784f7d0a5016a Arjan van de Ven 2008-10-05 103 #endif
6784f7d0a5016a Arjan van de Ven 2008-10-05 104 ;
6784f7d0a5016a Arjan van de Ven 2008-10-05 105 }
6784f7d0a5016a Arjan van de Ven 2008-10-05 106
6784f7d0a5016a Arjan van de Ven 2008-10-05 107 if (corruption_check_size == 0)
6784f7d0a5016a Arjan van de Ven 2008-10-05 108 memory_corruption_check = 0;
6784f7d0a5016a Arjan van de Ven 2008-10-05 109
6784f7d0a5016a Arjan van de Ven 2008-10-05 110 if (!memory_corruption_check)
6784f7d0a5016a Arjan van de Ven 2008-10-05 111 return;
6784f7d0a5016a Arjan van de Ven 2008-10-05 112
6784f7d0a5016a Arjan van de Ven 2008-10-05 113 corruption_check_size = round_up(corruption_check_size, PAGE_SIZE);
6784f7d0a5016a Arjan van de Ven 2008-10-05 114
fc6daaf9315187 Tony Luck 2015-06-24 115 for_each_free_mem_range(i, NUMA_NO_NODE, MEMBLOCK_NONE, &start, &end,
fc6daaf9315187 Tony Luck 2015-06-24 116 NULL) {
8d89ac808417e9 Tejun Heo 2011-07-12 @117 start = clamp_t(phys_addr_t, round_up(start, PAGE_SIZE),
8d89ac808417e9 Tejun Heo 2011-07-12 118 PAGE_SIZE, corruption_check_size);
8d89ac808417e9 Tejun Heo 2011-07-12 119 end = clamp_t(phys_addr_t, round_down(end, PAGE_SIZE),
8d89ac808417e9 Tejun Heo 2011-07-12 120 PAGE_SIZE, corruption_check_size);
8d89ac808417e9 Tejun Heo 2011-07-12 121 if (start >= end)
8d89ac808417e9 Tejun Heo 2011-07-12 122 continue;
6784f7d0a5016a Arjan van de Ven 2008-10-05 123
24aa07882b672f Tejun Heo 2011-07-12 124 memblock_reserve(start, end - start);
8d89ac808417e9 Tejun Heo 2011-07-12 125 scan_areas[num_scan_areas].addr = start;
8d89ac808417e9 Tejun Heo 2011-07-12 126 scan_areas[num_scan_areas].size = end - start;
6784f7d0a5016a Arjan van de Ven 2008-10-05 127
6784f7d0a5016a Arjan van de Ven 2008-10-05 128 /* Assume we've already mapped this early memory */
8d89ac808417e9 Tejun Heo 2011-07-12 129 memset(__va(start), 0, end - start);
6784f7d0a5016a Arjan van de Ven 2008-10-05 130
8d89ac808417e9 Tejun Heo 2011-07-12 131 if (++num_scan_areas >= MAX_SCAN_AREAS)
8d89ac808417e9 Tejun Heo 2011-07-12 132 break;
6784f7d0a5016a Arjan van de Ven 2008-10-05 133 }
6784f7d0a5016a Arjan van de Ven 2008-10-05 134
a7bd1dafdcc13e Naga Chumbalkar 2011-02-25 135 if (num_scan_areas)
b1e3a25f587901 He Zhe 2018-08-14 136 pr_info("Scanning %d areas for low memory corruption\n", num_scan_areas);
6784f7d0a5016a Arjan van de Ven 2008-10-05 137 }
6784f7d0a5016a Arjan van de Ven 2008-10-05 138
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
@ 2023-07-26 8:47 kernel test robot
0 siblings, 0 replies; 45+ messages in thread
From: kernel test robot @ 2023-07-26 8:47 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: block/blk-iocost.c:983:17: sparse: sparse: bad integer constant expression"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
References: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
TO: David Laight <David.Laight@ACULAB.COM>
TO: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
TO: "'Andy Shevchenko'" <andriy.shevchenko@linux.intel.com>
TO: "'Andrew Morton'" <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: "'Matthew Wilcox (Oracle)'" <willy@infradead.org>
TO: "'Christoph Hellwig'" <hch@infradead.org>
TO: "'Jason A. Donenfeld'" <Jason@zx2c4.com>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master v6.5-rc3 next-20230726]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/a09512c8526b46759669d0b879144563%40AcuMS.aculab.com
patch subject: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
:::::: branch date: 20 hours ago
:::::: commit date: 20 hours ago
config: um-randconfig-r073-20230725 (https://download.01.org/0day-ci/archive/20230726/202307261635.7nht2dxS-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230726/202307261635.7nht2dxS-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202307261635.7nht2dxS-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> block/blk-iocost.c:983:17: sparse: sparse: bad integer constant expression
>> block/blk-iocost.c:983:17: sparse: sparse: static assertion failed: "clamp() low limit vcomp_min greater than high limit vcomp_max"
block/blk-iocost.c:990:26: sparse: sparse: bad integer constant expression
>> block/blk-iocost.c:990:26: sparse: sparse: static assertion failed: "clamp() low limit -vperiod greater than high limit vperiod"
block/blk-iocost.c:1030:25: sparse: sparse: bad integer constant expression
>> block/blk-iocost.c:1030:25: sparse: sparse: static assertion failed: "clamp() low limit vrate_min greater than high limit vrate_max"
block/blk-iocost.c:1101:25: sparse: sparse: bad integer constant expression
>> block/blk-iocost.c:1101:25: sparse: sparse: static assertion failed: "clamp() low limit (u32)(1) greater than high limit (u32)(active)"
block/blk-iocost.c:1778:16: sparse: sparse: bad integer constant expression
>> block/blk-iocost.c:1778:16: sparse: sparse: static assertion failed: "clamp() low limit (s64)(1) greater than high limit (s64)(hwm)"
--
>> fs/xfs/xfs_dquot.c:109:16: sparse: sparse: bad integer constant expression
>> fs/xfs/xfs_dquot.c:109:16: sparse: sparse: static assertion failed: "clamp() low limit (time64_t)(qi->qi_expiry_min) greater than high limit (time64_t)(qi->qi_expiry_max)"
--
>> drivers/clk/clk-apple-nco.c:221:16: sparse: sparse: bad integer constant expression
>> drivers/clk/clk-apple-nco.c:221:16: sparse: sparse: static assertion failed: "clamp() low limit lo greater than high limit hi"
--
>> drivers/devfreq/mtk-cci-devfreq.c:65:21: sparse: sparse: bad integer constant expression
>> drivers/devfreq/mtk-cci-devfreq.c:65:21: sparse: sparse: static assertion failed: "clamp() low limit soc_data->sram_min_volt greater than high limit soc_data->sram_max_volt"
drivers/devfreq/mtk-cci-devfreq.c:70:33: sparse: sparse: bad integer constant expression
>> drivers/devfreq/mtk-cci-devfreq.c:70:33: sparse: sparse: static assertion failed: "clamp() low limit soc_data->sram_min_volt greater than high limit new_vsram"
--
>> drivers/hid/hid-input.c:1565:25: sparse: sparse: bad integer constant expression
>> drivers/hid/hid-input.c:1565:25: sparse: sparse: static assertion failed: "clamp() low limit field->logical_minimum greater than high limit field->logical_maximum"
--
>> drivers/hwmon/w83781d.c:185:15: sparse: sparse: bad integer constant expression
>> drivers/hwmon/w83781d.c:185:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(1) greater than high limit (typeof(val))(((type == w83781d || type == as99127f) ? 8 : 128))"
--
>> drivers/hwmon/adt7475.c:487:23: sparse: sparse: bad integer constant expression
>> drivers/hwmon/adt7475.c:487:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(temp - 15000) greater than high limit (typeof(val))(temp)"
drivers/hwmon/adt7475.c:678:15: sparse: sparse: bad integer constant expression
>> drivers/hwmon/adt7475.c:678:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(temp + autorange_table[0]) greater than high limit (typeof(val))(temp + autorange_table[(sizeof(autorange_table) / sizeof((autorange_table)[0]) + (0)) - 1])"
--
>> drivers/hwmon/lm95234.c:304:15: sparse: sparse: bad integer constant expression
>> drivers/hwmon/lm95234.c:304:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(( { typeof(val) __x = val; typeof(1000) __d = 1000; (((typeof(val))-1) > 0 || ((typeof(1000))-1) > 0 || (((__x) > 0) == ((__d) > 0))) ? (((__x) + ((__d) / 2)) / (__d)) : (((__x) - ((__d) / 2)) / (__d)); } )))(0) greater than high limit (typeof(( { typeof(val) __x = val; typeof(1000) __d = 1000; (((typeof(val))-1) > 0 || ((typeof(1000))-1) > 0 || (((__x) > 0) == ((__d) > 0))) ? (((__x) + ((__d) / 2)) / (__d)) : (((__x) - ((__d) / 2)) / (__d)); } )))(index ? 255 : 127)"
--
>> drivers/hwmon/lm90.c:1368:23: sparse: sparse: bad integer constant expression
>> drivers/hwmon/lm90.c:1368:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(-64000) greater than high limit (typeof(val))(191000 + fraction)"
drivers/hwmon/lm90.c:1371:23: sparse: sparse: bad integer constant expression
>> drivers/hwmon/lm90.c:1371:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(255000 + fraction)"
drivers/hwmon/lm90.c:1373:23: sparse: sparse: bad integer constant expression
drivers/hwmon/lm90.c:1373:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(127000 + fraction)"
drivers/hwmon/lm90.c:1375:23: sparse: sparse: bad integer constant expression
drivers/hwmon/lm90.c:1375:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(-128000) greater than high limit (typeof(val))(127000 + fraction)"
--
>> drivers/hwmon/nct7802.c:341:19: sparse: sparse: bad integer constant expression
>> drivers/hwmon/nct7802.c:341:19: sparse: sparse: static assertion failed: "clamp() low limit (typeof(voltage))(0) greater than high limit (typeof(voltage))(0x3ff * nct7802_vmul[nr])"
--
>> drivers/hwmon/stts751.c:488:16: sparse: sparse: bad integer constant expression
>> drivers/hwmon/stts751.c:488:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(temp))(-64000) greater than high limit (typeof(temp))(priv->therm)"
drivers/hwmon/stts751.c:535:16: sparse: sparse: bad integer constant expression
>> drivers/hwmon/stts751.c:535:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(temp))(priv->event_min) greater than high limit (typeof(temp))(127937)"
drivers/hwmon/stts751.c:569:16: sparse: sparse: bad integer constant expression
>> drivers/hwmon/stts751.c:569:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(temp))(-64000) greater than high limit (typeof(temp))(priv->event_max)"
--
>> drivers/hwmon/amc6821.c:518:28: sparse: sparse: bad integer constant expression
>> drivers/hwmon/amc6821.c:518:28: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val / 1000))(0) greater than high limit (typeof(val / 1000))(data->temp1_auto_point_temp[1])"
drivers/hwmon/amc6821.c:520:28: sparse: sparse: bad integer constant expression
>> drivers/hwmon/amc6821.c:520:28: sparse: sparse: static assertion failed: "clamp() low limit (typeof(ptemp[0]))(0) greater than high limit (typeof(ptemp[0]))(data->temp2_auto_point_temp[1])"
drivers/hwmon/amc6821.c:533:28: sparse: sparse: bad integer constant expression
>> drivers/hwmon/amc6821.c:533:28: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val / 1000))((ptemp[0] & 0x7C) + 4) greater than high limit (typeof(val / 1000))(124)"
drivers/hwmon/amc6821.c:535:28: sparse: sparse: bad integer constant expression
>> drivers/hwmon/amc6821.c:535:28: sparse: sparse: static assertion failed: "clamp() low limit (typeof(ptemp[2]))(ptemp[1] + 1) greater than high limit (typeof(ptemp[2]))(255)"
drivers/hwmon/amc6821.c:538:28: sparse: sparse: bad integer constant expression
>> drivers/hwmon/amc6821.c:538:28: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val / 1000))(ptemp[1]+1) greater than high limit (typeof(val / 1000))(255)"
--
>> drivers/hwmon/nct6775-core.c:2506:15: sparse: sparse: bad integer constant expression
>> drivers/hwmon/nct6775-core.c:2506:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(minval[index]) greater than high limit (typeof(val))(maxval[index])"
drivers/hwmon/nct6775-core.c:2821:15: sparse: sparse: bad integer constant expression
>> drivers/hwmon/nct6775-core.c:2821:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(( { typeof(val) __x = val; typeof(1000) __d = 1000; (((typeof(val))-1) > 0 || ((typeof(1000))-1) > 0 || (((__x) > 0) == ((__d) > 0))) ? (((__x) + ((__d) / 2)) / (__d)) : (((__x) - ((__d) / 2)) / (__d)); } )))(0) greater than high limit (typeof(( { typeof(val) __x = val; typeof(1000) __d = 1000; (((typeof(val))-1) > 0 || ((typeof(1000))-1) > 0 || (((__x) > 0) == ((__d) > 0))) ? (((__x) + ((__d) / 2)) / (__d)) : (((__x) - ((__d) / 2)) / (__d)); } )))(data->target_temp_mask)"
drivers/hwmon/nct6775-core.c:2902:15: sparse: sparse: bad integer constant expression
drivers/hwmon/nct6775-core.c:2902:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(( { typeof(val) __x = val; typeof(1000) __d = 1000; (((typeof(val))-1) > 0 || ((typeof(1000))-1) > 0 || (((__x) > 0) == ((__d) > 0))) ? (((__x) + ((__d) / 2)) / (__d)) : (((__x) - ((__d) / 2)) / (__d)); } )))(0) greater than high limit (typeof(( { typeof(val) __x = val; typeof(1000) __d = 1000; (((typeof(val))-1) > 0 || ((typeof(1000))-1) > 0 || (((__x) > 0) == ((__d) > 0))) ? (((__x) + ((__d) / 2)) / (__d)) : (((__x) - ((__d) / 2)) / (__d)); } )))(data->tolerance_mask)"
drivers/hwmon/nct6775-core.c:2979:15: sparse: sparse: bad integer constant expression
>> drivers/hwmon/nct6775-core.c:2979:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(data->speed_tolerance_limit)"
--
>> drivers/input/mousedev.c:182:25: sparse: sparse: bad integer constant expression
>> drivers/input/mousedev.c:182:25: sparse: sparse: static assertion failed: "clamp() low limit min greater than high limit max"
drivers/input/mousedev.c:196:25: sparse: sparse: bad integer constant expression
drivers/input/mousedev.c:196:25: sparse: sparse: static assertion failed: "clamp() low limit min greater than high limit max"
drivers/input/mousedev.c:292:33: sparse: sparse: bad integer constant expression
>> drivers/input/mousedev.c:292:33: sparse: sparse: static assertion failed: "clamp() low limit (typeof(client->pos_x))(0) greater than high limit (typeof(client->pos_x))(xres)"
drivers/input/mousedev.c:295:33: sparse: sparse: bad integer constant expression
>> drivers/input/mousedev.c:295:33: sparse: sparse: static assertion failed: "clamp() low limit (typeof(client->pos_y))(0) greater than high limit (typeof(client->pos_y))(yres)"
--
drivers/gpu/ipu-v3/ipu-image-convert.c: note: in included file (through include/video/imx-ipu-v3.h, include/video/imx-ipu-image-convert.h):
include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
>> drivers/gpu/ipu-v3/ipu-image-convert.c:1955:13: sparse: sparse: bad integer constant expression
>> drivers/gpu/ipu-v3/ipu-image-convert.c:1955:13: sparse: sparse: static assertion failed: "clamp() low limit (min + ~mask) & mask greater than high limit max & mask"
--
>> drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c:1992:15: sparse: sparse: bad integer constant expression
>> drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c:1992:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(1) greater than high limit (typeof(val))(hw->settings->fifo_ops.max_size)"
--
>> drivers/clk/bcm/clk-raspberrypi.c:234:21: sparse: sparse: bad integer constant expression
>> drivers/clk/bcm/clk-raspberrypi.c:234:21: sparse: sparse: static assertion failed: "clamp() low limit req->min_rate greater than high limit req->max_rate"
--
>> drivers/clk/bcm/clk-bcm2835.c:580:16: sparse: sparse: bad integer constant expression
>> drivers/clk/bcm/clk-bcm2835.c:580:16: sparse: sparse: static assertion failed: "clamp() low limit data->min_rate greater than high limit data->max_rate"
--
>> drivers/clk/ingenic/cgu.c:480:15: sparse: sparse: bad integer constant expression
>> drivers/clk/ingenic/cgu.c:480:15: sparse: sparse: static assertion failed: "clamp() low limit (unsigned int)(clk_info->div.div) greater than high limit (unsigned int)(clk_info->div.div << clk_info->div.bits)"
--
>> drivers/clk/starfive/clk-starfive-jh71x0.c:81:30: sparse: sparse: bad integer constant expression
>> drivers/clk/starfive/clk-starfive-jh71x0.c:81:30: sparse: sparse: static assertion failed: "clamp() low limit req->min_rate greater than high limit req->max_rate"
drivers/clk/starfive/clk-starfive-jh71x0.c:110:29: sparse: sparse: bad integer constant expression
>> drivers/clk/starfive/clk-starfive-jh71x0.c:110:29: sparse: sparse: static assertion failed: "clamp() low limit 1UL greater than high limit (unsigned long)clk->max_div"
drivers/clk/starfive/clk-starfive-jh71x0.c:132:30: sparse: sparse: bad integer constant expression
drivers/clk/starfive/clk-starfive-jh71x0.c:132:30: sparse: sparse: static assertion failed: "clamp() low limit req->min_rate greater than high limit req->max_rate"
vim +983 block/blk-iocost.c
e33b93650fc5364 Breno Leitao 2023-02-28 955
ac33e91e2daca40 Tejun Heo 2020-09-01 956 /*
ac33e91e2daca40 Tejun Heo 2020-09-01 957 * When an iocg accumulates too much vtime or gets deactivated, we throw away
ac33e91e2daca40 Tejun Heo 2020-09-01 958 * some vtime, which lowers the overall device utilization. As the exact amount
ac33e91e2daca40 Tejun Heo 2020-09-01 959 * which is being thrown away is known, we can compensate by accelerating the
ac33e91e2daca40 Tejun Heo 2020-09-01 960 * vrate accordingly so that the extra vtime generated in the current period
ac33e91e2daca40 Tejun Heo 2020-09-01 961 * matches what got lost.
ac33e91e2daca40 Tejun Heo 2020-09-01 962 */
ac33e91e2daca40 Tejun Heo 2020-09-01 963 static void ioc_refresh_vrate(struct ioc *ioc, struct ioc_now *now)
ac33e91e2daca40 Tejun Heo 2020-09-01 964 {
ac33e91e2daca40 Tejun Heo 2020-09-01 965 s64 pleft = ioc->period_at + ioc->period_us - now->now;
ac33e91e2daca40 Tejun Heo 2020-09-01 966 s64 vperiod = ioc->period_us * ioc->vtime_base_rate;
ac33e91e2daca40 Tejun Heo 2020-09-01 967 s64 vcomp, vcomp_min, vcomp_max;
ac33e91e2daca40 Tejun Heo 2020-09-01 968
ac33e91e2daca40 Tejun Heo 2020-09-01 969 lockdep_assert_held(&ioc->lock);
ac33e91e2daca40 Tejun Heo 2020-09-01 970
ac33e91e2daca40 Tejun Heo 2020-09-01 971 /* we need some time left in this period */
ac33e91e2daca40 Tejun Heo 2020-09-01 972 if (pleft <= 0)
ac33e91e2daca40 Tejun Heo 2020-09-01 973 goto done;
ac33e91e2daca40 Tejun Heo 2020-09-01 974
ac33e91e2daca40 Tejun Heo 2020-09-01 975 /*
ac33e91e2daca40 Tejun Heo 2020-09-01 976 * Calculate how much vrate should be adjusted to offset the error.
ac33e91e2daca40 Tejun Heo 2020-09-01 977 * Limit the amount of adjustment and deduct the adjusted amount from
ac33e91e2daca40 Tejun Heo 2020-09-01 978 * the error.
ac33e91e2daca40 Tejun Heo 2020-09-01 979 */
ac33e91e2daca40 Tejun Heo 2020-09-01 980 vcomp = -div64_s64(ioc->vtime_err, pleft);
ac33e91e2daca40 Tejun Heo 2020-09-01 981 vcomp_min = -(ioc->vtime_base_rate >> 1);
ac33e91e2daca40 Tejun Heo 2020-09-01 982 vcomp_max = ioc->vtime_base_rate;
ac33e91e2daca40 Tejun Heo 2020-09-01 @983 vcomp = clamp(vcomp, vcomp_min, vcomp_max);
ac33e91e2daca40 Tejun Heo 2020-09-01 984
ac33e91e2daca40 Tejun Heo 2020-09-01 985 ioc->vtime_err += vcomp * pleft;
ac33e91e2daca40 Tejun Heo 2020-09-01 986
ac33e91e2daca40 Tejun Heo 2020-09-01 987 atomic64_set(&ioc->vtime_rate, ioc->vtime_base_rate + vcomp);
ac33e91e2daca40 Tejun Heo 2020-09-01 988 done:
ac33e91e2daca40 Tejun Heo 2020-09-01 989 /* bound how much error can accumulate */
ac33e91e2daca40 Tejun Heo 2020-09-01 @990 ioc->vtime_err = clamp(ioc->vtime_err, -vperiod, vperiod);
ac33e91e2daca40 Tejun Heo 2020-09-01 991 }
ac33e91e2daca40 Tejun Heo 2020-09-01 992
926f75f6a9ef503 Baolin Wang 2020-11-26 993 static void ioc_adjust_base_vrate(struct ioc *ioc, u32 rq_wait_pct,
926f75f6a9ef503 Baolin Wang 2020-11-26 994 int nr_lagging, int nr_shortages,
926f75f6a9ef503 Baolin Wang 2020-11-26 995 int prev_busy_level, u32 *missed_ppm)
926f75f6a9ef503 Baolin Wang 2020-11-26 996 {
926f75f6a9ef503 Baolin Wang 2020-11-26 997 u64 vrate = ioc->vtime_base_rate;
926f75f6a9ef503 Baolin Wang 2020-11-26 998 u64 vrate_min = ioc->vrate_min, vrate_max = ioc->vrate_max;
926f75f6a9ef503 Baolin Wang 2020-11-26 999
926f75f6a9ef503 Baolin Wang 2020-11-26 1000 if (!ioc->busy_level || (ioc->busy_level < 0 && nr_lagging)) {
926f75f6a9ef503 Baolin Wang 2020-11-26 1001 if (ioc->busy_level != prev_busy_level || nr_lagging)
63c9eac4b6d7585 Kemeng Shi 2022-10-18 1002 trace_iocost_ioc_vrate_adj(ioc, vrate,
926f75f6a9ef503 Baolin Wang 2020-11-26 1003 missed_ppm, rq_wait_pct,
926f75f6a9ef503 Baolin Wang 2020-11-26 1004 nr_lagging, nr_shortages);
926f75f6a9ef503 Baolin Wang 2020-11-26 1005
926f75f6a9ef503 Baolin Wang 2020-11-26 1006 return;
926f75f6a9ef503 Baolin Wang 2020-11-26 1007 }
926f75f6a9ef503 Baolin Wang 2020-11-26 1008
926f75f6a9ef503 Baolin Wang 2020-11-26 1009 /*
926f75f6a9ef503 Baolin Wang 2020-11-26 1010 * If vrate is out of bounds, apply clamp gradually as the
926f75f6a9ef503 Baolin Wang 2020-11-26 1011 * bounds can change abruptly. Otherwise, apply busy_level
926f75f6a9ef503 Baolin Wang 2020-11-26 1012 * based adjustment.
926f75f6a9ef503 Baolin Wang 2020-11-26 1013 */
926f75f6a9ef503 Baolin Wang 2020-11-26 1014 if (vrate < vrate_min) {
926f75f6a9ef503 Baolin Wang 2020-11-26 1015 vrate = div64_u64(vrate * (100 + VRATE_CLAMP_ADJ_PCT), 100);
926f75f6a9ef503 Baolin Wang 2020-11-26 1016 vrate = min(vrate, vrate_min);
926f75f6a9ef503 Baolin Wang 2020-11-26 1017 } else if (vrate > vrate_max) {
926f75f6a9ef503 Baolin Wang 2020-11-26 1018 vrate = div64_u64(vrate * (100 - VRATE_CLAMP_ADJ_PCT), 100);
926f75f6a9ef503 Baolin Wang 2020-11-26 1019 vrate = max(vrate, vrate_max);
926f75f6a9ef503 Baolin Wang 2020-11-26 1020 } else {
926f75f6a9ef503 Baolin Wang 2020-11-26 1021 int idx = min_t(int, abs(ioc->busy_level),
926f75f6a9ef503 Baolin Wang 2020-11-26 1022 ARRAY_SIZE(vrate_adj_pct) - 1);
926f75f6a9ef503 Baolin Wang 2020-11-26 1023 u32 adj_pct = vrate_adj_pct[idx];
926f75f6a9ef503 Baolin Wang 2020-11-26 1024
926f75f6a9ef503 Baolin Wang 2020-11-26 1025 if (ioc->busy_level > 0)
926f75f6a9ef503 Baolin Wang 2020-11-26 1026 adj_pct = 100 - adj_pct;
926f75f6a9ef503 Baolin Wang 2020-11-26 1027 else
926f75f6a9ef503 Baolin Wang 2020-11-26 1028 adj_pct = 100 + adj_pct;
926f75f6a9ef503 Baolin Wang 2020-11-26 1029
926f75f6a9ef503 Baolin Wang 2020-11-26 @1030 vrate = clamp(DIV64_U64_ROUND_UP(vrate * adj_pct, 100),
926f75f6a9ef503 Baolin Wang 2020-11-26 1031 vrate_min, vrate_max);
926f75f6a9ef503 Baolin Wang 2020-11-26 1032 }
926f75f6a9ef503 Baolin Wang 2020-11-26 1033
926f75f6a9ef503 Baolin Wang 2020-11-26 1034 trace_iocost_ioc_vrate_adj(ioc, vrate, missed_ppm, rq_wait_pct,
926f75f6a9ef503 Baolin Wang 2020-11-26 1035 nr_lagging, nr_shortages);
926f75f6a9ef503 Baolin Wang 2020-11-26 1036
926f75f6a9ef503 Baolin Wang 2020-11-26 1037 ioc->vtime_base_rate = vrate;
926f75f6a9ef503 Baolin Wang 2020-11-26 1038 ioc_refresh_margins(ioc);
926f75f6a9ef503 Baolin Wang 2020-11-26 1039 }
926f75f6a9ef503 Baolin Wang 2020-11-26 1040
7caa47151ab2e64 Tejun Heo 2019-08-28 1041 /* take a snapshot of the current [v]time and vrate */
7caa47151ab2e64 Tejun Heo 2019-08-28 1042 static void ioc_now(struct ioc *ioc, struct ioc_now *now)
7caa47151ab2e64 Tejun Heo 2019-08-28 1043 {
7caa47151ab2e64 Tejun Heo 2019-08-28 1044 unsigned seq;
6c31be320c52bad Kemeng Shi 2022-10-18 1045 u64 vrate;
7caa47151ab2e64 Tejun Heo 2019-08-28 1046
7caa47151ab2e64 Tejun Heo 2019-08-28 1047 now->now_ns = ktime_get();
7caa47151ab2e64 Tejun Heo 2019-08-28 1048 now->now = ktime_to_us(now->now_ns);
6c31be320c52bad Kemeng Shi 2022-10-18 1049 vrate = atomic64_read(&ioc->vtime_rate);
7caa47151ab2e64 Tejun Heo 2019-08-28 1050
7caa47151ab2e64 Tejun Heo 2019-08-28 1051 /*
7caa47151ab2e64 Tejun Heo 2019-08-28 1052 * The current vtime is
7caa47151ab2e64 Tejun Heo 2019-08-28 1053 *
7caa47151ab2e64 Tejun Heo 2019-08-28 1054 * vtime at period start + (wallclock time since the start) * vrate
7caa47151ab2e64 Tejun Heo 2019-08-28 1055 *
7caa47151ab2e64 Tejun Heo 2019-08-28 1056 * As a consistent snapshot of `period_at_vtime` and `period_at` is
7caa47151ab2e64 Tejun Heo 2019-08-28 1057 * needed, they're seqcount protected.
7caa47151ab2e64 Tejun Heo 2019-08-28 1058 */
7caa47151ab2e64 Tejun Heo 2019-08-28 1059 do {
7caa47151ab2e64 Tejun Heo 2019-08-28 1060 seq = read_seqcount_begin(&ioc->period_seqcount);
7caa47151ab2e64 Tejun Heo 2019-08-28 1061 now->vnow = ioc->period_at_vtime +
6c31be320c52bad Kemeng Shi 2022-10-18 1062 (now->now - ioc->period_at) * vrate;
7caa47151ab2e64 Tejun Heo 2019-08-28 1063 } while (read_seqcount_retry(&ioc->period_seqcount, seq));
7caa47151ab2e64 Tejun Heo 2019-08-28 1064 }
7caa47151ab2e64 Tejun Heo 2019-08-28 1065
7caa47151ab2e64 Tejun Heo 2019-08-28 1066 static void ioc_start_period(struct ioc *ioc, struct ioc_now *now)
7caa47151ab2e64 Tejun Heo 2019-08-28 1067 {
7caa47151ab2e64 Tejun Heo 2019-08-28 1068 WARN_ON_ONCE(ioc->running != IOC_RUNNING);
7caa47151ab2e64 Tejun Heo 2019-08-28 1069
7caa47151ab2e64 Tejun Heo 2019-08-28 1070 write_seqcount_begin(&ioc->period_seqcount);
7caa47151ab2e64 Tejun Heo 2019-08-28 1071 ioc->period_at = now->now;
7caa47151ab2e64 Tejun Heo 2019-08-28 1072 ioc->period_at_vtime = now->vnow;
7caa47151ab2e64 Tejun Heo 2019-08-28 1073 write_seqcount_end(&ioc->period_seqcount);
7caa47151ab2e64 Tejun Heo 2019-08-28 1074
7caa47151ab2e64 Tejun Heo 2019-08-28 1075 ioc->timer.expires = jiffies + usecs_to_jiffies(ioc->period_us);
7caa47151ab2e64 Tejun Heo 2019-08-28 1076 add_timer(&ioc->timer);
7caa47151ab2e64 Tejun Heo 2019-08-28 1077 }
7caa47151ab2e64 Tejun Heo 2019-08-28 1078
7caa47151ab2e64 Tejun Heo 2019-08-28 1079 /*
7caa47151ab2e64 Tejun Heo 2019-08-28 1080 * Update @iocg's `active` and `inuse` to @active and @inuse, update level
b0853ab4a238c54 Tejun Heo 2020-09-01 1081 * weight sums and propagate upwards accordingly. If @save, the current margin
b0853ab4a238c54 Tejun Heo 2020-09-01 1082 * is saved to be used as reference for later inuse in-period adjustments.
7caa47151ab2e64 Tejun Heo 2019-08-28 1083 */
b0853ab4a238c54 Tejun Heo 2020-09-01 1084 static void __propagate_weights(struct ioc_gq *iocg, u32 active, u32 inuse,
b0853ab4a238c54 Tejun Heo 2020-09-01 1085 bool save, struct ioc_now *now)
7caa47151ab2e64 Tejun Heo 2019-08-28 1086 {
7caa47151ab2e64 Tejun Heo 2019-08-28 1087 struct ioc *ioc = iocg->ioc;
7caa47151ab2e64 Tejun Heo 2019-08-28 1088 int lvl;
7caa47151ab2e64 Tejun Heo 2019-08-28 1089
7caa47151ab2e64 Tejun Heo 2019-08-28 1090 lockdep_assert_held(&ioc->lock);
7caa47151ab2e64 Tejun Heo 2019-08-28 1091
e9f4eee9a0023ba Tejun Heo 2021-05-11 1092 /*
e9f4eee9a0023ba Tejun Heo 2021-05-11 1093 * For an active leaf node, its inuse shouldn't be zero or exceed
e9f4eee9a0023ba Tejun Heo 2021-05-11 1094 * @active. An active internal node's inuse is solely determined by the
e9f4eee9a0023ba Tejun Heo 2021-05-11 1095 * inuse to active ratio of its children regardless of @inuse.
e9f4eee9a0023ba Tejun Heo 2021-05-11 1096 */
e9f4eee9a0023ba Tejun Heo 2021-05-11 1097 if (list_empty(&iocg->active_list) && iocg->child_active_sum) {
e9f4eee9a0023ba Tejun Heo 2021-05-11 1098 inuse = DIV64_U64_ROUND_UP(active * iocg->child_inuse_sum,
e9f4eee9a0023ba Tejun Heo 2021-05-11 1099 iocg->child_active_sum);
e9f4eee9a0023ba Tejun Heo 2021-05-11 1100 } else {
db84a72af6be422 Tejun Heo 2020-09-01 @1101 inuse = clamp_t(u32, inuse, 1, active);
e9f4eee9a0023ba Tejun Heo 2021-05-11 1102 }
db84a72af6be422 Tejun Heo 2020-09-01 1103
b0853ab4a238c54 Tejun Heo 2020-09-01 1104 iocg->last_inuse = iocg->inuse;
b0853ab4a238c54 Tejun Heo 2020-09-01 1105 if (save)
b0853ab4a238c54 Tejun Heo 2020-09-01 1106 iocg->saved_margin = now->vnow - atomic64_read(&iocg->vtime);
b0853ab4a238c54 Tejun Heo 2020-09-01 1107
db84a72af6be422 Tejun Heo 2020-09-01 1108 if (active == iocg->active && inuse == iocg->inuse)
db84a72af6be422 Tejun Heo 2020-09-01 1109 return;
7caa47151ab2e64 Tejun Heo 2019-08-28 1110
7caa47151ab2e64 Tejun Heo 2019-08-28 1111 for (lvl = iocg->level - 1; lvl >= 0; lvl--) {
7caa47151ab2e64 Tejun Heo 2019-08-28 1112 struct ioc_gq *parent = iocg->ancestors[lvl];
7caa47151ab2e64 Tejun Heo 2019-08-28 1113 struct ioc_gq *child = iocg->ancestors[lvl + 1];
7caa47151ab2e64 Tejun Heo 2019-08-28 1114 u32 parent_active = 0, parent_inuse = 0;
7caa47151ab2e64 Tejun Heo 2019-08-28 1115
7caa47151ab2e64 Tejun Heo 2019-08-28 1116 /* update the level sums */
7caa47151ab2e64 Tejun Heo 2019-08-28 1117 parent->child_active_sum += (s32)(active - child->active);
7caa47151ab2e64 Tejun Heo 2019-08-28 1118 parent->child_inuse_sum += (s32)(inuse - child->inuse);
e9f4eee9a0023ba Tejun Heo 2021-05-11 1119 /* apply the updates */
7caa47151ab2e64 Tejun Heo 2019-08-28 1120 child->active = active;
7caa47151ab2e64 Tejun Heo 2019-08-28 1121 child->inuse = inuse;
7caa47151ab2e64 Tejun Heo 2019-08-28 1122
7caa47151ab2e64 Tejun Heo 2019-08-28 1123 /*
7caa47151ab2e64 Tejun Heo 2019-08-28 1124 * The delta between inuse and active sums indicates that
5ba1add216fe822 Baolin Wang 2020-11-26 1125 * much of weight is being given away. Parent's inuse
7caa47151ab2e64 Tejun Heo 2019-08-28 1126 * and active should reflect the ratio.
7caa47151ab2e64 Tejun Heo 2019-08-28 1127 */
7caa47151ab2e64 Tejun Heo 2019-08-28 1128 if (parent->child_active_sum) {
7caa47151ab2e64 Tejun Heo 2019-08-28 1129 parent_active = parent->weight;
7caa47151ab2e64 Tejun Heo 2019-08-28 1130 parent_inuse = DIV64_U64_ROUND_UP(
7caa47151ab2e64 Tejun Heo 2019-08-28 1131 parent_active * parent->child_inuse_sum,
7caa47151ab2e64 Tejun Heo 2019-08-28 1132 parent->child_active_sum);
7caa47151ab2e64 Tejun Heo 2019-08-28 1133 }
7caa47151ab2e64 Tejun Heo 2019-08-28 1134
7caa47151ab2e64 Tejun Heo 2019-08-28 1135 /* do we need to keep walking up? */
7caa47151ab2e64 Tejun Heo 2019-08-28 1136 if (parent_active == parent->active &&
7caa47151ab2e64 Tejun Heo 2019-08-28 1137 parent_inuse == parent->inuse)
7caa47151ab2e64 Tejun Heo 2019-08-28 1138 break;
7caa47151ab2e64 Tejun Heo 2019-08-28 1139
7caa47151ab2e64 Tejun Heo 2019-08-28 1140 active = parent_active;
7caa47151ab2e64 Tejun Heo 2019-08-28 1141 inuse = parent_inuse;
7caa47151ab2e64 Tejun Heo 2019-08-28 1142 }
7caa47151ab2e64 Tejun Heo 2019-08-28 1143
7caa47151ab2e64 Tejun Heo 2019-08-28 1144 ioc->weights_updated = true;
7caa47151ab2e64 Tejun Heo 2019-08-28 1145 }
7caa47151ab2e64 Tejun Heo 2019-08-28 1146
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
@ 2023-07-26 8:36 kernel test robot
0 siblings, 0 replies; 45+ messages in thread
From: kernel test robot @ 2023-07-26 8:36 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: drivers/clk/clk-axi-clkgen.c:161:32: sparse: sparse: bad integer constant expression"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
References: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
TO: David Laight <David.Laight@ACULAB.COM>
TO: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
TO: "'Andy Shevchenko'" <andriy.shevchenko@linux.intel.com>
TO: "'Andrew Morton'" <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: "'Matthew Wilcox (Oracle)'" <willy@infradead.org>
TO: "'Christoph Hellwig'" <hch@infradead.org>
TO: "'Jason A. Donenfeld'" <Jason@zx2c4.com>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/a09512c8526b46759669d0b879144563%40AcuMS.aculab.com
patch subject: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
:::::: branch date: 20 hours ago
:::::: commit date: 20 hours ago
config: i386-randconfig-i063-20230725 (https://download.01.org/0day-ci/archive/20230726/202307261626.a8kcGs73-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230726/202307261626.a8kcGs73-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202307261626.a8kcGs73-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/clk/clk-axi-clkgen.c:161:32: sparse: sparse: bad integer constant expression
>> drivers/clk/clk-axi-clkgen.c:161:32: sparse: sparse: static assertion failed: "clamp() low limit (unsigned long)(1) greater than high limit (unsigned long)(128 << fract_shift)"
--
>> drivers/hwmon/dell-smm-hwmon.c:877:31: sparse: sparse: bad integer constant expression
>> drivers/hwmon/dell-smm-hwmon.c:877:31: sparse: sparse: static assertion failed: "clamp() low limit (typeof(( { typeof(val) __x = val; typeof(data->i8k_pwm_mult) __d = data->i8k_pwm_mult; (((typeof(val))-1) > 0 || ((typeof(data->i8k_pwm_mult))-1) > 0 || (((__x) > 0) == ((__d) > 0))) ? (((__x) + ((__d) / 2)) / (__d)) : (((__x) - ((__d) / 2)) / (__d)); } )))(0) greater than high limit (typeof(( { typeof(val) __x = val; typeof(data->i8k_pwm_mult) __d = data->i8k_pwm_mult; (((typeof(val))-1) > 0 || ((typeof(data->i8k_pwm_mult))-1) > 0 || (((__x) > 0) == ((__d) > 0))) ? (((__x) + ((__d) / 2)) / (__d)) : (((__x) - ((__d) / 2)) / (__d)); } )))(data->i8k_fan_max)"
/bin/bash: line 1: 77479 Segmentation fault sparse -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise -Wno-return-void -Wno-unknown-attribute -fdiagnostic-prefix -D__CHECK_ENDIAN__ -D__i386__ --arch=i386 -mlittle-endian -m32 -Wp,-MMD,drivers/hwmon/.dell-smm-hwmon.o.d -nostdinc -Iarch/x86/include -I./arch/x86/include/generated -Iinclude -I./include -Iarch/x86/include/uapi -I./arch/x86/include/generated/uapi -Iinclude/uapi -I./include/generated/uapi -include include/linux/compiler-version.h -include include/linux/kconfig.h -include include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map== -Wundef -DKBUILD_EXTRA_WARN1 -std=gnu11 -fshort-wchar -funsigned-char -fno-common -fno-PIE -fno-strict-aliasing -Wall -Wundef -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Werror=strict-prototypes -Wno-format-security -Wno-trigraphs -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m32 -msoft-float -mregparm=3 -freg-struct-return -fno-pic -mpreferred-stack-boundary=2 -march=i486 -mtune=generic -Wa,-mtune=generic32 -ffreestanding -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -mindirect-branch-cs-prefix -mfunction-return=thunk-extern -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -Os -fno-allow-store-data-races -fno-reorder-blocks -fno-ipa-cp-clone -fno-partial-inlining -Wframe-larger-than=8192 -fno-stack-protector -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-dangling-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -ftrivial-auto-var-init=pattern -fno-stack-clash-protection -fzero-call-used-regs=used-gpr -fno-inline-functions-called-once -falign-functions=16 -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -Wextra -Wunused -Wno-unused-parameter -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wmissing-include-dirs -Wunused-but-set-variable -Wunused-const-variable -Wpacked-not-aligned -Wstringop-truncation -Wno-missing-field-initializers -Wno-sign-compare -Wno-type-limits -Wno-shift-negative-value -g -gdwarf-4 -fno-var-tracking -femit-struct-debug-baseonly -DRANDSTRUCT -fplugin=./scripts/gcc-plugins/randomize_layout_plugin.so -fplugin-arg-randomize_layout_plugin-performance-mode -fplugin=./scripts/gcc-plugins/latent_entropy_plugin.so -DLATENT_ENTROPY_PLUGIN -fsanitize=bounds-strict -fsanitize=shift -fsanitize=unreachable -I drivers/hwmon -I ./drivers/hwmon -DKBUILD_MODFILE='"drivers/hwmon/dell-smm-hwmon"' -DKBUILD_BASENAME='"dell_smm_hwmon"' -DKBUILD_MODNAME='"dell_smm_hwmon"' -D__KBUILD_MODNAME=kmod_dell_smm_hwmon drivers/hwmon/dell-smm-hwmon.c
--
>> drivers/hwmon/lm95245.c:292:23: sparse: sparse: bad integer constant expression
>> drivers/hwmon/lm95245.c:292:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val / 1000))(0) greater than high limit (typeof(val / 1000))(channel ? 255 : 127)"
--
>> drivers/hwmon/tmp513.c:257:26: sparse: sparse: bad integer constant expression
>> drivers/hwmon/tmp513.c:257:26: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(-max_val) greater than high limit (typeof(val))(max_val)"
drivers/hwmon/tmp513.c:265:23: sparse: sparse: bad integer constant expression
>> drivers/hwmon/tmp513.c:265:23: sparse: sparse: static assertion failed: "clamp() low limit (typeof(( { typeof(val) __x = val; typeof(4) __d = 4; (((typeof(val))-1) > 0 || ((typeof(4))-1) > 0 || (((__x) > 0) == ((__d) > 0))) ? (((__x) + ((__d) / 2)) / (__d)) : (((__x) - ((__d) / 2)) / (__d)); } )))(0) greater than high limit (typeof(( { typeof(val) __x = val; typeof(4) __d = 4; (((typeof(val))-1) > 0 || ((typeof(4))-1) > 0 || (((__x) > 0) == ((__d) > 0))) ? (((__x) + ((__d) / 2)) / (__d)) : (((__x) - ((__d) / 2)) / (__d)); } )))(max_val)"
--
>> drivers/video/fbdev/s3fb.c:906:17: sparse: sparse: bad integer constant expression
>> drivers/video/fbdev/s3fb.c:906:17: sparse: sparse: static assertion failed: "clamp() low limit hsstart + 4 greater than high limit htotal + 1"
--
>> drivers/media/pci/zoran/zoran_card.c:807:47: sparse: sparse: bad integer constant expression
>> drivers/media/pci/zoran/zoran_card.c:807:47: sparse: sparse: static assertion failed: "clamp() low limit 0 greater than high limit (int)(zr->timing->wa)"
drivers/media/pci/zoran/zoran_card.c:811:48: sparse: sparse: bad integer constant expression
>> drivers/media/pci/zoran/zoran_card.c:811:48: sparse: sparse: static assertion failed: "clamp() low limit 0 greater than high limit (zr->timing->ha) / 2"
vim +161 drivers/clk/clk-axi-clkgen.c
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 124
ac1ee86a9cdb00 Alexandru Ardelean 2020-12-03 125 static void axi_clkgen_calc_params(const struct axi_clkgen_limits *limits,
ac1ee86a9cdb00 Alexandru Ardelean 2020-12-03 126 unsigned long fin, unsigned long fout,
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 127 unsigned int *best_d, unsigned int *best_m, unsigned int *best_dout)
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 128 {
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 129 unsigned long d, d_min, d_max, _d_min, _d_max;
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 130 unsigned long m, m_min, m_max;
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 131 unsigned long f, dout, best_f, fvco;
86378cf646d323 Lars-Peter Clausen 2020-10-01 132 unsigned long fract_shift = 0;
86378cf646d323 Lars-Peter Clausen 2020-10-01 133 unsigned long fvco_min_fract, fvco_max_fract;
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 134
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 135 fin /= 1000;
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 136 fout /= 1000;
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 137
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 138 best_f = ULONG_MAX;
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 139 *best_d = 0;
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 140 *best_m = 0;
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 141 *best_dout = 0;
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 142
ac1ee86a9cdb00 Alexandru Ardelean 2020-12-03 143 d_min = max_t(unsigned long, DIV_ROUND_UP(fin, limits->fpfd_max), 1);
ac1ee86a9cdb00 Alexandru Ardelean 2020-12-03 144 d_max = min_t(unsigned long, fin / limits->fpfd_min, 80);
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 145
86378cf646d323 Lars-Peter Clausen 2020-10-01 146 again:
ac1ee86a9cdb00 Alexandru Ardelean 2020-12-03 147 fvco_min_fract = limits->fvco_min << fract_shift;
ac1ee86a9cdb00 Alexandru Ardelean 2020-12-03 148 fvco_max_fract = limits->fvco_max << fract_shift;
86378cf646d323 Lars-Peter Clausen 2020-10-01 149
86378cf646d323 Lars-Peter Clausen 2020-10-01 150 m_min = max_t(unsigned long, DIV_ROUND_UP(fvco_min_fract, fin) * d_min, 1);
86378cf646d323 Lars-Peter Clausen 2020-10-01 151 m_max = min_t(unsigned long, fvco_max_fract * d_max / fin, 64 << fract_shift);
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 152
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 153 for (m = m_min; m <= m_max; m++) {
86378cf646d323 Lars-Peter Clausen 2020-10-01 154 _d_min = max(d_min, DIV_ROUND_UP(fin * m, fvco_max_fract));
86378cf646d323 Lars-Peter Clausen 2020-10-01 155 _d_max = min(d_max, fin * m / fvco_min_fract);
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 156
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 157 for (d = _d_min; d <= _d_max; d++) {
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 158 fvco = fin * m / d;
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 159
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 160 dout = DIV_ROUND_CLOSEST(fvco, fout);
86378cf646d323 Lars-Peter Clausen 2020-10-01 @161 dout = clamp_t(unsigned long, dout, 1, 128 << fract_shift);
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 162 f = fvco / dout;
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 163 if (abs(f - fout) < abs(best_f - fout)) {
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 164 best_f = f;
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 165 *best_d = d;
86378cf646d323 Lars-Peter Clausen 2020-10-01 166 *best_m = m << (3 - fract_shift);
86378cf646d323 Lars-Peter Clausen 2020-10-01 167 *best_dout = dout << (3 - fract_shift);
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 168 if (best_f == fout)
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 169 return;
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 170 }
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 171 }
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 172 }
86378cf646d323 Lars-Peter Clausen 2020-10-01 173
86378cf646d323 Lars-Peter Clausen 2020-10-01 174 /* Lets see if we find a better setting in fractional mode */
86378cf646d323 Lars-Peter Clausen 2020-10-01 175 if (fract_shift == 0) {
86378cf646d323 Lars-Peter Clausen 2020-10-01 176 fract_shift = 3;
86378cf646d323 Lars-Peter Clausen 2020-10-01 177 goto again;
86378cf646d323 Lars-Peter Clausen 2020-10-01 178 }
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 179 }
0e646c52cf0ee1 Lars-Peter Clausen 2013-03-11 180
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
@ 2023-07-26 8:05 kernel test robot
0 siblings, 0 replies; 45+ messages in thread
From: kernel test robot @ 2023-07-26 8:05 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: drivers/input/mouse/focaltech.c:135:37: sparse: sparse: bad integer constant expression"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
References: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
TO: David Laight <David.Laight@ACULAB.COM>
TO: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
TO: "'Andy Shevchenko'" <andriy.shevchenko@linux.intel.com>
TO: "'Andrew Morton'" <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: "'Matthew Wilcox (Oracle)'" <willy@infradead.org>
TO: "'Christoph Hellwig'" <hch@infradead.org>
TO: "'Jason A. Donenfeld'" <Jason@zx2c4.com>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master crng-random/master v6.5-rc3 next-20230726]
[cannot apply to next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/a09512c8526b46759669d0b879144563%40AcuMS.aculab.com
patch subject: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
:::::: branch date: 19 hours ago
:::::: commit date: 19 hours ago
config: x86_64-randconfig-x063-20230726 (https://download.01.org/0day-ci/archive/20230726/202307261503.baQhuiJ2-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230726/202307261503.baQhuiJ2-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202307261503.baQhuiJ2-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/input/mouse/focaltech.c:135:37: sparse: sparse: bad integer constant expression
>> drivers/input/mouse/focaltech.c:135:37: sparse: sparse: static assertion failed: "clamp() low limit 0U greater than high limit priv->x_max"
drivers/input/mouse/focaltech.c:136:37: sparse: sparse: bad integer constant expression
>> drivers/input/mouse/focaltech.c:136:37: sparse: sparse: static assertion failed: "clamp() low limit 0U greater than high limit priv->y_max"
--
>> drivers/thermal/intel/intel_powerclamp.c:704:28: sparse: sparse: bad integer constant expression
>> drivers/thermal/intel/intel_powerclamp.c:704:28: sparse: sparse: static assertion failed: "clamp() low limit 0UL greater than high limit (unsigned long) (max_idle - 1)"
--
>> drivers/net/can/dev/calc_bittiming.c:39:25: sparse: sparse: bad integer constant expression
>> drivers/net/can/dev/calc_bittiming.c:39:25: sparse: sparse: static assertion failed: "clamp() low limit btc->tseg2_min greater than high limit btc->tseg2_max"
vim +135 drivers/input/mouse/focaltech.c
05be1d079ec0b3 Mathias Gottschlag 2014-12-29 114
05be1d079ec0b3 Mathias Gottschlag 2014-12-29 115 static void focaltech_report_state(struct psmouse *psmouse)
05be1d079ec0b3 Mathias Gottschlag 2014-12-29 116 {
05be1d079ec0b3 Mathias Gottschlag 2014-12-29 117 struct focaltech_data *priv = psmouse->private;
05be1d079ec0b3 Mathias Gottschlag 2014-12-29 118 struct focaltech_hw_state *state = &priv->state;
05be1d079ec0b3 Mathias Gottschlag 2014-12-29 119 struct input_dev *dev = psmouse->dev;
05be1d079ec0b3 Mathias Gottschlag 2014-12-29 120 int i;
05be1d079ec0b3 Mathias Gottschlag 2014-12-29 121
05be1d079ec0b3 Mathias Gottschlag 2014-12-29 122 for (i = 0; i < FOC_MAX_FINGERS; i++) {
05be1d079ec0b3 Mathias Gottschlag 2014-12-29 123 struct focaltech_finger_state *finger = &state->fingers[i];
05be1d079ec0b3 Mathias Gottschlag 2014-12-29 124 bool active = finger->active && finger->valid;
05be1d079ec0b3 Mathias Gottschlag 2014-12-29 125
05be1d079ec0b3 Mathias Gottschlag 2014-12-29 126 input_mt_slot(dev, i);
05be1d079ec0b3 Mathias Gottschlag 2014-12-29 127 input_mt_report_slot_state(dev, MT_TOOL_FINGER, active);
05be1d079ec0b3 Mathias Gottschlag 2014-12-29 128 if (active) {
679d83ea939063 Mathias Gottschlag 2015-03-07 129 unsigned int clamped_x, clamped_y;
679d83ea939063 Mathias Gottschlag 2015-03-07 130 /*
679d83ea939063 Mathias Gottschlag 2015-03-07 131 * The touchpad might report invalid data, so we clamp
679d83ea939063 Mathias Gottschlag 2015-03-07 132 * the resulting values so that we do not confuse
679d83ea939063 Mathias Gottschlag 2015-03-07 133 * userspace.
679d83ea939063 Mathias Gottschlag 2015-03-07 134 */
679d83ea939063 Mathias Gottschlag 2015-03-07 @135 clamped_x = clamp(finger->x, 0U, priv->x_max);
679d83ea939063 Mathias Gottschlag 2015-03-07 @136 clamped_y = clamp(finger->y, 0U, priv->y_max);
679d83ea939063 Mathias Gottschlag 2015-03-07 137 input_report_abs(dev, ABS_MT_POSITION_X, clamped_x);
05be1d079ec0b3 Mathias Gottschlag 2014-12-29 138 input_report_abs(dev, ABS_MT_POSITION_Y,
679d83ea939063 Mathias Gottschlag 2015-03-07 139 priv->y_max - clamped_y);
85919a00e55f90 Dmitry Tunin 2015-05-31 140 input_report_abs(dev, ABS_TOOL_WIDTH, state->width);
05be1d079ec0b3 Mathias Gottschlag 2014-12-29 141 }
05be1d079ec0b3 Mathias Gottschlag 2014-12-29 142 }
05be1d079ec0b3 Mathias Gottschlag 2014-12-29 143 input_mt_report_pointer_emulation(dev, true);
05be1d079ec0b3 Mathias Gottschlag 2014-12-29 144
324ae0958cab5c Dmitry Tunin 2016-10-24 145 input_report_key(dev, BTN_LEFT, state->pressed);
324ae0958cab5c Dmitry Tunin 2016-10-24 146 input_sync(dev);
05be1d079ec0b3 Mathias Gottschlag 2014-12-29 147 }
05be1d079ec0b3 Mathias Gottschlag 2014-12-29 148
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 45+ messages in thread
end of thread, other threads:[~2023-07-31 21:23 UTC | newest]
Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-25 10:00 [PATCH next 0/5] minmax: Relax type checks in min() and max() David Laight
2023-07-25 10:38 ` 'Andy Shevchenko'
2023-07-25 11:17 ` David Laight
2023-07-25 11:48 ` [PATCH next resend 1/5] minmax: Add min_unsigned(a, b) and max_unsigned(a, b) David Laight
2023-07-25 12:38 ` Matthew Wilcox
2023-07-25 13:20 ` David Laight
2023-07-25 11:51 ` [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness David Laight
2023-07-25 18:02 ` kernel test robot
2023-07-25 18:33 ` kernel test robot
2023-07-26 9:19 ` David Laight
2023-07-26 9:50 ` Marc Zyngier
2023-07-26 10:25 ` David Laight
2023-07-25 11:52 ` [PATCH next resend 3/5] minmax: Fix indentation of __cmp_once() and __clamp_once() David Laight
2023-07-25 11:53 ` [PATCH next resend 4/5] minmax: Allow comparisons of 'int' against 'unsigned char/short' David Laight
2023-07-25 11:54 ` [PATCH next resend 5/5] minmax: Relax check to allow comparison between int and small unsigned constants David Laight
2023-07-25 19:36 ` kernel test robot
2023-07-26 9:29 ` David Laight
2023-07-27 5:20 ` kernel test robot
2023-07-28 7:15 ` kernel test robot
2023-07-28 8:08 ` kernel test robot
2023-07-26 8:05 [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness kernel test robot
2023-07-26 8:36 kernel test robot
2023-07-26 8:47 kernel test robot
2023-07-26 9:29 kernel test robot
2023-07-26 9:39 kernel test robot
2023-07-26 9:50 kernel test robot
2023-07-26 12:15 kernel test robot
2023-07-26 19:58 kernel test robot
2023-07-26 21:10 kernel test robot
2023-07-26 23:47 kernel test robot
2023-07-27 3:27 kernel test robot
2023-07-27 12:37 kernel test robot
2023-07-27 21:24 kernel test robot
2023-07-28 9:53 kernel test robot
2023-07-28 10:25 kernel test robot
2023-07-28 23:47 kernel test robot
2023-07-29 1:19 kernel test robot
2023-07-29 2:00 kernel test robot
2023-07-29 2:41 kernel test robot
2023-07-29 3:54 kernel test robot
2023-07-30 1:08 kernel test robot
2023-07-30 1:38 kernel test robot
2023-07-31 20:20 kernel test robot
2023-07-31 20:41 kernel test robot
2023-07-31 21:23 kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.