Re: [RESEND PATCH v14 04/11] pwm: clps711x: Cast period to u32 before use as divisor

2020-05-23 Thread Daniel Thompson
On Fri, May 22, 2020 at 04:19:04PM -0700, Guru Das Srinagesh wrote: > On Fri, May 22, 2020 at 10:37:38AM +0100, Daniel Thompson wrote: > > On Thu, May 21, 2020 at 01:25:25PM -0700, Guru Das Srinagesh wrote: > > > On Thu, May 21, 2020 at 11:19:34AM +0100, Daniel Thompson wrote: > > > > On Wed, May 2

Re: [RESEND PATCH v14 04/11] pwm: clps711x: Cast period to u32 before use as divisor

2020-05-22 Thread Guru Das Srinagesh
On Fri, May 22, 2020 at 10:37:38AM +0100, Daniel Thompson wrote: > On Thu, May 21, 2020 at 01:25:25PM -0700, Guru Das Srinagesh wrote: > > On Thu, May 21, 2020 at 11:19:34AM +0100, Daniel Thompson wrote: > > > On Wed, May 20, 2020 at 03:55:57PM -0700, Guru Das Srinagesh wrote: > > > > Since the PWM

Re: [RESEND PATCH v14 04/11] pwm: clps711x: Cast period to u32 before use as divisor

2020-05-22 Thread Daniel Thompson
On Thu, May 21, 2020 at 01:25:25PM -0700, Guru Das Srinagesh wrote: > On Thu, May 21, 2020 at 11:19:34AM +0100, Daniel Thompson wrote: > > On Wed, May 20, 2020 at 03:55:57PM -0700, Guru Das Srinagesh wrote: > > > Since the PWM framework is switching struct pwm_args.period's datatype > > > to u64, p

Re: [RESEND PATCH v14 04/11] pwm: clps711x: Cast period to u32 before use as divisor

2020-05-21 Thread Guru Das Srinagesh
On Thu, May 21, 2020 at 11:19:34AM +0100, Daniel Thompson wrote: > On Wed, May 20, 2020 at 03:55:57PM -0700, Guru Das Srinagesh wrote: > > Since the PWM framework is switching struct pwm_args.period's datatype > > to u64, prepare for this transition by typecasting it to u32. > > > > Also, since th

Re: [RESEND PATCH v14 04/11] pwm: clps711x: Cast period to u32 before use as divisor

2020-05-21 Thread Daniel Thompson
On Wed, May 20, 2020 at 03:55:57PM -0700, Guru Das Srinagesh wrote: > Since the PWM framework is switching struct pwm_args.period's datatype > to u64, prepare for this transition by typecasting it to u32. > > Also, since the dividend is still a 32-bit number, any divisor greater > than the numerat

[RESEND PATCH v14 04/11] pwm: clps711x: Cast period to u32 before use as divisor

2020-05-20 Thread Guru Das Srinagesh
Since the PWM framework is switching struct pwm_args.period's datatype to u64, prepare for this transition by typecasting it to u32. Also, since the dividend is still a 32-bit number, any divisor greater than the numerator will cause the quotient to be zero, so return 0 in that case to efficiently

[RESEND PATCH v14 04/11] pwm: clps711x: Cast period to u32 before use as divisor

2020-05-12 Thread Guru Das Srinagesh
Since the PWM framework is switching struct pwm_args.period's datatype to u64, prepare for this transition by typecasting it to u32. Also, since the dividend is still a 32-bit number, any divisor greater than the numerator will cause the quotient to be zero, so return 0 in that case to efficiently

[RESEND PATCH v14 04/11] pwm: clps711x: Cast period to u32 before use as divisor

2020-05-04 Thread Guru Das Srinagesh
Since the PWM framework is switching struct pwm_args.period's datatype to u64, prepare for this transition by typecasting it to u32. Also, since the dividend is still a 32-bit number, any divisor greater than the numerator will cause the quotient to be zero, so return 0 in that case to efficiently