From: Laxman Dewangan <ldewangan@nvidia.com>
To: Mark Brown <broonie@kernel.org>
Cc: kbuild test robot <lkp@intel.com>, <kbuild-all@01.org>,
<lgirdwood@gmail.com>, <linux-kernel@vger.kernel.org>,
Lee Jones <lee.jones@linaro.org>
Subject: Re: [PATCH] regulator: pwm: Try to avoid voltage error in duty cycle calculation
Date: Sun, 3 Apr 2016 16:37:18 +0530 [thread overview]
Message-ID: <5700F966.4000802@nvidia.com> (raw)
In-Reply-To: <20160402165311.GF2350@sirena.org.uk>
On Saturday 02 April 2016 10:23 PM, Mark Brown wrote:
> * PGP Signed by an unknown key
>
> On Fri, Apr 01, 2016 at 12:02:19PM +0530, Laxman Dewangan wrote:
>> On Friday 01 April 2016 11:55 AM, kbuild test robot wrote:
>>>>> pwm-regulator.c:(.text+0x1728d4): undefined reference to `__umoddi3'
>>>>> pwm-regulator.c:(.text+0x1728fd): undefined reference to `__udivdi3'
>> Seems build error is coming from logic
>> u64 req_period
>> unsigned int diff;
>> unsigned int period
>> unsigned int req_diff
>> req_period = req_diff * period;
>> if (req_period % diff == 0)
>> used u64 to avoid overflow in multiplication.
> Yes, you're doing a 64 bit divide so that's kind of expected...
>
Is there any way to resolve this issue?
Otherwise, need to divide by 100 first for the req_diff to get 10x of mV
(instead of uV) and then do calculation with unsigned int only. That way
I can restrict the number to unsigned int.
next prev parent reply other threads:[~2016-04-03 11:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-31 13:52 [PATCH] regulator: pwm: Try to avoid voltage error in duty cycle calculation Laxman Dewangan
2016-04-01 6:13 ` kbuild test robot
2016-04-01 6:25 ` kbuild test robot
2016-04-01 6:32 ` Laxman Dewangan
2016-04-02 16:53 ` Mark Brown
2016-04-03 11:07 ` Laxman Dewangan [this message]
2016-04-04 16:25 ` Mark Brown
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=5700F966.4000802@nvidia.com \
--to=ldewangan@nvidia.com \
--cc=broonie@kernel.org \
--cc=kbuild-all@01.org \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.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;
as well as URLs for NNTP newsgroup(s).