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