Re: [PATCH 01/50] eth: reset addr_assign_type if eth_mac_addr()called

From: Stephen Hemminger
Date: Wed Feb 08 2012 - 17:50:08 EST


On Wed, 8 Feb 2012 22:10:08 +0100
Danny Kukawka <danny.kukawka@xxxxxxxxx> wrote:

> + if (dev->addr_assign_type & NET_ADDR_RANDOM)
> + dev->addr_assign_type ^= NET_ADDR_RANDOM;

Why not just avoid the conditional, or better yet use bitops?

dev->addr_assign_type &= ~NET_ADDR_RANDOM;

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/