Re: [PATCH v3 1/6] perf cs-etm: Fix unsigned variable comparison to zero

2019-10-23 Thread Leo Yan
Hi Mike, On Wed, Oct 23, 2019 at 12:36:39AM +0100, Mike Leach wrote: > Hi Leo, > > Two points here - both related. > > On Tue, 22 Oct 2019 at 06:10, Leo Yan wrote: > > > > Hi Mathieu, > > > > On Fri, Oct 11, 2019 at 02:16:06PM -0600, Mathieu Poirier wrote: > > > On Sat, Oct 05, 2019 at

Re: [PATCH v3 1/6] perf cs-etm: Fix unsigned variable comparison to zero

2019-10-22 Thread Mike Leach
Hi Leo, Two points here - both related. On Tue, 22 Oct 2019 at 06:10, Leo Yan wrote: > > Hi Mathieu, > > On Fri, Oct 11, 2019 at 02:16:06PM -0600, Mathieu Poirier wrote: > > On Sat, Oct 05, 2019 at 05:16:09PM +0800, Leo Yan wrote: > > > If the u64 variable 'offset' is a negative integer,

Re: [PATCH v3 1/6] perf cs-etm: Fix unsigned variable comparison to zero

2019-10-21 Thread Leo Yan
Hi Mathieu, On Fri, Oct 11, 2019 at 02:16:06PM -0600, Mathieu Poirier wrote: > On Sat, Oct 05, 2019 at 05:16:09PM +0800, Leo Yan wrote: > > If the u64 variable 'offset' is a negative integer, comparison it with > > bigger than zero is always going to be true because it is unsigned. > > Fix this

Re: [PATCH v3 1/6] perf cs-etm: Fix unsigned variable comparison to zero

2019-10-11 Thread Mathieu Poirier
On Sat, Oct 05, 2019 at 05:16:09PM +0800, Leo Yan wrote: > If the u64 variable 'offset' is a negative integer, comparison it with > bigger than zero is always going to be true because it is unsigned. > Fix this by using s64 type for variable 'offset'. > > Signed-off-by: Leo Yan > --- >

[PATCH v3 1/6] perf cs-etm: Fix unsigned variable comparison to zero

2019-10-05 Thread Leo Yan
If the u64 variable 'offset' is a negative integer, comparison it with bigger than zero is always going to be true because it is unsigned. Fix this by using s64 type for variable 'offset'. Signed-off-by: Leo Yan --- tools/perf/util/cs-etm.c | 4 ++-- 1 file changed, 2 insertions(+), 2