Files
linux-stable-mirror/include/linux
David LaightandGreg Kroah-Hartman 9487d93f17 minmax: relax check to allow comparison between unsigned arguments and signed constants
commit 867046cc70 upstream.

Allow (for example) min(unsigned_var, 20).

The opposite min(signed_var, 20u) is still errored.

Since a comparison between signed and unsigned never makes the unsigned
value negative it is only necessary to adjust the __types_ok() test.

Link: https://lkml.kernel.org/r/633b64e2f39e46bb8234809c5595b8c7@AcuMS.aculab.com
Signed-off-by: David Laight <david.laight@aculab.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Jason A. Donenfeld <Jason@zx2c4.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-02-05 20:14:21 +00:00
..
2024-01-25 15:35:39 -08:00
2024-01-25 15:35:52 -08:00
2023-11-28 17:19:55 +00:00
2023-09-11 15:24:16 -07:00
2024-01-05 15:19:42 +01:00
2023-09-01 00:29:34 +02:00
2023-09-13 10:48:48 +02:00
2023-11-20 11:58:53 +01:00
2023-11-28 17:19:54 +00:00
2023-09-29 17:20:46 -07:00
2023-11-28 17:19:48 +00:00
2023-10-06 11:01:23 +02:00
2023-10-06 11:01:23 +02:00
2024-01-31 16:19:01 -08:00
2023-11-28 17:19:38 +00:00
2024-01-31 16:18:47 -08:00
2023-11-20 11:58:56 +01:00