Re: [PATCH] mfd: tps65911-comparator: Fix an off by one bug

2018-04-22 Thread Lee Jones
On Fri, 20 Apr 2018, Dan Carpenter wrote: > On Fri, Apr 20, 2018 at 09:39:09AM +0100, Lee Jones wrote: > > On Fri, 20 Apr 2018, Dan Carpenter wrote: > > > > > On Fri, Apr 20, 2018 at 09:09:43AM +0100, Lee Jones wrote: > > > > On Thu, 19 Apr 2018, Dan Carpenter wrote: > > > > > > > > > The tps_co

Re: [PATCH] mfd: tps65911-comparator: Fix an off by one bug

2018-04-20 Thread Dan Carpenter
On Fri, Apr 20, 2018 at 09:39:09AM +0100, Lee Jones wrote: > On Fri, 20 Apr 2018, Dan Carpenter wrote: > > > On Fri, Apr 20, 2018 at 09:09:43AM +0100, Lee Jones wrote: > > > On Thu, 19 Apr 2018, Dan Carpenter wrote: > > > > > > > The tps_comparators[] array is used in two places. We only access

Re: [PATCH] mfd: tps65911-comparator: Fix an off by one bug

2018-04-20 Thread Dan Carpenter
On Thu, Apr 19, 2018 at 04:46:34PM +0300, Dan Carpenter wrote: > The tps_comparators[] array is used in two places. We only access the > COMP1 (1) and COMP2 (2) elements. Unfortunately, we're accessing the > wrong elements and also one element beyond the end of the array. There > was supposed to

Re: [PATCH] mfd: tps65911-comparator: Fix an off by one bug

2018-04-20 Thread Lee Jones
On Fri, 20 Apr 2018, Dan Carpenter wrote: > On Fri, Apr 20, 2018 at 09:09:43AM +0100, Lee Jones wrote: > > On Thu, 19 Apr 2018, Dan Carpenter wrote: > > > > > The tps_comparators[] array is used in two places. We only access the > > > COMP1 (1) and COMP2 (2) elements. Unfortunately, we're acces

Re: [PATCH] mfd: tps65911-comparator: Fix an off by one bug

2018-04-20 Thread Dan Carpenter
On Fri, Apr 20, 2018 at 11:21:50AM +0300, Dan Carpenter wrote: > On Fri, Apr 20, 2018 at 09:09:43AM +0100, Lee Jones wrote: > > On Thu, 19 Apr 2018, Dan Carpenter wrote: > > > > > The tps_comparators[] array is used in two places. We only access the > > > COMP1 (1) and COMP2 (2) elements. Unfort

Re: [PATCH] mfd: tps65911-comparator: Fix an off by one bug

2018-04-20 Thread Dan Carpenter
On Fri, Apr 20, 2018 at 09:09:43AM +0100, Lee Jones wrote: > On Thu, 19 Apr 2018, Dan Carpenter wrote: > > > The tps_comparators[] array is used in two places. We only access the > > COMP1 (1) and COMP2 (2) elements. Unfortunately, we're accessing the > > wrong elements and also one element beyo

Re: [PATCH] mfd: tps65911-comparator: Fix an off by one bug

2018-04-20 Thread Lee Jones
On Thu, 19 Apr 2018, Dan Carpenter wrote: > The tps_comparators[] array is used in two places. We only access the > COMP1 (1) and COMP2 (2) elements. Unfortunately, we're accessing the > wrong elements and also one element beyond the end of the array. There > was supposed to be a zero element a

[PATCH] mfd: tps65911-comparator: Fix an off by one bug

2018-04-19 Thread Dan Carpenter
The tps_comparators[] array is used in two places. We only access the COMP1 (1) and COMP2 (2) elements. Unfortunately, we're accessing the wrong elements and also one element beyond the end of the array. There was supposed to be a zero element at the start of the array which is isn't accessed bu