linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH next 0/7] minmax.h: Cleanups and minor optimisations
@ 2024-11-18 19:09 David Laight
  2024-11-18 19:11 ` [PATCH next 1/7] minmax.h: Add whitespace around operators and after commas David Laight
                   ` (6 more replies)
  0 siblings, 7 replies; 33+ messages in thread
From: David Laight @ 2024-11-18 19:09 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: 'Arnd Bergmann', 'linux-kernel@vger.kernel.org',
	'Jens Axboe', 'Matthew Wilcox',
	'Christoph Hellwig', 'Andrew Morton',
	'Andy Shevchenko', 'Dan Carpenter',
	'Jason A . Donenfeld', 'pedro.falcato@gmail.com',
	'Mateusz Guzik', 'linux-mm@kvack.org',
	'Lorenzo Stoakes'

Some tidyups and minor changes to minmax.h.

Patches 1, 2 and 5 have no functional changes.
Patch 3 changes the statically_true() tests in __types_ok() to use the
  local 'unique' variables rather than the caller supplied expressions.
  This will reduce the line length of the preprocessor output.
Patch 4 uses statically_true() for clamp's (lo) < (hi) check.
Patch 6 passes '__auto_type' as the 'fixed type' to reduce the number
  of variants.
Patch 7 removes a level of indirection from __sign_use() and 
  __is_nonneg().

David Laight (7):
  1) Add whitespace around operators and after commas
  2) Update some comments
  3) Reduce the #define expansion of min(), max() and clamp()
  4) Use BUILD_BUG_ON_MSG() for the lo < hi test in clamp()
  5) Move all the clamp() definitions after the min/max() ones.
  6) Simplify the variants of clamp()
  7) Remove some #defines that are only expanded once

 include/linux/minmax.h | 205 +++++++++++++++++++----------------------
 1 file changed, 95 insertions(+), 110 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] 33+ messages in thread

end of thread, other threads:[~2025-01-21  5:58 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-18 19:09 [PATCH next 0/7] minmax.h: Cleanups and minor optimisations David Laight
2024-11-18 19:11 ` [PATCH next 1/7] minmax.h: Add whitespace around operators and after commas David Laight
2024-11-18 19:12 ` [PATCH next 2/7] minmax.h: Update some comments David Laight
2024-11-18 19:12 ` [PATCH next 3/7] minmax.h: Reduce the #define expansion of min(), max() and clamp() David Laight
2024-11-18 19:13 ` [PATCH next 4/7] minmax.h: Use BUILD_BUG_ON_MSG() for the lo < hi test in clamp() David Laight
2025-01-18 16:13   ` Buiild error in i915/xe (was: [PATCH next 4/7] minmax.h: Use BUILD_BUG_ON_MSG() for the lo < hi test in clamp()) Guenter Roeck
2025-01-18 17:09     ` David Laight
2025-01-18 17:49       ` Guenter Roeck
2025-01-18 18:09         ` David Laight
2025-01-18 18:36           ` Buiild error in i915/xe Guenter Roeck
2025-01-18 21:18             ` David Laight
2025-01-18 21:38               ` Guenter Roeck
2025-01-18 21:21         ` Buiild error in i915/xe (was: [PATCH next 4/7] minmax.h: Use BUILD_BUG_ON_MSG() for the lo < hi test in clamp()) Linus Torvalds
2025-01-18 21:59           ` Buiild error in i915/xe Guenter Roeck
2025-01-18 22:04             ` Linus Torvalds
2025-01-18 22:11           ` Buiild error in i915/xe (was: [PATCH next 4/7] minmax.h: Use BUILD_BUG_ON_MSG() for the lo < hi test in clamp()) David Laight
2025-01-18 22:58             ` Buiild error in i915/xe Guenter Roeck
2025-01-19  9:09               ` David Laight
2025-01-20 10:48                 ` Jani Nikula
2025-01-20 11:15                   ` David Laight
2025-01-20 11:21                     ` Jani Nikula
2025-01-20 14:15                       ` Guenter Roeck
2025-01-20 18:41                         ` David Laight
2025-01-20 18:55                           ` Andy Shevchenko
2025-01-20 19:14                             ` Linus Torvalds
2025-01-21  5:58                               ` Guenter Roeck
2025-01-18 23:24             ` Buiild error in i915/xe (was: [PATCH next 4/7] minmax.h: Use BUILD_BUG_ON_MSG() for the lo < hi test in clamp()) Pedro Falcato
2024-11-18 19:14 ` [PATCH next 5/7] minmax.h: Move all the clamp() definitions after the min/max() ones David Laight
2024-11-18 19:15 ` [PATCH next 6/7] minmax.h: Simplify the variants of clamp() David Laight
2024-11-22 20:20   ` kernel test robot
2024-11-28 15:05   ` kernel test robot
2024-11-28 15:52     ` David Laight
2024-11-18 19:15 ` [PATCH next 7/7] minmax.h: Remove some #defines that are only expanded once David Laight

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox