diff options
| author | Nathan Chancellor <nathan@kernel.org> | 2026-02-12 11:28:27 -0500 |
|---|---|---|
| committer | Nathan Chancellor <nathan@kernel.org> | 2026-02-12 11:28:27 -0500 |
| commit | df989b01b5f97dae8f9869cfacbda1308f2182c1 (patch) | |
| tree | d150f91b9c27af17590ee54f5b2f778529e916d5 /include/linux | |
| parent | 05f7e89ab9731565d8a62e3b5d1ec206485eeb0b (diff) | |
| parent | d8ad80a85b96649a6ef30976762660245ae61a25 (diff) | |
Merge 7.0 Kbuild changes into kbuild-fixes
kbuild-fixes needs to be based on 6.19 to apply some fixes for
62089b804895 ("kbuild: rpm-pkg: Generate debuginfo package manually")
which landed in 6.19-rc1 but the new material of 7.0 needs fixes merged
as well.
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/overflow.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/include/linux/overflow.h b/include/linux/overflow.h index 736f633b2d5f..ab142d60c6b5 100644 --- a/include/linux/overflow.h +++ b/include/linux/overflow.h @@ -36,12 +36,6 @@ #define __type_min(T) ((T)((T)-type_max(T)-(T)1)) #define type_min(t) __type_min(typeof(t)) -/* - * Avoids triggering -Wtype-limits compilation warning, - * while using unsigned data types to check a < 0. - */ -#define is_non_negative(a) ((a) > 0 || (a) == 0) -#define is_negative(a) (!(is_non_negative(a))) /* * Allows for effectively applying __must_check to a macro so we can have @@ -201,9 +195,9 @@ static inline bool __must_check __must_check_overflow(bool overflow) typeof(d) _d = d; \ unsigned long long _a_full = _a; \ unsigned int _to_shift = \ - is_non_negative(_s) && _s < 8 * sizeof(*d) ? _s : 0; \ + _s >= 0 && _s < 8 * sizeof(*d) ? _s : 0; \ *_d = (_a_full << _to_shift); \ - (_to_shift != _s || is_negative(*_d) || is_negative(_a) || \ + (_to_shift != _s || *_d < 0 || _a < 0 || \ (*_d >> _to_shift) != _a); \ })) |
