[<prev] [next>] [day] [month] [year] [list]
Date: Sat, 11 Oct 2014 00:26:46 +0200
From: Marek Vasut <marex@...x.de>
To: linux-doc@...r.kernel.org
Cc: Olaf Mandel <o.mandel@...losystems.com>,
Marek Vasut <marex@...x.de>, Jiri Kosina <jkosina@...e.cz>,
Joe Perches <joe@...ches.com>, linux-kernel@...r.kernel.org
Subject: [PATCH] doc: Fix comparison operator
From: Olaf Mandel <o.mandel@...losystems.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@...losystems.com>
Signed-off-by: Marek Vasut <marex@...x.de>
Cc: Jiri Kosina <jkosina@...e.cz>
Cc: Joe Perches <joe@...ches.com>
Cc: linux-doc@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
---
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.0.0
--
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