From: Sven Peter <sven@kernel.org>
To: Janne Grunau <j@jannau.net>, Neal Gompa <neal@gompa.dev>
Cc: asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Sven Peter <sven@kernel.org>
Subject: [PATCH] soc: apple: Fix swapped paddr and size shift
Date: Sun, 08 Nov 2026 15:35:11 +0100 [thread overview]
Message-ID: <20261108-b4-sart-fix-v1-1-dab7dc1e9adb@kernel.org> (raw)
Right now we assign the paddr shift to the size shift and vice-versa.
Luckily, this doesn't matter because they are the same for all SART
versions but fixing this doesn't hurt.
Fixes: b170143ae111 ("soc: apple: Add SART driver")
Signed-off-by: Sven Peter <sven@kernel.org>
---
drivers/soc/apple/sart.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/soc/apple/sart.c b/drivers/soc/apple/sart.c
index 66b99955b395..5f1f9ec5d311 100644
--- a/drivers/soc/apple/sart.c
+++ b/drivers/soc/apple/sart.c
@@ -258,8 +258,8 @@ static int sart_set_entry(struct apple_sart *sart, int index, u8 flags,
if (paddr & ((1 << sart->ops->paddr_shift) - 1))
return -EINVAL;
- paddr >>= sart->ops->size_shift;
- size >>= sart->ops->paddr_shift;
+ paddr >>= sart->ops->paddr_shift;
+ size >>= sart->ops->size_shift;
if (size > sart->ops->size_max)
return -EINVAL;
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261108-b4-sart-fix-5bd3c614af66
Best regards,
--
Sven Peter <sven@kernel.org>
next reply other threads:[~2026-11-08 14:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-08 14:35 Sven Peter [this message]
2026-11-08 14:58 ` Janne Grunau
2026-11-08 15:07 ` Sven Peter
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=20261108-b4-sart-fix-v1-1-dab7dc1e9adb@kernel.org \
--to=sven@kernel.org \
--cc=asahi@lists.linux.dev \
--cc=j@jannau.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neal@gompa.dev \
/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®