From: Jonathan Cameron <jic23@kernel.org>
To: linux-iio@vger.kernel.org
Cc: Rama Krishna Phani A <rphani@codeaurora.org>
Subject: Re: [PATCH 1/2] iio:adc:qcom-spmi-vadc : fix undefined __divdi3
Date: Sun, 8 Jan 2017 11:22:22 +0000 [thread overview]
Message-ID: <bcf621d2-4adb-52c6-d7d0-ef79df847e00@kernel.org> (raw)
In-Reply-To: <20161230182550.12038-1-jic23@kernel.org>
On 30/12/16 18:25, Jonathan Cameron wrote:
> A simple do_div call works here as all the signed 64 bit is
> actually small and unsigned at this point, and the numerator is
> u32.
>
> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Cc: Rama Krishna Phani A <rphani@codeaurora.org>
Hopefully this is fine. It's holding up my pull request so I'm going to
apply this now.
Applied to the togreg branch of iio.git and pushed out as testing.
Jonathan
> ---
> drivers/iio/adc/qcom-spmi-vadc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/qcom-spmi-vadc.c b/drivers/iio/adc/qcom-spmi-vadc.c
> index aaf4caf06505..9da3a8fb7514 100644
> --- a/drivers/iio/adc/qcom-spmi-vadc.c
> +++ b/drivers/iio/adc/qcom-spmi-vadc.c
> @@ -664,7 +664,7 @@ static int vadc_scale_die_temp(struct vadc_priv *vadc,
> if (voltage > 0) {
> prescale = &vadc_prescale_ratios[prop->prescale];
> voltage = voltage * prescale->den;
> - voltage /= (prescale->num * 2);
> + do_div(voltage, prescale->num * 2);
> } else {
> voltage = 0;
> }
>
next prev parent reply other threads:[~2017-01-08 11:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-30 18:25 [PATCH 1/2] iio:adc:qcom-spmi-vadc : fix undefined __divdi3 Jonathan Cameron
2016-12-30 18:25 ` [PATCH 2/2] iio:adc:qcom-spmi-vadc silence a long constant warning Jonathan Cameron
2017-01-08 11:22 ` Jonathan Cameron
2017-01-08 11:22 ` Jonathan Cameron [this message]
2017-01-08 15:15 ` [PATCH 1/2] iio:adc:qcom-spmi-vadc : fix undefined __divdi3 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=bcf621d2-4adb-52c6-d7d0-ef79df847e00@kernel.org \
--to=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=rphani@codeaurora.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).