Re: [PATCH] [v2] arm64/io: add constant-argument check

From: Arnd Bergmann
Date: Tue Jun 04 2024 - 16:44:38 EST


On Tue, Jun 4, 2024, at 22:12, Jason Gunthorpe wrote:
> On Tue, Jun 04, 2024 at 04:55:37PM +0100, Will Deacon wrote:
>> On Tue, May 28, 2024 at 05:37:11PM +0200, Arnd Bergmann wrote:
>>
>> I think this is superseded by Mark's diff in reply to v1, right?
>>
>> https://lore.kernel.org/r/ZlcODqVXTDh6n0h-@J2N7QTR9R3
>>
>> If so, Mark, please can you post that as a proper patch so that we can
>> get this fixed?
>
> I wouldn't say superseded, but I agree with Mark that we should have
> the __always_inline added to the __iowrite64_copy() and
> __const_memcpy_toio_aligned64() in addition to the stuff here.
>
> When I originally wrote this I copied the fairly common pattern of
> having the builtin_constant_p test inside a macro, but I see now it is
> quite common to put that into an inline. Putting it in the inline is
> definately much better, so I like Arnd's patch.
>
> Arnd can you just make that addition and repost this?
>

Yes, sorry for failing to follow up earlier. I'm doing a little
more build testing now, will send soon.

Arnd