Re: [PATCH] memory: of_memory.c: remove unnecessary initialization

2012-12-24 Thread Li, Zhen-Hua
Yes, I think I was wrong and you are right. I did test again and now it is clear. On Wed, Dec 5, 2012 at 6:06 PM, Cong Ding wrote: > On Wed, Dec 05, 2012 at 03:26:36PM +0800, Li, Zhen-Hua wrote: >> Infact, your patch does remove an orl operation, but add a new "move" >> operation. >> >> You can

Re: [PATCH] memory: of_memory.c: remove unnecessary initialization

2012-12-05 Thread Cong Ding
On Wed, Dec 05, 2012 at 03:26:36PM +0800, Li, Zhen-Hua wrote: > Infact, your patch does remove an orl operation, but add a new "move" > operation. > > You can test such two functions: > int func1(int rm1, int rm2){ > int i = 0; > i |= rm1; > i |= rm2; > } > > and > > int

Re: [PATCH] memory: of_memory.c: remove unnecessary initialization

2012-12-05 Thread Li, Zhen-Hua
And if you use -O2 as gcc option, you may find it does nothing. They are using the same assemble language. On Wed, Dec 5, 2012 at 3:26 PM, Li, Zhen-Hua wrote: > Infact, your patch does remove an orl operation, but add a new "move" > operation. > > You can test such two functions: > int func1(int

Re: [PATCH] memory: of_memory.c: remove unnecessary initialization

2012-12-04 Thread Li, Zhen-Hua
Infact, your patch does remove an orl operation, but add a new "move" operation. You can test such two functions: int func1(int rm1, int rm2){ int i = 0; i |= rm1; i |= rm2; } and int func(int rm1, int rm2){ int i; i = rm1; i |= rm2; } Use gcc to

Re: [PATCH] memory: of_memory.c: remove unnecessary initialization

2012-12-04 Thread Santosh Shilimkar
On Tuesday 04 December 2012 07:25 PM, Grant Likely wrote: On Tue, Dec 4, 2012 at 11:44 AM, Santosh Shilimkar wrote: On Tuesday 04 December 2012 04:56 PM, Cong Ding wrote: the initialization of variable ret is unnecessary, we can remove it while save one time "or" operation. Signed-off-by: Co

Re: [PATCH] memory: of_memory.c: remove unnecessary initialization

2012-12-04 Thread Grant Likely
On Tue, Dec 4, 2012 at 11:44 AM, Santosh Shilimkar wrote: > On Tuesday 04 December 2012 04:56 PM, Cong Ding wrote: >> >> the initialization of variable ret is unnecessary, we can remove it while >> save >> one time "or" operation. >> >> Signed-off-by: Cong Ding >> --- > > Looks ok. > Acked-by: Sa

Re: [PATCH] memory: of_memory.c: remove unnecessary initialization

2012-12-04 Thread Santosh Shilimkar
On Tuesday 04 December 2012 04:56 PM, Cong Ding wrote: the initialization of variable ret is unnecessary, we can remove it while save one time "or" operation. Signed-off-by: Cong Ding --- Looks ok. Acked-by: Santosh Shilimkar -- To unsubscribe from this list: send the line "unsubscribe linux-