[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <010a46ba-9dc4-e3e3-7894-b28b312c6ab1@amd.com>
Date: Fri, 19 Jul 2024 13:07:48 -0700
From: Lizhi Hou <lizhi.hou@....com>
To: Markus Elfring <Markus.Elfring@....de>, George Yang <George.Yang@....com>,
Min Ma <min.ma@....com>, Narendra Gutta <VenkataNarendraKumar.Gutta@....com>,
<dri-devel@...ts.freedesktop.org>, Oded Gabbay <ogabbay@...nel.org>
CC: LKML <linux-kernel@...r.kernel.org>, Max Zhen <max.zhen@....com>, "Sonal
Santan" <sonal.santan@....com>
Subject: Re: [PATCH 01/10] accel/amdxdna: Add a new driver for AMD AI Engine
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
Powered by blists - more mailing lists