[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=whr-iSsxEZ4fYfkQzs7XQN=aQhbZQKGEMnZiGdrDgLKPQ@mail.gmail.com>
Date: Fri, 4 Aug 2023 11:14:07 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: David Laight <David.Laight@...lab.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 v3 5/5] minmax: Relax check to allow comparison between
int and small unsigned constants.
On Fri, 4 Aug 2023 at 03:56, David Laight <David.Laight@...lab.com> wrote:
>
> Convert constants between 0 and INT_MAX to 'int' prior to comparisons
> so that min(signed_var, 20u) and, more commonly, min(signed_var, sizeof())
> are both valid.
I really think this whole series is broken.
What does the "are both valid" even *MEAN*?
It's simply not valid to do a "min(int, 20u)". What is the meaning of
it? You seem to think that the meaning is to do the operation in
"int". Why?
You made up a definition of "valid" that I think is completely invalid.
Linus
Powered by blists - more mailing lists