devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Nicholas Mc Guire <der.herr-kA1LtwSENNE@public.gmane.org>
Cc: Hartmut Knaack <knaack.h-Mmb7MZpHnFY@public.gmane.org>,
	Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>,
	Peter Meerwald <pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org>,
	Grant Likely
	<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	"Ivan T. Ivanov"
	<iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>,
	linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.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-kA1LtwSENNE@public.gmane.org>

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-kA1LtwSENNE@public.gmane.org>
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
> 

  parent reply	other threads:[~2015-01-04 11:16 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
     [not found] ` <1420016386-19638-1-git-send-email-der.herr-kA1LtwSENNE@public.gmane.org>
2015-01-04 11:16   ` Jonathan Cameron [this message]
     [not found]     ` <54A9212B.8050709-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
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-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=der.herr-kA1LtwSENNE@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org \
    --cc=knaack.h-Mmb7MZpHnFY@public.gmane.org \
    --cc=lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org \
    --cc=linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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;
as well as URLs for NNTP newsgroup(s).