]> www.infradead.org Git - users/hch/block.git/commit
minmax: simplify and clarify min_t()/max_t() implementation
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 28 Jul 2024 20:50:01 +0000 (13:50 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 28 Jul 2024 20:50:01 +0000 (13:50 -0700)
commit017fa3e89187848fd056af757769c9e66ac3e93d
treece3cd30c5a05f86b0573d19e612d47efa2b27dd9
parent4477b39c32fdc03363affef4b11d48391e6dc9ff
minmax: simplify and clarify min_t()/max_t() implementation

This simplifies the min_t() and max_t() macros by no longer making them
work in the context of a C constant expression.

That means that you can no longer use them for static initializers or
for array sizes in type definitions, but there were only a couple of
such uses, and all of them were converted (famous last words) to use
MIN_T/MAX_T instead.

Cc: David Laight <David.Laight@aculab.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/minmax.h