lkml.org 
[lkml]   [2014]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] pwm: atmel-pwm: fix calculation of prescale value
Hi Thierry,

On Thu, 25 Sep 2014, Thierry Reding wrote:
> Please Cc the linux-pwm@vger.kernel.org mailing list for PWM-related
> patches in the future.

ok, I ran get_maintainer.pl on an old kernel...

> Also a couple more comments:
>
> In the patch description: "pwm frequency" should be "PWM frequency".

ok.

>> + div = (unsigned long long)clk_get_rate(atmel_pwm->clk) * period_ns;
>> + do_div(div, (int)1e9);
>
> 1e9 should be NSEC_PER_SEC.
>

>> - }
>> + div >>= 1;
>> + ++pres;
>
> Unless you really need the prefix increment behaviour (you don't in this
> case) I prefer using the postfix operator because it is slightly more
> idiomatic.

ok (as I mostly do C++ programming, I prefer the prefix as it is usually
more efficient for user-defined types).

> No need for you to respin the patch, I've fixed up the above when
> applying.

Thanks!

Niko



\
 
 \ /
  Last update: 2014-09-25 10:21    [W:0.031 / U:0.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site