[PATCH v2] firmware: arm_scmi: Queue in scmi layer for mailbox implementation
Florian Fainelli
florian.fainelli at broadcom.com
Mon Oct 14 10:21:28 PDT 2024
On 10/14/24 02:55, Sudeep Holla wrote:
> On Sun, Oct 13, 2024 at 10:26:49AM +0100, Cristian Marussi wrote:
>> On Fri, Oct 11, 2024 at 12:15:07PM -0700, Justin Chen wrote:
>>>
>>> Yes, I see the implementation. Looks like it returns the position in the
>>> ring buffer. I also confirmed with CONFIG_DEBUG_MUTEXES which triggers a
>>> warning.
>>>
>>> What about this?
>>> if (ret >= 0)
>>> ret = 0
>>> else
>>> mutex_unlock(&smbox->chan_lock);
>>>
>>> A bit easier to read IMO.
>>
>> Oh yes much better definitely...or, maybe, even more simply to read:
>>
>> ...
>>
>> mutex_lock(&smbox->chan_lock);
>> ret = mbox_send_message(smbox->chan, xfer);
>> if (ret < 0) {
>> mutex_unlock(&smbox->chan_lock);
>> return ret;
>> }
>>
>> return 0;
>> }
>>
>> .... up to You...not sure what Sudeep prefers...
>>
>
> I like this better. Also I was hoping Justin would send v3 soonish, I want
> to send PR for fixes soon. So I have gone ahead and fixed all your comments
> myself. I had seen the doxygen one from builder already and had fixed it up
> last week when I added this to -next.
>
Here's his v3:
https://lore.kernel.org/all/20241014160717.1678953-1-justin.chen@broadcom.com/
we are on the other side of the pond ;)
--
Florian
More information about the linux-arm-kernel
mailing list