Re: [U-Boot] [PATCH] mmc: cat u8 to u64 to avoid unexpected error

2016-09-19 Thread Tom Rini
On Tue, Sep 20, 2016 at 11:04:40AM +0900, Jaehoon Chung wrote: > On 09/19/2016 08:30 PM, Tom Rini wrote: > > On Mon, Sep 19, 2016 at 03:31:54PM +0900, Jaehoon Chung wrote: > >> On 09/19/2016 02:53 AM, Tom Rini wrote: > >>> On Tue, Sep 13, 2016 at 04:27:57PM +0800, Haibo Chen wrote: > >>> >

Re: [U-Boot] [PATCH] mmc: cat u8 to u64 to avoid unexpected error

2016-09-19 Thread Jaehoon Chung
On 09/19/2016 08:30 PM, Tom Rini wrote: > On Mon, Sep 19, 2016 at 03:31:54PM +0900, Jaehoon Chung wrote: >> On 09/19/2016 02:53 AM, Tom Rini wrote: >>> On Tue, Sep 13, 2016 at 04:27:57PM +0800, Haibo Chen wrote: >>> Suspicious implicit sign extension exist. ext_csd[] is defined as "u8",

Re: [U-Boot] [PATCH] mmc: cat u8 to u64 to avoid unexpected error

2016-09-19 Thread Tom Rini
On Mon, Sep 19, 2016 at 03:31:54PM +0900, Jaehoon Chung wrote: > On 09/19/2016 02:53 AM, Tom Rini wrote: > > On Tue, Sep 13, 2016 at 04:27:57PM +0800, Haibo Chen wrote: > > > >> Suspicious implicit sign extension exist. ext_csd[] is defined > >> as "u8", capacity is defined as u64, so u8 is

Re: [U-Boot] [PATCH] mmc: cat u8 to u64 to avoid unexpected error

2016-09-19 Thread Jaehoon Chung
On 09/19/2016 02:53 AM, Tom Rini wrote: > On Tue, Sep 13, 2016 at 04:27:57PM +0800, Haibo Chen wrote: > >> Suspicious implicit sign extension exist. ext_csd[] is defined >> as "u8", capacity is defined as u64, so u8 is promoted to signed >> int first int the "|" expersion, then the sign extended

Re: [U-Boot] [PATCH] mmc: cat u8 to u64 to avoid unexpected error

2016-09-18 Thread Tom Rini
On Tue, Sep 13, 2016 at 04:27:57PM +0800, Haibo Chen wrote: > Suspicious implicit sign extension exist. ext_csd[] is defined > as "u8", capacity is defined as u64, so u8 is promoted to signed > int first int the "|" expersion, then the sign extended to u64. > if the tmp sign value is largeer than

[U-Boot] [PATCH] mmc: cat u8 to u64 to avoid unexpected error

2016-09-13 Thread Haibo Chen
Suspicious implicit sign extension exist. ext_csd[] is defined as "u8", capacity is defined as u64, so u8 is promoted to signed int first int the "|" expersion, then the sign extended to u64. if the tmp sign value is largeer than 0x7fff, after the sign extension, the upper bits of the result