Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm

Pull ARM fixes from Russell King:
"A couple of ARM fixes from Linus for the ICST clock generator code"

[ "Linus" here is Linus Walleij. Name-stealer.

Linus "there can be only one" Torvalds ]

* 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
ARM: 8519/1: ICST: try other dividends than 1
ARM: 8517/1: ICST: avoid arithmetic overflow in icst_hz()

+7 -2
+7 -2
arch/arm/common/icst.c
··· 16 16 */ 17 17 #include <linux/module.h> 18 18 #include <linux/kernel.h> 19 - 19 + #include <asm/div64.h> 20 20 #include <asm/hardware/icst.h> 21 21 22 22 /* ··· 29 29 30 30 unsigned long icst_hz(const struct icst_params *p, struct icst_vco vco) 31 31 { 32 - return p->ref * 2 * (vco.v + 8) / ((vco.r + 2) * p->s2div[vco.s]); 32 + u64 dividend = p->ref * 2 * (u64)(vco.v + 8); 33 + u32 divisor = (vco.r + 2) * p->s2div[vco.s]; 34 + 35 + do_div(dividend, divisor); 36 + return (unsigned long)dividend; 33 37 } 34 38 35 39 EXPORT_SYMBOL(icst_hz); ··· 62 58 63 59 if (f > p->vco_min && f <= p->vco_max) 64 60 break; 61 + i++; 65 62 } while (i < 8); 66 63 67 64 if (i >= 8)