Re: [PATCH v1 1/1] x86/percpu: Cast -1 to argument type when comparing in percpu_add_op()

Dave Hansen
2024-10-23T17:15:14Z

On 10/22/24 16:24, Christoph Lameter (Ampere) wrote:
> On Tue, 22 Oct 2024, Dave Hansen wrote:
>
>> So I think Peter's version was the best. It shuts up clang and also
>> preserves the existing (good) gcc 'sub' behavior. I'll send it out for
>> real in a bit, but I'm thinking of something like the attached patch.
> The desired behavior is a "dec". "sub" has a longer op code AFAICT.

Gah, yes, of course. I misspoke.

We want "inc" and "dec" for +1 and -1. "add" and "sub" are heftier and
get used for everything else.