From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Rupesh Majhi <zoone.rupert@gmail.com>
Cc: "Andy Shevchenko" <andy@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Jishnu Prakash" <jishnu.prakash@oss.qualcomm.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"Nuno Sá" <nuno.sa@analog.com>,
linux-arm-msm@vger.kernel.org, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org, "Marco Elver" <elver@google.com>,
"Bart Van Assche" <bvanassche@acm.org>
Subject: Re: [PATCH v2] iio: adc: qcom-spmi-adc5-gen3: fix lock annotations on mutex helpers
Date: Wed, 21 Oct 2026 17:23:44 +0300 [thread overview]
Message-ID: <atjK8DW-XLQ5gepC@ashevche-desk.local> (raw)
In-Reply-To: <20261021052435.112686-1-zoone.rupert@gmail.com>
On Wed, Oct 21, 2026 at 08:24:35AM +0300, Rupesh Majhi wrote:
> Since commit 5b63d0ae94cc ("compiler-context-analysis: Remove Sparse
> support"), __acquires() and __releases() only feed context analysis.
> Their argument is parsed before the function body, where only dev is in
> scope, so with analysis enabled for this file the build fails:
>
> error: use of undeclared identifier 'adc'
>
> These helpers take and drop the lock for the ADC_TM driver, which only
> sees their declarations in the header. Naming the lock there would
> mean exposing struct adc5_chip, and with no annotation at all the
> analysis flags the unbalanced locking. Mark both __context_unsafe().
>
> Fixes: baff45179e90 ("iio: adc: Add support for QCOM PMIC5 Gen3 ADC")
> Cc: Marco Elver <elver@google.com>
> Cc: Bart Van Assche <bvanassche@acm.org>
Move Cc list after the '---' line (similar to the changelog block below),
it will have the same effect on email headers, but won't pollute the commit
message.
> Assisted-by: LLM
As of today we killed that tag, drop it.
> Signed-off-by: Rupesh Majhi <zoone.rupert@gmail.com>
> ---
> v2: explain __context_unsafe() in commit message (Andy)
> v1: https://lore.kernel.org/linux-iio/20261003214516.128573-1-zoone.rupert@gmail.com/
>
> Found by building with CONTEXT_ANALYSIS_qcom-spmi-adc5-gen3.o=y, which the
> driver does not set today. Build tested only, no hardware here.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-10-21 14:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-21 5:24 Rupesh Majhi
2026-10-21 14:23 ` Andy Shevchenko [this message]
2026-10-21 15:15 ` Bart Van Assche
2026-10-21 18:19 ` Rupesh Majhi
2026-10-21 19:24 ` Jonathan Cameron
2026-10-23 6:47 ` Rupesh Majhi
2026-10-24 2:30 ` Jonathan Cameron
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=atjK8DW-XLQ5gepC@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=bvanassche@acm.org \
--cc=dlechner@baylibre.com \
--cc=elver@google.com \
--cc=jic23@kernel.org \
--cc=jishnu.prakash@oss.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=zoone.rupert@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
all inboxes | Powered by JetHome®