mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rupesh Majhi <zoone.rupert@gmail.com>
To: andriy.shevchenko@intel.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
Subject: Re: [PATCH] iio: adc: qcom-spmi-adc5-gen3: fix lock annotations on mutex helpers
Date: Mon, 19 Oct 2026 00:38:12 +0300	[thread overview]
Message-ID: <20261018213812.56858-1-zoone.rupert@gmail.com> (raw)
In-Reply-To: <asIRkK-uUz4FKQBN@ashevche-desk.local>

On Sun, Oct 04, 2026 at 11:42:56AM +0300, Andy Shevchenko wrote:
> On Sun, Oct 04, 2026 at 12:45:16AM +0300, Rupesh Majhi wrote:
> > The __acquires() and __releases() on adc5_gen3_mutex_lock() and
> > adc5_gen3_mutex_unlock() name adc, a local declared in the body. With
> > context analysis enabled for this file, the build fails:
> >
> >   error: use of undeclared identifier 'adc'
> >
> > The lock and unlock are split across these two helpers for the ADC_TM
> > driver, so mark them __context_unsafe() instead.
>
> Doesn't sound right to me. The __acquires() and __releases() IIRC are sparse
> annotations. If clang has something special, it needs to be addressed in
> the compiler-clang.h, no?

Sparse support for them went away in v7.0 with 5b63d0ae94cc
("compiler-context-analysis: Remove Sparse support"). They are now
defined in compiler-context-analysis.h and expand to clang's
acquire_capability() and release_capability(), or to nothing.

The argument is parsed at the declaration, where only dev is in scope,
so no header change can make adc visible there.

Sorry for the slow reply.

  reply	other threads:[~2026-10-18 21:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-03 21:45 Rupesh Majhi
2026-10-04  8:42 ` Andy Shevchenko
2026-10-18 21:38   ` Rupesh Majhi [this message]
2026-10-19 10:01     ` Andy Shevchenko
2026-10-18 23:45   ` 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=20261018213812.56858-1-zoone.rupert@gmail.com \
    --to=zoone.rupert@gmail.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.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 \
    /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®