Re: [PATCH] crypto: hisilicon/sec: use devm_platform_ioremap_resource in sec_map_io

From: Herbert Xu

Date: Sun Jul 26 2026 - 20:36:34 EST


On Tue, Jul 14, 2026 at 06:15:33PM -0700, Rosen Penev wrote:
> Replace the open-coded platform_get_resource() plus devm_ioremap()
> sequence in the SEC_NUM_ADDR_REGIONS loop with
> devm_platform_ioremap_resource(), which fetches the resource, requests
> the region and maps it in one call. Switch the error check to
> IS_ERR()/PTR_ERR() and drop the now-unused struct resource pointer.
>
> The driver only maps indices 0 and 1 (SEC_COMMON, SEC_SAA). On hip07 the
> corresponding reg regions (0xd0000000, 0xd2000000) are 0x10000 each and
> disjoint, so the region reservation added by devm_ioremap_resource() is
> exclusive and does not introduce overlap failures.
>
> Built for arm64 (drivers/crypto/hisilicon/sec/sec_drv.o) with LLVM=1.
>
> Assisted-by: opencode:hy3-free
> Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>
> ---
> drivers/crypto/hisilicon/sec/sec_drv.c | 19 +++----------------
> 1 file changed, 3 insertions(+), 16 deletions(-)

Patch applied. Thanks.
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt