linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7 5.10.y] Cherry pick of minmax.h commits from 5.15.y
@ 2025-09-16 21:22 Eliav Farber
  2025-09-16 21:22 ` [PATCH 1/7 5.10.y] tracing: Define the is_signed_type() macro once Eliav Farber
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Eliav Farber @ 2025-09-16 21:22 UTC (permalink / raw)
  To: luc.vanoostenryck, rostedt, mingo, akpm, gregkh, sj, David.Laight,
	Jason, andriy.shevchenko, bvanassche, keescook, linux-sparse,
	linux-kernel
  Cc: jonnyc, farbere, stable

This series backports seven commits from v5.15.y that update minmax.h
and related code:

 - ed6e37e30826 ("tracing: Define the is_signed_type() macro once")
 - 998f03984e25 ("minmax: sanity check constant bounds when clamping")
 - d470787b25e6 ("minmax: clamp more efficiently by avoiding extra
   comparison")
 - 1c2ee5bc9f11 ("minmax: fix header inclusions")
 - d53b5d862acd ("minmax: allow min()/max()/clamp() if the arguments
   have the same signedness.")
 - 7ed91c5560df ("minmax: allow comparisons of 'int' against 'unsigned
   char/short'")
 - 22f7794ef5a3 ("minmax: relax check to allow comparison between
   unsigned arguments and signed constants")

The main motivation is commit d53b5d862acd, which removes the strict
type check in min()/max() when both arguments have the same signedness.
Without this, kernel 5.10 builds can emit warnings that become build
failures when -Werror is used.

Additionally, commit ed6e37e30826 from tracing is required as a
dependency; without it, compilation fails.

Andy Shevchenko (1):
  minmax: fix header inclusions

Bart Van Assche (1):
  tracing: Define the is_signed_type() macro once

David Laight (3):
  minmax: allow min()/max()/clamp() if the arguments have the same
    signedness.
  minmax: allow comparisons of 'int' against 'unsigned char/short'
  minmax: relax check to allow comparison between unsigned arguments and
    signed constants

Jason A. Donenfeld (2):
  minmax: sanity check constant bounds when clamping
  minmax: clamp more efficiently by avoiding extra comparison

 include/linux/compiler.h     |  6 +++
 include/linux/minmax.h       | 89 ++++++++++++++++++++++++++----------
 include/linux/overflow.h     |  1 -
 include/linux/trace_events.h |  2 -
 4 files changed, 70 insertions(+), 28 deletions(-)

-- 
2.47.3


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-09-21 17:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-16 21:22 [PATCH 0/7 5.10.y] Cherry pick of minmax.h commits from 5.15.y Eliav Farber
2025-09-16 21:22 ` [PATCH 1/7 5.10.y] tracing: Define the is_signed_type() macro once Eliav Farber
2025-09-17  8:40   ` Greg KH
2025-09-17 10:37     ` Farber, Eliav
2025-09-21 17:30       ` Greg KH
2025-09-16 21:22 ` [PATCH 2/7 5.10.y] minmax: sanity check constant bounds when clamping Eliav Farber
2025-09-16 21:22 ` [PATCH 3/7 5.10.y] minmax: clamp more efficiently by avoiding extra comparison Eliav Farber
2025-09-16 21:22 ` [PATCH 4/7 5.10.y] minmax: fix header inclusions Eliav Farber
2025-09-18 21:01 ` [PATCH 0/7 5.10.y] Cherry pick of minmax.h commits from 5.15.y David Laight
2025-09-19 10:41   ` Farber, Eliav

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).