[PATCH v3 4/6] crypto: ti - add driver for MCRC64 engine

Markus Elfring Markus.Elfring at web.de
Tue Jun 11 05:02:52 PDT 2024


…
> +++ b/drivers/crypto/ti/mcrc64.c
…
> +static int mcrc64_probe(struct platform_device *pdev)
> +{
…
> +	platform_set_drvdata(pdev, dev_data);
> +
> +	spin_lock(&mcrc64_dev_list.lock);
> +	list_add(&dev_data->list, &mcrc64_dev_list.dev_list);
> +	spin_unlock(&mcrc64_dev_list.lock);
> +
> +	mutex_lock(&refcnt_lock);
> +	if (!refcnt) {
> +		ret = crypto_register_shashes(algs, ARRAY_SIZE(algs));
…
> +	}
> +	refcnt++;
> +	mutex_unlock(&refcnt_lock);
…

Would you become interested to apply lock guards?
https://elixir.bootlin.com/linux/v6.10-rc2/source/include/linux/cleanup.h#L124

Regards,
Markus



More information about the linux-arm-kernel mailing list