[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5bbdbf01d4584a14ae1e16281eb95837@AcuMS.aculab.com>
Date: Sun, 6 Oct 2024 18:50:48 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Richard Henderson' <richard.henderson@...aro.org>, Julian Vetter
<jvetter@...rayinc.com>, Arnd Bergmann <arnd@...db.de>, Russell King
<linux@...linux.org.uk>, Catalin Marinas <catalin.marinas@....com>, "Will
Deacon" <will@...nel.org>, Guo Ren <guoren@...nel.org>, Huacai Chen
<chenhuacai@...nel.org>, WANG Xuerui <kernel@...0n.name>, Andrew Morton
<akpm@...ux-foundation.org>, Geert Uytterhoeven <geert@...ux-m68k.org>, "Ivan
Kokshaysky" <ink@...assic.park.msu.ru>, Matt Turner <mattst88@...il.com>,
"James E . J . Bottomley" <James.Bottomley@...senpartnership.com>, "Helge
Deller" <deller@....de>, Yoshinori Sato <ysato@...rs.sourceforge.jp>, "Rich
Felker" <dalias@...c.org>, John Paul Adrian Glaubitz
<glaubitz@...sik.fu-berlin.de>, Richard Weinberger <richard@....at>, "Anton
Ivanov" <anton.ivanov@...bridgegreys.com>, Johannes Berg
<johannes@...solutions.net>
CC: "linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "linux-csky@...r.kernel.org"
<linux-csky@...r.kernel.org>, "loongarch@...ts.linux.dev"
<loongarch@...ts.linux.dev>, "linux-m68k@...ts.linux-m68k.org"
<linux-m68k@...ts.linux-m68k.org>, "linux-alpha@...r.kernel.org"
<linux-alpha@...r.kernel.org>, "linux-parisc@...r.kernel.org"
<linux-parisc@...r.kernel.org>, "linux-sh@...r.kernel.org"
<linux-sh@...r.kernel.org>, "linux-um@...ts.infradead.org"
<linux-um@...ts.infradead.org>, "linux-arch@...r.kernel.org"
<linux-arch@...r.kernel.org>, Yann Sionneau <ysionneau@...rayinc.com>
Subject: RE: [PATCH v7 01/10] Consolidate IO memcpy/memset into iomap_copy.c
From: Richard Henderson
> Sent: 03 October 2024 17:47
>
> On 9/30/24 06:23, Julian Vetter wrote:
> > +void memset_io(volatile void __iomem *dst, int c, size_t count)
> > +{
> > + uintptr_t qc = (u8)c;
>
> Missed one change to 'long'
>
> > +
> > + qc |= qc << 8;
> > + qc |= qc << 16;
> > +
> > +#ifdef CONFIG_64BIT
> > + qc |= qc << 32;
> > +#endif
>
> Could be 'qc *= -1ul / 0xff;'
qc *= ~0ul / 0xff;
would be slightly better.
David
>
>
> r~
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists