Messages in this thread Patch in this message | | | From | Marek Vasut <> | Subject | [PATCH] doc: Fix comparison operator | Date | Sat, 11 Oct 2014 00:26:46 +0200 |
| |
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: Jiri Kosina <jkosina@suse.cz> Cc: Joe Perches <joe@perches.com> Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.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
| |