From: Jonathan Cameron <jic23@kernel.org>
To: Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
agross@kernel.org, andersson@kernel.org,
dmitry.baryshkov@linaro.org, konradybcio@kernel.org,
daniel.lezcano@linaro.org, sboyd@kernel.org, amitk@kernel.org,
thara.gopinath@gmail.com, lee@kernel.org, rafael@kernel.org,
subbaraman.narayanamurthy@oss.qualcomm.com,
david.collins@oss.qualcomm.com,
anjelique.melendez@oss.qualcomm.com, quic_kamalw@quicinc.com,
rui.zhang@intel.com, lukasz.luba@arm.com, lars@metafoo.de,
devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-pm@vger.kernel.org, cros-qcom-dts-watchers@chromium.org,
quic_skakitap@quicinc.com, neil.armstrong@linaro.org
Subject: Re: [PATCH V5 4/5] iio: adc: Add support for QCOM PMIC5 Gen3 ADC
Date: Tue, 4 Mar 2025 00:09:31 +0000 [thread overview]
Message-ID: <20250304000931.5be25de1@jic23-huawei> (raw)
In-Reply-To: <449712bb-961e-4ccf-bf74-50dd55315abc@oss.qualcomm.com>
On Mon, 3 Mar 2025 19:26:37 +0530
Jishnu Prakash <jishnu.prakash@oss.qualcomm.com> wrote:
> Hi Jonathan,
>
> On 3/1/2025 8:55 AM, Jonathan Cameron wrote:
> > On Wed, 26 Feb 2025 14:22:05 +0530
> > Jishnu Prakash <jishnu.prakash@oss.qualcomm.com> wrote:
> >
> ...
> >>>> +void adc5_take_mutex_lock(struct device *dev, bool lock)
> >>>> +{
> >>>> + struct iio_dev *indio_dev = dev_get_drvdata(dev->parent);
> >>>> + struct adc5_chip *adc = iio_priv(indio_dev);
> >>>> +
> >>>> + if (lock)
> >>>> + mutex_lock(&adc->lock);
> >>>> + else
> >>>> + mutex_unlock(&adc->lock);
> >>>> +}
> >>>> +EXPORT_SYMBOL_NS_GPL(adc5_take_mutex_lock, "QCOM_SPMI_ADC5_GEN3");
> >>>
> >>> This is potentially going to make a mess for sparse. Might be better to split
> >>> it in two so you can had __acquires and __releases markings.
> >>>
> >>> If you don't get any warnings with sparse then I guess we are fine.
> >>>
> >>
> >> I had tried building with sparse in my local workspace and I did not get any errors in this file. Do you think I can keep this unchanged?
> >> Also, would any kernel bots run sparse later on this patch, if it's not already done?
> >
> > Problems around this tend to turn up a bit late in build tests as requires
> > particular combinations of features. Here you may not see problems because
> > sparse can't see far enough to understand the locking.
> >
> > I would still split this into lock / unlock as that matches better
> > with common syntax for locks. We can then add markings
> > as necessary later.
> >
>
> OK, I can split this into separate lock and unlock functions.
> And for markings, you mean I should add these:
>
> __acquires(&adc->lock)
> __releases(&adc->lock)
>
> under the lock and unlock functions respectively?
yes
>
> Thanks,
> Jishnu
>
> >>>> +/*
> >>>
> >>> Looks like valid kernel doc, so /** and check it builds fine
> >>> with the kernel-doc script.
> >>>
>
next prev parent reply other threads:[~2025-03-04 0:09 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-31 18:32 [PATCH V5 0/5] Add support for QCOM SPMI PMIC5 Gen3 ADC Jishnu Prakash
2025-01-31 18:32 ` [PATCH V5 1/5] dt-bindings: iio/adc: Move QCOM ADC bindings to iio/adc folder Jishnu Prakash
2025-01-31 19:41 ` Rob Herring (Arm)
2025-02-02 13:29 ` Krzysztof Kozlowski
2025-02-26 8:51 ` Jishnu Prakash
2025-02-26 9:11 ` Krzysztof Kozlowski
2025-03-03 13:56 ` Jishnu Prakash
2025-03-10 14:19 ` Jishnu Prakash
2025-01-31 18:32 ` [PATCH V5 2/5] dt-bindings: iio: adc: Split out QCOM VADC channel properties Jishnu Prakash
2025-01-31 19:41 ` Rob Herring (Arm)
2025-02-02 13:32 ` Krzysztof Kozlowski
2025-01-31 18:32 ` [PATCH V5 3/5] dt-bindings: iio: adc: Add support for QCOM PMIC5 Gen3 ADC Jishnu Prakash
2025-01-31 19:42 ` Rob Herring (Arm)
2025-02-01 11:33 ` Jonathan Cameron
2025-02-26 8:51 ` Jishnu Prakash
2025-02-02 13:38 ` Krzysztof Kozlowski
2025-02-26 8:51 ` Jishnu Prakash
2025-02-26 9:42 ` Krzysztof Kozlowski
2025-01-31 18:32 ` [PATCH V5 4/5] " Jishnu Prakash
2025-02-01 10:06 ` kernel test robot
2025-02-01 12:11 ` Jonathan Cameron
2025-02-26 8:52 ` Jishnu Prakash
2025-03-01 3:25 ` Jonathan Cameron
2025-03-03 13:56 ` Jishnu Prakash
2025-03-04 0:09 ` Jonathan Cameron [this message]
2025-02-01 23:36 ` kernel test robot
2025-01-31 18:32 ` [PATCH V5 5/5] thermal: qcom: add support for PMIC5 Gen3 ADC thermal monitoring Jishnu Prakash
2025-02-01 12:27 ` Jonathan Cameron
2025-02-26 8:52 ` Jishnu Prakash
2025-03-01 3:29 ` 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=20250304000931.5be25de1@jic23-huawei \
--to=jic23@kernel.org \
--cc=agross@kernel.org \
--cc=amitk@kernel.org \
--cc=andersson@kernel.org \
--cc=anjelique.melendez@oss.qualcomm.com \
--cc=conor+dt@kernel.org \
--cc=cros-qcom-dts-watchers@chromium.org \
--cc=daniel.lezcano@linaro.org \
--cc=david.collins@oss.qualcomm.com \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=jishnu.prakash@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=lee@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=neil.armstrong@linaro.org \
--cc=quic_kamalw@quicinc.com \
--cc=quic_skakitap@quicinc.com \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=rui.zhang@intel.com \
--cc=sboyd@kernel.org \
--cc=subbaraman.narayanamurthy@oss.qualcomm.com \
--cc=thara.gopinath@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