]> git.baikalelectronics.ru Git - kernel.git/commit
net: fix endian check warning in etherdevice.h
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Fri, 14 Aug 2015 01:34:03 +0000 (18:34 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Aug 2015 19:14:53 +0000 (12:14 -0700)
commite69b66b2223ebfdf05492b0115c1bfbfcb278a2f
tree9823b7e25461a2b5c1f655a8662e3e7ea3385f69
parent0f77f71d923b394c288af15242dc4146c2ed0fa3
net: fix endian check warning in etherdevice.h

Sparse builds have been warning for a really long time now
that etherdevice.h has a conversion that is unsafe.

  include/linux/etherdevice.h:79:32: warning: restricted __be16 degrades to integer

This code change fixes the issue and generates the exact
same assembly before/after (checked on x86_64)

Fixes: a173fed1f82a (etherdevice: Optimize a few is_<foo>_ether_addr functions)
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
CC: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/etherdevice.h