Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1544783 > unrolled thread

[PATCH] Documentation/unaligned-memory-access.txt: fix incorrect comparison operator

Started byCihangir Akturk <cakturk@gmail.com>
First post2016-12-19 23:00 +0100
Last post2016-12-20 11:00 +0100
Articles 4 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] Documentation/unaligned-memory-access.txt: fix incorrect comparison operator Cihangir Akturk <cakturk@gmail.com> - 2016-12-19 23:00 +0100
    Re: [PATCH] Documentation/unaligned-memory-access.txt: fix  incorrect comparison operator Jonathan Corbet <corbet@lwn.net> - 2016-12-20 00:20 +0100
      Re: [PATCH] Documentation/unaligned-memory-access.txt: fix incorrect  comparison operator Cihangir Akturk <cakturk@gmail.com> - 2016-12-20 00:50 +0100
      Re: [PATCH] Documentation/unaligned-memory-access.txt: fix incorrect comparison operator Ozgur Karatas <okaratas@member.fsf.org> - 2016-12-20 11:00 +0100

#1544783 — [PATCH] Documentation/unaligned-memory-access.txt: fix incorrect comparison operator

FromCihangir Akturk <cakturk@gmail.com>
Date2016-12-19 23:00 +0100
Subject[PATCH] Documentation/unaligned-memory-access.txt: fix incorrect comparison operator
Message-ID<sQe8p-4Wj-31@gated-at.bofh.it>
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.

Signed-off-by: Cihangir Akturk <cakturk@gmail.com>
---
 Documentation/unaligned-memory-access.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/unaligned-memory-access.txt b/Documentation/unaligned-memory-access.txt
index a445da0..3f76c0c 100644
--- a/Documentation/unaligned-memory-access.txt
+++ b/Documentation/unaligned-memory-access.txt
@@ -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
 }
 
-- 
2.1.4

[toc] | [next] | [standalone]


#1544816 — Re: [PATCH] Documentation/unaligned-memory-access.txt: fix incorrect comparison operator

FromJonathan Corbet <corbet@lwn.net>
Date2016-12-20 00:20 +0100
SubjectRe: [PATCH] Documentation/unaligned-memory-access.txt: fix incorrect comparison operator
Message-ID<sQfnP-5TA-5@gated-at.bofh.it>
In reply to#1544783
On Mon, 19 Dec 2016 23:53:40 +0200
Cihangir Akturk <cakturk@gmail.com> wrote:

> 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.

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

[toc] | [prev] | [next] | [standalone]


#1544831 — Re: [PATCH] Documentation/unaligned-memory-access.txt: fix incorrect comparison operator

FromCihangir Akturk <cakturk@gmail.com>
Date2016-12-20 00:50 +0100
SubjectRe: [PATCH] Documentation/unaligned-memory-access.txt: fix incorrect comparison operator
Message-ID<sQfQS-63A-17@gated-at.bofh.it>
In reply to#1544816
On Mon, Dec 19, 2016 at 04:13:13PM -0700, Jonathan Corbet wrote:
> On Mon, 19 Dec 2016 23:53:40 +0200
> Cihangir Akturk <cakturk@gmail.com> wrote:
> 
> > 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.

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.

> 
> 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.

> 
> Thanks,
> 
> jon

Cihangir

[toc] | [prev] | [next] | [standalone]


#1545013

FromOzgur Karatas <okaratas@member.fsf.org>
Date2016-12-20 11:00 +0100
Message-ID<sQpnb-3Uc-9@gated-at.bofh.it>
In reply to#1544816
20.12.2016, 01:13, "Jonathan Corbet" <corbet@lwn.net>:
> On Mon, 19 Dec 2016 23:53:40 +0200
> Cihangir Akturk <cakturk@gmail.com> wrote:
>
>>  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.
>
> 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.

> 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.

> Thanks,
>
> jon

Regards,

~Ozgur

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web