Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1370200
| From | Laxman Dewangan <ldewangan@nvidia.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] regulator: pwm: Try to avoid voltage error in duty cycle calculation |
| Date | 2016-04-03 13:20 +0200 |
| Message-ID | <rjOeu-2w5-29@gated-at.bofh.it> (permalink) |
| References | <rj0KK-nf-1@gated-at.bofh.it> <rj145-vD-7@gated-at.bofh.it> <rjx3Y-6F2-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] regulator: pwm: Try to avoid voltage error in duty cycle calculation Laxman Dewangan <ldewangan@nvidia.com> - 2016-03-31 16:10 +0200
Re: [PATCH] regulator: pwm: Try to avoid voltage error in duty cycle calculation kbuild test robot <lkp@intel.com> - 2016-04-01 08:30 +0200
Re: [PATCH] regulator: pwm: Try to avoid voltage error in duty cycle calculation Laxman Dewangan <ldewangan@nvidia.com> - 2016-04-01 08:50 +0200
Re: [PATCH] regulator: pwm: Try to avoid voltage error in duty cycle calculation Mark Brown <broonie@kernel.org> - 2016-04-02 19:00 +0200
Re: [PATCH] regulator: pwm: Try to avoid voltage error in duty cycle calculation Laxman Dewangan <ldewangan@nvidia.com> - 2016-04-03 13:20 +0200
Re: [PATCH] regulator: pwm: Try to avoid voltage error in duty cycle calculation Mark Brown <broonie@kernel.org> - 2016-04-04 18:30 +0200
csiph-web