linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Richard Henderson' <richard.henderson@linaro.org>,
	Julian Vetter <jvetter@kalrayinc.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Russell King <linux@armlinux.org.uk>,
	Catalin Marinas <catalin.marinas@arm.com>,
	"Will Deacon" <will@kernel.org>, Guo Ren <guoren@kernel.org>,
	Huacai Chen <chenhuacai@kernel.org>,
	WANG Xuerui <kernel@xen0n.name>,
	Andrew Morton <akpm@linux-foundation.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	"Ivan Kokshaysky" <ink@jurassic.park.msu.ru>,
	Matt Turner <mattst88@gmail.com>,
	"James E . J . Bottomley" <James.Bottomley@hansenpartnership.com>,
	"Helge Deller" <deller@gmx.de>,
	Yoshinori Sato <ysato@users.sourceforge.jp>,
	"Rich Felker" <dalias@libc.org>,
	John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
	Richard Weinberger <richard@nod.at>,
	"Anton Ivanov" <anton.ivanov@cambridgegreys.com>,
	Johannes Berg <johannes@sipsolutions.net>
Cc: "linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-csky@vger.kernel.org" <linux-csky@vger.kernel.org>,
	"loongarch@lists.linux.dev" <loongarch@lists.linux.dev>,
	"linux-m68k@lists.linux-m68k.org"
	<linux-m68k@lists.linux-m68k.org>,
	"linux-alpha@vger.kernel.org" <linux-alpha@vger.kernel.org>,
	"linux-parisc@vger.kernel.org" <linux-parisc@vger.kernel.org>,
	"linux-sh@vger.kernel.org" <linux-sh@vger.kernel.org>,
	"linux-um@lists.infradead.org" <linux-um@lists.infradead.org>,
	"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
	Yann Sionneau <ysionneau@kalrayinc.com>
Subject: RE: [PATCH v7 01/10] Consolidate IO memcpy/memset into iomap_copy.c
Date: Sun, 6 Oct 2024 18:50:48 +0000	[thread overview]
Message-ID: <5bbdbf01d4584a14ae1e16281eb95837@AcuMS.aculab.com> (raw)
In-Reply-To: <a4f85184-73d4-44e4-bddd-0c1775ed9f50@linaro.org>

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)

  reply	other threads:[~2024-10-06 18:51 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-30 13:23 [PATCH v7 00/10] Consolidate IO memcpy functions Julian Vetter
2024-09-30 13:23 ` [PATCH v7 01/10] Consolidate IO memcpy/memset into iomap_copy.c Julian Vetter
2024-10-03  4:23   ` kernel test robot
2024-10-03 16:46   ` Richard Henderson
2024-10-06 18:50     ` David Laight [this message]
2024-09-30 13:23 ` [PATCH v7 02/10] arm64: Use generic IO memcpy/memset Julian Vetter
2024-09-30 13:23 ` [PATCH v7 03/10] csky: " Julian Vetter
2024-09-30 13:23 ` [PATCH v7 04/10] loongarch: " Julian Vetter
2024-09-30 13:23 ` [PATCH v7 05/10] m68k: Align prototypes of " Julian Vetter
2024-09-30 17:46   ` Geert Uytterhoeven
2024-09-30 13:23 ` [PATCH v7 06/10] alpha: " Julian Vetter
2024-10-03 14:46   ` Richard Henderson
2024-09-30 13:23 ` [PATCH v7 07/10] parisc: " Julian Vetter
2024-10-03 14:49   ` Richard Henderson
2024-09-30 13:23 ` [PATCH v7 08/10] sh: " Julian Vetter
2024-09-30 17:52   ` Geert Uytterhoeven
2024-09-30 13:23 ` [PATCH v7 09/10] um: Add dummy implementation for " Julian Vetter
2024-10-01 12:53   ` Johannes Berg
2024-10-07  7:49     ` Julian Vetter
2024-10-07  8:06       ` Johannes Berg
2024-09-30 13:23 ` [PATCH v7 10/10] arm: Align prototype of IO memset Julian Vetter
2024-09-30 17:50   ` Geert Uytterhoeven
2024-10-01 12:46 ` [PATCH v7 00/10] Consolidate IO memcpy functions Niklas Schnelle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5bbdbf01d4584a14ae1e16281eb95837@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=akpm@linux-foundation.org \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=chenhuacai@kernel.org \
    --cc=dalias@libc.org \
    --cc=deller@gmx.de \
    --cc=geert@linux-m68k.org \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=guoren@kernel.org \
    --cc=ink@jurassic.park.msu.ru \
    --cc=johannes@sipsolutions.net \
    --cc=jvetter@kalrayinc.com \
    --cc=kernel@xen0n.name \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-csky@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=linux-um@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=loongarch@lists.linux.dev \
    --cc=mattst88@gmail.com \
    --cc=richard.henderson@linaro.org \
    --cc=richard@nod.at \
    --cc=will@kernel.org \
    --cc=ysato@users.sourceforge.jp \
    --cc=ysionneau@kalrayinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).