[PATCH 01/10] accel/amdxdna: Add a new driver for AMD AI Engine
Lizhi Hou
lizhi.hou at amd.com
Fri Jul 19 20:07:48 UTC 2024
On 7/19/24 12:42, Markus Elfring wrote:
> …
>> +++ b/drivers/accel/amdxdna/amdxdna_pci_drv.c
>> @@ -0,0 +1,118 @@
> …
>> +static int amdxdna_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>> +{
> …
>> + mutex_lock(&xdna->dev_lock);
>> + ret = xdna->dev_info->ops->init(xdna);
>> + mutex_unlock(&xdna->dev_lock);
> …
>
> Under which circumstances would you become interested to apply a statement
> like “guard(mutex)(&xdna->dev_lock);”?
> https://elixir.bootlin.com/linux/v6.10-rc5/source/include/linux/mutex.h#L196
guard looks cleaner. We will use it. Thanks.
Lizhi
>
> Regards,
> Markus
More information about the dri-devel
mailing list