[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c3798bd6c2a644e9b871d6c6956c475e@AcuMS.aculab.com>
Date: Tue, 9 Jan 2024 09:41:51 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Linus Torvalds' <torvalds@...ux-foundation.org>, Jiri Slaby
<jirislaby@...il.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "Andy
Shevchenko" <andriy.shevchenko@...ux.intel.com>, Andrew Morton
<akpm@...ux-foundation.org>, "Matthew Wilcox (Oracle)" <willy@...radead.org>,
Christoph Hellwig <hch@...radead.org>, "Jason A. Donenfeld" <Jason@...c4.com>
Subject: RE: [PATCH next v4 0/5] minmax: Relax type checks in min() and max().
From: Linus Torvalds
> Sent: 08 January 2024 18:19
...
> That said, I'm sure this thing exists to a smaller degree elsewhere. I
> wonder if we could simplify our min/max type tests..
Could the type-check be moved into one of the debug builds?
That would give the coverage without slowing down all builds?
Adding -Wsign-compare is a PITA until gcc adds value tracking
to it, not just a type check.
Otherwise it bleats about:
int rval = fn();
if (rval < 0)
return rval;
if (rval > unsigned_value)
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists