From: Breno Rodrigues Alves <breno3011alves@gmail.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: linux@armlinux.org.uk, James.Bottomley@HansenPartnership.com,
mkp@kernel.org, linux-arm-kernel@lists.infradead.org,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
Breno Rodrigues Alves <breno3011alves@gmail.com>
Subject: Re: [PATCH v2] scsi: arm: Convert acornscsi-io.S to C
Date: Thu, 22 Oct 2026 18:02:03 -0300 [thread overview]
Message-ID: <20261022210203.80641-1-breno3011alves@gmail.com> (raw)
In-Reply-To: <4e2383f0-9791-4840-a4d9-93fbe51b7a40@acm.org>
Hi Bart,
> Shouldn't this "while" be changed into "if"?
Yes. After the preceding while (length >= 4) loop, length is in
{0, 1, 2, 3}, so the trailing loop runs at most once. The same
applies to the corresponding loop in __acornscsi_in(); both are now
'if' in v4.
> The above code can be simplified as shown below, isn't it?
>
> void __iomem *cp = (void __iomem *)card;
>
> writeb(buf[0], cp);
> writeb(buf[1], cp + 1);
Agreed. v4 drops get_unaligned_le16() in __acornscsi_out() and
writes the two bytes directly. Note that __acornscsi_in() still
needs put_unaligned_le16() because the bytes come from the low
half of the 32-bit card word and buf may be unaligned.
> Isn't the above (void __iomem *) cast superfluous?
Yes. u32 __iomem * converts implicitly to void __iomem *. Removed
in v4. The cast on the earlier 'cp' variable is kept because cp is
used for byte-level pointer arithmetic (cp + 1 must advance one
byte, not one 32-bit word).
v4 follows.
next prev parent reply other threads:[~2026-10-22 21:02 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
2026-10-22 20:30 ` Breno Rodrigues Alves
2026-10-22 21:02 ` Breno Rodrigues Alves [this message]
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=20261022210203.80641-1-breno3011alves@gmail.com \
--to=breno3011alves@gmail.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=bvanassche@acm.org \
--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®