From: Tzung-Bi Shih <tzungbi@kernel.org>
To: Ben Walsh <ben@jubnut.com>
Cc: "Benson Leung" <bleung@chromium.org>,
"Guenter Roeck" <groeck@chromium.org>,
"Dustin L. Howett" <dustin@howett.net>,
"Kieran Levin" <ktl@frame.work>,
"Thomas Weißschuh" <linux@weissschuh.net>,
"Mario Limonciello" <mario.limonciello@amd.com>,
chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/5] platform/chrome: cros_ec_lpc: MEC access can use an AML mutex
Date: Thu, 6 Jun 2024 03:12:57 +0000 [thread overview]
Message-ID: <ZmEpOQmzFv7Quakq@google.com> (raw)
In-Reply-To: <20240605063351.14836-3-ben@jubnut.com>
On Wed, Jun 05, 2024 at 07:33:48AM +0100, Ben Walsh wrote:
> @@ -93,7 +146,9 @@ int cros_ec_lpc_io_bytes_mec(enum cros_ec_lpc_mec_io_type io_type,
> else
> access = ACCESS_TYPE_LONG_AUTO_INCREMENT;
>
> - mutex_lock(&io_mutex);
> + ret = cros_ec_lpc_mec_lock();
> + if (ret)
> + return ret;
>
> /* Initialize I/O at desired address */
> cros_ec_lpc_mec_emi_write_address(offset, access);
> @@ -135,7 +190,9 @@ int cros_ec_lpc_io_bytes_mec(enum cros_ec_lpc_mec_io_type io_type,
> }
>
> done:
> - mutex_unlock(&io_mutex);
> + ret = cros_ec_lpc_mec_unlock();
> + if (ret < 0)
> + return ret;
A nit haven't caught in previous round review:
- `if (ret)` for cros_ec_lpc_mec_lock().
- `if (ret < 0)` for cros_ec_lpc_mec_unlock().
If I see the inconsistency when reading the code, it would take me further
cycles for seeking why. We should fix it.
No need to resend for this; I will fix it for you.
next prev parent reply other threads:[~2024-06-06 3:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-05 6:33 [PATCH v3 0/5] platform/chrome: Fix MEC concurrency problems for Framework Laptop Ben Walsh
2024-06-05 6:33 ` [PATCH v3 1/5] platform/chrome: cros_ec_lpc: MEC access can return error code Ben Walsh
2024-06-05 6:33 ` [PATCH v3 2/5] platform/chrome: cros_ec_lpc: MEC access can use an AML mutex Ben Walsh
2024-06-06 3:12 ` Tzung-Bi Shih [this message]
2024-06-06 5:23 ` Ben Walsh
2024-06-05 6:33 ` [PATCH v3 3/5] platform/chrome: cros_ec_lpc: Add a new quirk for ACPI id Ben Walsh
2024-06-05 6:33 ` [PATCH v3 4/5] platform/chrome: cros_ec_lpc: Add a new quirk for AML mutex Ben Walsh
2024-06-05 6:33 ` [PATCH v3 5/5] platform/chrome: cros_ec_lpc: Add quirks for Framework Laptop Ben Walsh
2024-06-06 3:30 ` [PATCH v3 0/5] platform/chrome: Fix MEC concurrency problems " patchwork-bot+chrome-platform
2024-06-06 3:30 ` patchwork-bot+chrome-platform
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=ZmEpOQmzFv7Quakq@google.com \
--to=tzungbi@kernel.org \
--cc=ben@jubnut.com \
--cc=bleung@chromium.org \
--cc=chrome-platform@lists.linux.dev \
--cc=dustin@howett.net \
--cc=groeck@chromium.org \
--cc=ktl@frame.work \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=mario.limonciello@amd.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