Re: [PATCH 4/7] minmax: Simplify signedness check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 25 Jul 2024 at 02:01, David Laight <David.Laight@xxxxxxxxxx> wrote:
>
> The condition is '>= 0' so it doesn't matter if it is '1' or '0'.

Yes, but that's because the whole conditional is so inexplicably complex.

But the explanation is:

> That gives a 'comparison of unsigned type against 0 is always true' warning.
> (The compiler generates that for code in the unused branches of both
> __builtin_choose_expr() and _Generic().)
> Moving the comparison to the outer level stops all such compiler warnings.

Christ. This whole series is a nightmare of "add complexity to deal
with stupid issues".

But the kernel test robot clearly found even more issues.

I think we need to just go back to the old code. It was stupid and
limited and caused us to have to be more careful about types than was
strictly necessary.

But it was also about a million times simpler, and didn't cause build
time regressions.

             Linus




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux