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 v3] scsi: arm: Convert acornscsi-io.S to C
Date: Thu, 22 Oct 2026 13:49:50 -0700 [thread overview]
Message-ID: <5fcd439b-4870-43db-9402-cf2425754db5@acm.org> (raw)
In-Reply-To: <20261022203053.75161-1-breno3011alves@gmail.com>
On 10/22/26 1:30 PM, Breno Rodrigues Alves wrote:
> + while (length >= 2) {
Shouldn't this "while" be changed into "if"?
> + u16 v = get_unaligned_le16(buf);
> + void __iomem *cp = (void __iomem *)card;
> +
> + writeb(v & 0xff, cp);
> + writeb((v >> 8) & 0xff, cp + 1);
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);
> + if (length >= 1)
> + writeb(*buf, (void __iomem *)card);
Isn't the above (void __iomem *) cast superfluous?
Thanks,
Bart.
next prev parent reply other threads:[~2026-10-22 20:49 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
2026-10-22 20:30 ` [PATCH v3] " Breno Rodrigues Alves
2026-10-22 20:49 ` Bart Van Assche [this message]
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=5fcd439b-4870-43db-9402-cf2425754db5@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®