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.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html