Re: [U-Boot] [RFC PATCH] ext4: Fix comparision of unsigned expression with < 0

2017-04-26 Thread Lokesh Vutla
On Wednesday 26 April 2017 04:54 PM, Tom Rini wrote: > On Wed, Apr 26, 2017 at 08:56:49AM +0530, Lokesh Vutla wrote: >> >> >> On Tuesday 25 April 2017 11:34 PM, Tom Rini wrote: >>> On Tue, Apr 25, 2017 at 10:22:27AM +0530, Lokesh Vutla wrote: In file ext4fs.c funtion ext4fs_read_file() compa

Re: [U-Boot] [RFC PATCH] ext4: Fix comparision of unsigned expression with < 0

2017-04-26 Thread Tom Rini
On Wed, Apr 26, 2017 at 08:56:49AM +0530, Lokesh Vutla wrote: > > > On Tuesday 25 April 2017 11:34 PM, Tom Rini wrote: > > On Tue, Apr 25, 2017 at 10:22:27AM +0530, Lokesh Vutla wrote: > >> In file ext4fs.c funtion ext4fs_read_file() compares an > >> unsigned expression with < 0 like below > >> >

Re: [U-Boot] [RFC PATCH] ext4: Fix comparision of unsigned expression with < 0

2017-04-25 Thread Lokesh Vutla
On Tuesday 25 April 2017 11:34 PM, Tom Rini wrote: > On Tue, Apr 25, 2017 at 10:22:27AM +0530, Lokesh Vutla wrote: >> In file ext4fs.c funtion ext4fs_read_file() compares an >> unsigned expression with < 0 like below >> >> lbaint_t blknr; >> blknr = read_allocated_block(&(node->inode),

Re: [U-Boot] [RFC PATCH] ext4: Fix comparision of unsigned expression with < 0

2017-04-25 Thread Tom Rini
On Tue, Apr 25, 2017 at 10:22:27AM +0530, Lokesh Vutla wrote: > In file ext4fs.c funtion ext4fs_read_file() compares an > unsigned expression with < 0 like below > > lbaint_t blknr; > blknr = read_allocated_block(&(node->inode), i); > if (blknr < 0) > return -1; >

[U-Boot] [RFC PATCH] ext4: Fix comparision of unsigned expression with < 0

2017-04-24 Thread Lokesh Vutla
In file ext4fs.c funtion ext4fs_read_file() compares an unsigned expression with < 0 like below lbaint_t blknr; blknr = read_allocated_block(&(node->inode), i); if (blknr < 0) return -1; blknr is of type ulong/uint64_t. read_allocated_block() returns long i