diff mbox

[U-Boot] doc: Fix comparison operator

Message ID 1412979946-6606-1-git-send-email-marex@denx.de
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Marek Vasut Oct. 10, 2014, 10:25 p.m. UTC
From: Olaf Mandel <o.mandel@menlosystems.com>

Align the documentation with the include/linux/etherdevice.h ,
which is where this example comes from. The return value from
the check was inverted in the documentation.

Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
---
 doc/README.unaligned-memory-access.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini Oct. 27, 2014, 10:19 p.m. UTC | #1
On Sat, Oct 11, 2014 at 12:25:46AM +0200, Marek Vasut wrote:

> From: Olaf Mandel <o.mandel@menlosystems.com>
> 
> Align the documentation with the include/linux/etherdevice.h ,
> which is where this example comes from. The return value from
> the check was inverted in the documentation.
> 
> Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
> Cc: Tom Rini <trini@ti.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/doc/README.unaligned-memory-access.txt b/doc/README.unaligned-memory-access.txt
index 00529f5..70a85f9 100644
--- a/doc/README.unaligned-memory-access.txt
+++ b/doc/README.unaligned-memory-access.txt
@@ -154,7 +154,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
 }