From: 'Wolfram Sang' <wsa@kernel.org>
To: Andrew Gabbasov <andrew_gabbasov@mentor.com>
Cc: linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
Krzysztof Kozlowski <krzk@kernel.org>,
Sergei Shtylyov <sergei.shtylyov@gmail.com>,
Geert Uytterhoeven <geert+renesas@glider.be>
Subject: Re: [PATCH] memory: renesas-rpc-if: Avoid unaligned bus access for HyperFlash
Date: Mon, 27 Sep 2021 11:25:13 +0200 [thread overview]
Message-ID: <YVGN+Z1L8qPQg2uB@shikoro> (raw)
In-Reply-To: <000901d7b1fa$ff9b57f0$fed207d0$@mentor.com>
[-- Attachment #1: Type: text/plain, Size: 1075 bytes --]
Hi Andrew,
> It could make sense if "from" would not change along the function.
Yes. And using a pointer to unsigned long would neither make the code a
lot more readable, I am afraid.
> I don't like #ifdef's inside the function body too, but the problem is that
> "__raw_readq" is defined in arch/arm64/include/asm/io.h unconditionally,
> but in include/asm-generic/io.h under "#ifdef CONFIG_64BIT" only.
I see. Bad luck then :(
> I looked through the whole kernel code too, and unfortunately didn't find
> any similar code that could be re-used or had some parts, extractable as
> a common helper. That's why I ended up with a local custom function,
> at least so far, until it could be found useful by somebody else ;)
Thanks for confirming you also had a look.
Okay, the function is not exactly pretty, but my comments have been
addressed and it fixes a serious bug, so:
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Still, if someone has ideas how to make the function more readable, we
could incrementally improve it.
Kind regards,
Wolfram
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2021-09-27 9:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-22 18:48 [PATCH] memory: renesas-rpc-if: Avoid unaligned bus access for HyperFlash Andrew Gabbasov
2021-09-24 11:12 ` Krzysztof Kozlowski
2021-09-24 12:34 ` Andrew Gabbasov
2021-09-24 12:37 ` Wolfram Sang
2021-09-25 9:54 ` Wolfram Sang
2021-09-25 10:49 ` Andrew Gabbasov
2021-09-27 9:25 ` 'Wolfram Sang' [this message]
2021-09-28 10:35 ` Krzysztof Kozlowski
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=YVGN+Z1L8qPQg2uB@shikoro \
--to=wsa@kernel.org \
--cc=andrew_gabbasov@mentor.com \
--cc=geert+renesas@glider.be \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=sergei.shtylyov@gmail.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