On Sat, Dec 14, 2024 at 4:10 PM Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote: > On Sat, 14 Dec 2024 at 13:08, David Laight <David.Laight@xxxxxxxxxx> wrote: > > > > Isn't this an example of why -Wsign-compare is entirely stupid and isn't enabled > > in the normal kernel build? > > Yes. Please don't try to "fix" the warnings pointed out by that > completely broken warning. > > I don't understand why some people seem to think "more warnings good". > > -Wsign-compare is actively detrimental, and causes people to write > worse code (and often causes mindless type conversions that then > result in actual real bugs). I'm not going to argue the usefulness of '-Wsign-compare' in a general sense, but I will say that in my opinion the changes proposed by Christian in this patch are correct and an improvement which is why I merged the code. If anyone has an objection to this particular path, especially if you believe this introduces a bug, please let us know. -- paul-moore.com