From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Matheus Giarola <matheustpgiarola@gmail.com>
Cc: lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org,
dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
matheusgiarola@usp.br, arthurpilone@usp.br,
davidbtadokoro@ime.usp.br
Subject: Re: [PATCH v2] iio: adc: ad7280a: replace mutex_lock() with guard(mutex)
Date: Tue, 31 Mar 2026 22:24:48 +0300 [thread overview]
Message-ID: <acwfgI6LCjPZi5KS@ashevche-desk.local> (raw)
In-Reply-To: <20260331153159.204124-1-matheusgiarola@usp.br>
On Tue, Mar 31, 2026 at 12:31:59PM -0300, Matheus Giarola wrote:
> Use guard(mutex) instead of mutex_lock()/mutex_unlock(),
> ensuring the mutex is released automatically when leaving
> the function scope. The change improves error handling and
> avoids issues such as missing unlocks. It also simplifies the
> code by removing 'err_unlock' label and several mutex_unlock()
> calls.
>
> As suggested, in ad7280_read_raw(), wrap the IIO_CHAN_INFO_RAW
> case in braces, providing a scope for the implicit variable
> declared by guard(mutex).
...
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202603210357.KTWqlL36-lkp@intel.com/
> Closes: https://lore.kernel.org/oe-kbuild-all/202603210411.t4KwH3aX-lkp@intel.com/
It can't be right. The bugs LKP reported are in your patch and not in the Linux
kernel as of today.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-03-31 19:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-31 15:31 Matheus Giarola
2026-03-31 19:24 ` Andy Shevchenko [this message]
2026-04-02 3:06 ` Matheus Giarola
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=acwfgI6LCjPZi5KS@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=arthurpilone@usp.br \
--cc=davidbtadokoro@ime.usp.br \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matheusgiarola@usp.br \
--cc=matheustpgiarola@gmail.com \
--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
all inboxes | Powered by JetHome®