Re: [PATCH] mfd: altera-sysmgr: Fix a mistake caused by resource_size function

From: Lee Jones
Date: Mon Oct 18 2021 - 10:16:38 EST


On Wed, 06 Oct 2021, Kai Song wrote:

> Fixes: d12edf9661a4 ("mfd: altera-sysmgr: Use resource_size function on resource object")
>
> The resource_size defines that:
> res->end - res->start + 1;
> The origin original code is:
> sysmgr_config.max_register = res->end - res->start - 3;
>
> So, the correct fix is that:
> sysmgr_config.max_register = resource_size(res) - 4;
>
> Signed-off-by: Kai Song <songkai01@xxxxxxxxxx>
> ---
> drivers/mfd/altera-sysmgr.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog