On 25.05.2015 19:37, Joe Perches wrote: > On Mon, 2015-05-25 at 17:03 +0300, Dan Carpenter wrote: >> On Thu, May 21, 2015 at 05:53:19PM +0200, Mateusz Kulikowski wrote: (...) >>> bssid_match = >>> - (memcmp(header->addr3, ieee->current_network.bssid, ETH_ALEN) != 0) && >>> + (!ether_addr_equal_unaligned(header->addr3, >>> + ieee->current_network.bssid)) && >> >> Isn't this aligned? >> >> Joe, I really dread these checkpatch.pl patches. It's the kind of thing >> I hate more as time goes on and not less... > > Yeah, > > I thought that Mateusz was going to send a > checkpatch patch for ether_addr_equal_unaligned > to make the memcpy thing a bit clearer. I'm a bit confused here; I used unaligned incorrectly in that context - it's my mistake, but it couldn't be prevented by checkpatch as it is too simple to understand structure member alignment. As for using ether_addr* family instead of mem* - It's nice syntactic sugar for slow-path code. > Of course this thing is really only useful for > non x86 systems and then only when the memcpy is > in a fast-path like multicasting so really it's > not very commonly a significant improvement in > the first place. _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel