public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Troy Mitchell <troymitchell988@gmail.com>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>,
	Andi Shyti <andi.shyti@kernel.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	linux-i2c@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Yongchao Jia <jyc0019@gmail.com>,
	Frank Li <Frank.Li@nxp.com>
Subject: Re: [PATCH v3 1/2] i2c: imx: use guard to take spinlock
Date: Fri, 30 May 2025 08:06:41 +0200	[thread overview]
Message-ID: <aDlK8VH3GRSJCKCk@pengutronix.de> (raw)
In-Reply-To: <20250513-i2c-imx-update-v3-1-817b7426a67e@gmail.com>

On Tue, May 13, 2025 at 02:36:13PM +0800, Troy Mitchell wrote:
> Use guard to automatically release the lock after going out of scope
> instead of calling it manually.
> 
> i2c_imx_slave_handle() can safely be entered with the lock held.
> 
> Refactored the i2c_imx_isr function so that i2c_imx_master_isr
> does not participate in the guard scope
> 
> So Using scoped_guard simplifies the control flow
> by ensuring consistent and automatic unlock,
> which improves readability without affecting correctness.
> 
> Co-developed-by: Yongchao Jia <jyc0019@gmail.com>
> Signed-off-by: Yongchao Jia <jyc0019@gmail.com>
> Reviewed-by: Frank Li <Frank.Li@nxp.com>
> Signed-off-by: Troy Mitchell <troymitchell988@gmail.com>

Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>

Thank you!

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2025-05-30  6:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-13  6:36 [PATCH v3 0/2] i2c: imx: guard and drop prefix Troy Mitchell
2025-05-13  6:36 ` [PATCH v3 1/2] i2c: imx: use guard to take spinlock Troy Mitchell
2025-05-30  6:06   ` Oleksij Rempel [this message]
2025-05-13  6:36 ` [PATCH v3 2/2] i2c: imx: drop master prefix Troy Mitchell
2025-05-14  2:11   ` Carlos Song
2025-05-30  5:59   ` Oleksij Rempel

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=aDlK8VH3GRSJCKCk@pengutronix.de \
    --to=o.rempel@pengutronix.de \
    --cc=Frank.Li@nxp.com \
    --cc=andi.shyti@kernel.org \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=jyc0019@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=troymitchell988@gmail.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