From: Sudeep Holla <sudeep.holla@arm.com>
To: Cristian Marussi <cristian.marussi@arm.com>
Cc: Justin Chen <justin.chen@broadcom.com>,
arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
peng.fan@nxp.com, bcm-kernel-feedback-list@broadcom.com,
florian.fainelli@broadcom.com
Subject: Re: [PATCH v2] firmware: arm_scmi: Queue in scmi layer for mailbox implementation
Date: Mon, 14 Oct 2024 10:55:14 +0100 [thread overview]
Message-ID: <ZwzqguhMBkW1_x2I@bogus> (raw)
In-Reply-To: <ZwuSTVFYAhwD2KYf@pluto>
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.
--
Regards,
Sudeep
next prev parent reply other threads:[~2024-10-14 10:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-09 19:26 [PATCH v2] firmware: arm_scmi: Queue in scmi layer for mailbox implementation Justin Chen
2024-10-11 13:43 ` Cristian Marussi
2024-10-11 16:58 ` Florian Fainelli
2024-10-11 19:15 ` Justin Chen
2024-10-13 9:26 ` Cristian Marussi
2024-10-14 9:55 ` Sudeep Holla [this message]
2024-10-14 17:21 ` Florian Fainelli
2024-10-14 20:29 ` Sudeep Holla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZwzqguhMBkW1_x2I@bogus \
--to=sudeep.holla@arm.com \
--cc=arm-scmi@vger.kernel.org \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=cristian.marussi@arm.com \
--cc=florian.fainelli@broadcom.com \
--cc=justin.chen@broadcom.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=peng.fan@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).