public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Eduardo Augusto <eduardoaugustoabc@ime.usp.br>
Cc: jic23@kernel.org, dlechner@baylibre.com, nuno.sa@analog.com,
	andy@kernel.org,
	Gustavo Pagnotta Faria <gustavo.pagnotta@ime.usp.br>,
	Christian Barry <christian.barry@ime.usp.br>,
	linux-iio@vger.kernel.org
Subject: Re: [PATCH] iio: adc: mcp320x: Use guard(mutex) for lock handling
Date: Thu, 23 Apr 2026 14:56:39 +0300	[thread overview]
Message-ID: <aeoI977TRD08FB32@ashevche-desk.local> (raw)
In-Reply-To: <20260422211105.48158-1-eduardoaugustoabc@ime.usp.br>

On Wed, Apr 22, 2026 at 06:11:05PM -0300, Eduardo Augusto wrote:
> Replace the explicit mutex_lock() and mutex_unlock() calls in
> mcp320x_read_raw() with guard(mutex)().
> 
> This simplifies the error handling paths by removing the need for
> the explicit unlock label while keeping the locking semantics
> unchanged.

...

>  #include <linux/mod_devicetable.h>
>  #include <linux/iio/iio.h>
>  #include <linux/regulator/consumer.h>
> +#include <linux/cleanup.h>

Please, start reviewing others' contribution first before making your own.
Also learn from other reviews.

-- 
With Best Regards,
Andy Shevchenko



      reply	other threads:[~2026-04-23 11:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-22 21:11 [PATCH] iio: adc: mcp320x: Use guard(mutex) for lock handling Eduardo Augusto
2026-04-23 11:56 ` Andy Shevchenko [this message]

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=aeoI977TRD08FB32@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=christian.barry@ime.usp.br \
    --cc=dlechner@baylibre.com \
    --cc=eduardoaugustoabc@ime.usp.br \
    --cc=gustavo.pagnotta@ime.usp.br \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=nuno.sa@analog.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