From: Jonathan Cameron <jic23@kernel.org>
To: Nicholas Mc Guire <der.herr@hofr.at>
Cc: Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald <pmeerw@pmeerw.net>,
Grant Likely <grant.likely@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
"Ivan T. Ivanov" <iivanov@mm-sol.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH RFC] iio: iadc: wait_for_completion_timeout time in jiffies
Date: Sun, 04 Jan 2015 11:16:59 +0000 [thread overview]
Message-ID: <54A9212B.8050709@kernel.org> (raw)
In-Reply-To: <1420016386-19638-1-git-send-email-der.herr@hofr.at>
On 31/12/14 08:59, Nicholas Mc Guire wrote:
> The timeout value to wait_for_completion_timeout is in jiffies but
> the value being passed seems like it was intended to by microseconds
> Note that the timeout was extremely long thus it might be too short
> now. In any case it probably should be passed through usecs_to_jiffies()
> or msecs_to_jiffies()
>
> patch is against linux-next 3.19.0-rc1 -next-20141226
>
> patch was only compile-tested x86_64_defcofnig + CONFIG_SPMI=m
> CONFIG_IIO=m, CONFIG_QCOM_SPMI_IADC=m
>
> Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
Certainly suspicious and I'd draw the same conclusion you did!
Anyhow just waiting for Ivan to take a look as it's his driver.
Thanks,
Jonathan
> ---
> drivers/iio/adc/qcom-spmi-iadc.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/qcom-spmi-iadc.c b/drivers/iio/adc/qcom-spmi-iadc.c
> index b9666f2..3080562 100644
> --- a/drivers/iio/adc/qcom-spmi-iadc.c
> +++ b/drivers/iio/adc/qcom-spmi-iadc.c
> @@ -296,7 +296,8 @@ static int iadc_do_conversion(struct iadc_chip *iadc, int chan, u16 *data)
> if (iadc->poll_eoc) {
> ret = iadc_poll_wait_eoc(iadc, wait);
> } else {
> - ret = wait_for_completion_timeout(&iadc->complete, wait);
> + ret = wait_for_completion_timeout(&iadc->complete,
> + usecs_to_jiffies(wait));
> if (!ret)
> ret = -ETIMEDOUT;
> else
>
next prev parent reply other threads:[~2015-01-04 11:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-31 8:59 [PATCH RFC] iio: iadc: wait_for_completion_timeout time in jiffies Nicholas Mc Guire
2015-01-04 11:16 ` Jonathan Cameron [this message]
2015-01-05 15:33 ` Ivan T. Ivanov
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=54A9212B.8050709@kernel.org \
--to=jic23@kernel.org \
--cc=der.herr@hofr.at \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=iivanov@mm-sol.com \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--cc=robh+dt@kernel.org \
/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