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

Herbert Xu <[email protected]> Mon, 27 Jul 2026 10:33:50 +1000
Newsgroups dev.linux.lists.llvm,org.kernel.vger.linux-crypto,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
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 <[email protected]>
> ---
>  drivers/crypto/hisilicon/sec/sec_drv.c | 19 +++----------------
>  1 file changed, 3 insertions(+), 16 deletions(-)

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