Re: [PATCH] crypto: caam: simplify probe resource and IRQ handling

Herbert Xu <[email protected]>
Newsgroups org.kernel.vger.linux-crypto,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Thu, Jul 30, 2026 at 01:47:22PM -0700, Rosen Penev wrote:
> Convert the interrupt acquisition from irq_of_parse_and_map() to
> platform_get_irq(), which resolves the IRQ from the device's interrupts
> property via of_irq_get(). Flip the error check from testing for zero to
> testing for a negative errno, and drop the now-unused
> caam_jr_irq_dispose_mapping() callback and its devm_add_action_or_reset()
> cleanup, since platform_get_irq() manages the mapping internally.
> 
> Replace the open-coded platform_get_resource() plus devm_ioremap()
> sequence with devm_platform_ioremap_resource(), which fetches the
> resource, requests the region and maps it in one call.
> 
> Each fsl,sec-*-job-ring node has a distinct 0x10000 reg region and
> interrupts property, so the region reservation added by
> devm_ioremap_resource() is exclusive and does not introduce overlap
> failures.
> 
> Assisted-by: opencode:hy3-free
> Signed-off-by: Rosen Penev <[email protected]>
> ---
>  drivers/crypto/caam/jr.c | 46 +++++++++++-----------------------------
>  1 file changed, 12 insertions(+), 34 deletions(-)

Please check the Sashiko comments on this patch:

https://sashiko.dev/#/patchset/20260730204915.1102403-1-rosenp%40gmail.com

Thanks,
-- 
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.