lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 5 Dec 2012 15:41:21 +0800
From:	"Li, Zhen-Hua" <lizhenhua.dev@...il.com>
To:	Santosh Shilimkar <santosh.shilimkar@...com>
Cc:	Grant Likely <grant.likely@...retlab.ca>,
	Cong Ding <dinggnu@...il.com>,
	Benoit Cousson <b-cousson@...com>, Aneesh V <aneesh@...com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] memory: of_memory.c: remove unnecessary initialization

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 <lizhenhua.dev@...il.com> 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 func(int rm1, int rm2){
>         int i;
>         i = rm1;
>         i |= rm2;
> }
>
> Use gcc to compile them to assemble with "-S" operation, and you will find it.
>
> On Tue, Dec 4, 2012 at 10:46 PM, Santosh Shilimkar
> <santosh.shilimkar@...com> wrote:
>> On Tuesday 04 December 2012 07:25 PM, Grant Likely wrote:
>>>
>>> On Tue, Dec 4, 2012 at 11:44 AM, Santosh Shilimkar
>>> <santosh.shilimkar@...com> 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 <dinggnu@...il.com>
>>>>> ---
>>>>
>>>>
>>>> Looks ok.
>>>> Acked-by: Santosh Shilimkar<santosh.shilimkar@...com>
>>>>
>>>
>>> Thanks for the patch, but I don't think it matters enough to apply it.
>>> The existing code isn't wrong.
>>>
>> The patch was removing an additional operation and hence i didn't
>> contest it. I agree with your comment though.
>>
>> Regards
>> Santosh
>>
>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@...r.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at  http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ