On Fri, Aug 12, 2016 at 9:11 PM, Joe Perches <j...@perches.com> wrote: > On Fri, 2016-08-12 at 19:59 -0700, Petri Gynther wrote: >> Add a generic routine to test if possibly unaligned to u16 >> Ethernet address is a zero address. > [] >> diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h > [] >> +static inline bool is_zero_ether_addr_unaligned(const u8 *addr) >> +{ >> +#if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) >> + return is_zero_ether_addr(addr); >> +#else >> + return (addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | addr[5]) == >> 0; >> +#endif > > Because the return is bool, the == 0 is unnecessary. >
But, we need to return true (1) when the bitwise OR result is zero. Same logic as in is_zero_ether_addr(). -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html