Re: [PATCH v5 4/5] firmware: imx: add driver for NXP EdgeLock Enclave

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



…
> +++ b/drivers/firmware/imx/ele_common.c
> @@ -0,0 +1,264 @@
…
> +int ele_msg_send(struct se_if_priv *priv, void *tx_msg)
> +{
…
> +	if (header->tag == priv->cmd_tag)
> +		lockdep_assert_held(&priv->se_if_cmd_lock);
> +
> +	scoped_guard(mutex, &priv->se_if_lock);
…

I interpret the documentation for this programming interface in the way
that such code may usually be used together with a (compound) statement.
https://elixir.bootlin.com/linux/v6.10-rc7/source/include/linux/cleanup.h#L137

How do you think about to apply a statement like “guard(mutex)(&priv->se_if_lock);” instead?
https://elixir.bootlin.com/linux/v6.10-rc7/source/include/linux/mutex.h#L196

Regards,
Markus





[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux