Re: [PATCH] clk: fractional-divider: cast parent_rate to u64 before multiplying

2014-09-10 Thread Heiko Stübner
Hi Mike, Am Dienstag, 2. September 2014, 09:33:21 schrieb Heiko Stübner: > Am Montag, 1. September 2014, 17:26:29 schrieb Mike Turquette: > > Quoting Heiko Stübner (2014-08-28 03:46:10) > > > > > On 32bit architectures, like ARM calculating the fractional rate will > > > do the multiplication

Re: [PATCH] clk: fractional-divider: cast parent_rate to u64 before multiplying

2014-09-10 Thread Heiko Stübner
Hi Mike, Am Dienstag, 2. September 2014, 09:33:21 schrieb Heiko Stübner: Am Montag, 1. September 2014, 17:26:29 schrieb Mike Turquette: Quoting Heiko Stübner (2014-08-28 03:46:10) On 32bit architectures, like ARM calculating the fractional rate will do the multiplication before

Re: [PATCH] clk: fractional-divider: cast parent_rate to u64 before multiplying

2014-09-02 Thread Heiko Stübner
Am Montag, 1. September 2014, 17:26:29 schrieb Mike Turquette: > Quoting Heiko Stübner (2014-08-28 03:46:10) > > > On 32bit architectures, like ARM calculating the fractional rate will > > do the multiplication before converting the value to u64 when it gets > > assigned to ret, which can produce

Re: [PATCH] clk: fractional-divider: cast parent_rate to u64 before multiplying

2014-09-02 Thread Heiko Stübner
Am Montag, 1. September 2014, 17:26:29 schrieb Mike Turquette: Quoting Heiko Stübner (2014-08-28 03:46:10) On 32bit architectures, like ARM calculating the fractional rate will do the multiplication before converting the value to u64 when it gets assigned to ret, which can produce

[PATCH] clk: fractional-divider: cast parent_rate to u64 before multiplying

2014-08-28 Thread Heiko Stübner
On 32bit architectures, like ARM calculating the fractional rate will do the multiplication before converting the value to u64 when it gets assigned to ret, which can produce overflows. The error in question happened with a parent_rate of 386MHz, m = 3000, n = 6, which resulted in a wrong

[PATCH] clk: fractional-divider: cast parent_rate to u64 before multiplying

2014-08-28 Thread Heiko Stübner
On 32bit architectures, like ARM calculating the fractional rate will do the multiplication before converting the value to u64 when it gets assigned to ret, which can produce overflows. The error in question happened with a parent_rate of 386MHz, m = 3000, n = 6, which resulted in a wrong