From: Bart Van Assche <bvanassche@acm.org>
To: Breno Rodrigues Alves <breno3011alves@gmail.com>, linux@armlinux.org.uk
Cc: James.Bottomley@HansenPartnership.com, mkp@kernel.org,
linux-arm-kernel@lists.infradead.org, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] scsi: arm: Convert acornscsi-io.S to C
Date: Thu, 22 Oct 2026 12:22:02 -0700 [thread overview]
Message-ID: <4e2383f0-9791-4840-a4d9-93fbe51b7a40@acm.org> (raw)
In-Reply-To: <20261022185224.60700-2-breno3011alves@gmail.com>
On 10/22/26 11:52 AM, Breno Rodrigues Alves wrote:
> + while (length >= 16) {
> + u32 w0 = readl(card + 0), w1 = readl(card + 1);
> + u32 w2 = readl(card + 2), w3 = readl(card + 3);
> + u32 w4 = readl(card + 4), w5 = readl(card + 5);
> + u32 w6 = readl(card + 6), w7 = readl(card + 7);
> +
> + card += 8;
> +
> + ((u32 *)buf)[0] = (w0 & 0xffff) | (w1 << 16);
> + ((u32 *)buf)[1] = (w2 & 0xffff) | (w3 << 16);
> + ((u32 *)buf)[2] = (w4 & 0xffff) | (w5 << 16);
> + ((u32 *)buf)[3] = (w6 & 0xffff) | (w7 << 16);
> +
> + buf += 16;
> + length -= 16;
> + }
Why eight readl() calls instead of a loop? Additionally, please use
put_unaligned_be32() instead of open-coding it. Is the code below
equivalent to the loop above?
while (length >= 16) {
for (int i = 0; i < 4; i++) {
u16 w0 = readl(card + 0);
u32 w1 = readl(card + 1);
put_unaligned_be32(w0 | (w1 << 16), buf);
card += 2;
buf += 4;
}
length -= 16;
}
Thanks,
Bart.
next prev parent reply other threads:[~2026-10-22 19:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 18:36 [PATCH 0/1] " Breno Rodrigues Alves
2026-10-22 18:36 ` [PATCH] " Breno Rodrigues Alves
2026-10-22 18:52 ` [PATCH v2 0/1] " Breno Rodrigues Alves
2026-10-22 18:52 ` [PATCH v2] " Breno Rodrigues Alves
2026-10-22 19:22 ` Bart Van Assche [this message]
2026-10-22 20:30 ` Breno Rodrigues Alves
2026-10-22 21:02 ` Breno Rodrigues Alves
2026-10-22 20:30 ` [PATCH v3] " Breno Rodrigues Alves
2026-10-22 20:49 ` Bart Van Assche
2026-10-22 21:02 ` [PATCH v4] " Breno Rodrigues Alves
2026-10-22 21:36 ` Bart Van Assche
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=4e2383f0-9791-4840-a4d9-93fbe51b7a40@acm.org \
--to=bvanassche@acm.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=breno3011alves@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mkp@kernel.org \
/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
all inboxes | Powered by JetHome®