Re: [PATCH v1 1/1] x86/percpu: Cast -1 to argument type when comparing in percpu_add_op()
From: Dave Hansen
Date: Wed Oct 23 2024 - 13:15:24 EST
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.