Re: [PATCH 2/2] i3c: master: Add Nuvoton npcm845 i3c master driver

Markus Elfring
2024-08-04T21:06:01Z

…
> +++ b/drivers/i3c/master/npcm845-i3c-master.c
> @@ -0,0 +1,2364 @@
…
> +static int npcm_i3c_master_do_daa(struct i3c_master_controller *m)
> +{
…
> + int ret, i;
> +
> + mutex_lock(&master->lock);
> + spin_lock_irqsave(&master->req_lock, flags);
…
> + npcm_i3c_master_set_sda_skew(master, 0);
> + spin_unlock_irqrestore(&master->req_lock, flags);
> + mutex_unlock(&master->lock);
…

Under which circumstances would you become interested to apply statements
like the following?

* guard(mutex)(&master->lock);
https://elixir.bootlin.com/linux/v6.11-rc1/source/include/linux/mutex.h#L196

* guard(spinlock_irqsave)(&master->req_lock);
https://elixir.bootlin.com/linux/v6.11-rc1/source/include/linux/spinlock.h#L572

Regards,
Markus