Documentation/unaligned-memory-access.txt: fix incorrect comparison operator
PATCH 1/1 Documentation/unaligned-memory-access.txt: fix incorrect comparison operator
In the actual implementation ether_addr_equal function tests for equality to 0 when returning. It seems in commit 0d74c4 it is somehow overlooked to change this operator to reflect the actual function.
--- Documentation/unaligned-memory-access.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/unaligned-memory-access.txt +1 -1
@@ -151,7 +151,7 @@ bool ether_addr_equal(const u8 *addr1, const u8 *addr2) #else const u16 *a = (const u16 *)addr1; const u16 *b = (const u16 *)addr2; - return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | (a[2] ^ b[2])) != 0; + return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | (a[2] ^ b[2])) == 0; #endif }
Signature · 1 line
2.1.4
Jonathan Corbet
maintainerQuoted 3 lines · On Mon, 19 Dec 2016 23:53:40 +0200 Cihangir Akturk <[email protected]> wrote:
In the actual implementation
ether_addr_equalfunction tests for equality to 0 when returning. It seems in commit 0d74c4 it is somehow overlooked to change this operator to reflect the actual function.
I received this patch two days ago; has something changed that you're sending it again?
Meanwhile, there was a question from Ozgur Karatas on the patch, but I've not yet seen your response.
Thanks,
jon
Quoted 6 lines · Jonathan Corbet
Quoted 3 lines · On Mon, 19 Dec 2016 23:53:40 +0200 Cihangir Akturk <[email protected]> wrote:
In the actual implementation
ether_addr_equalfunction tests for equality to 0 when returning. It seems in commit 0d74c4 it is somehow overlooked to change this operator to reflect the actual function.
I realized that I generated the patch with the -k flag to git format-patch. And think that it'd be better to resend it without this flag. Besides that nothing is changed in the patch itself. Sorry for the noise.
Quoted 6 lines
I received this patch two days ago; has something changed that you're sending it again?
Meanwhile, there was a question from Ozgur Karatas on the patch, but I've not yet seen your response.
Ok, I'll try to answer his question.
Quoted 4 lines
Thanks,
jon
Cihangir
20.12.2016, 01:13, "Jonathan Corbet" <[email protected]>:
Quoted 9 lines
Quoted 3 lines · On Mon, 19 Dec 2016 23:53:40 +0200 Cihangir Akturk <[email protected]> wrote:
In the actual implementation
ether_addr_equalfunction tests for equality to 0 when returning. It seems in commit 0d74c4 it is somehow overlooked to change this operator to reflect the actual function.I received this patch two days ago; has something changed that you're sending it again?
My opinion, the patch its update. The assignment of "!=0" has already been fixed with patch. I tested it.
Quoted 2 lines
Meanwhile, there was a question from Ozgur Karatas on the patch, but I've not yet seen your response.
If you see fit your approval.
Quoted 3 lines
Thanks,
jon
Regards,
~Ozgur