Re: [PATCH] soc: apple: Fix swapped paddr and size shift

From: Janne Grunau

Date: Sun Nov 08 2026 - 09:59:40 EST


On Sun, Nov 08, 2026 at 03:35:11PM +0100, Sven Peter wrote:
> 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@xxxxxxxxxx>
> ---
> 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;

Reviewed-by: Janne Grunau <j@xxxxxxxxxx>

Janne