lkml.org 
[lkml]   [2011]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv5 1/3] ARM: Translate delay.S into (mostly) C
On 04/06/2011 01:56 AM, Stephen Boyd wrote:
> +void __udelay(unsigned long usecs)
> +{
> + __const_udelay(usecs * ((2199023*HZ)>>11));
This will overflow if HZ=1000.
If I remember correct I fixed it like this:
__const_udelay(usecs * ((2199023UL*HZ)>>11));

/Mattias Wallin


\
 
 \ /
  Last update: 2011-04-06 10:53    [W:0.103 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site