Re: [PATCH 2/4] Staging: vt6655: use is_broadcast_ether_addr instead of custom macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2010-05-19 at 11:30 -0700, Charles Clément wrote:
> Replace custom macro IS_BROADCAST_ADDRESS by is_broadcast_ether_addr
> from <linux/etherdevice.h>.

Hi Charles.

An ethernet broadcast address is also an ethernet multicast
address, so some of these are redundant, but that's probably
for another patch.

> -    if (!is_multicast_ether_addr(pbyFrame) && !IS_BROADCAST_ADDRESS(pbyFrame)) {
> +    if (!is_multicast_ether_addr(pbyFrame) && !is_broadcast_ether_addr(pbyFrame)) {
[]
>          if (is_multicast_ether_addr(&(psEthHeader->abyDstAddr[0])) ||
> -            IS_BROADCAST_ADDRESS(&(psEthHeader->abyDstAddr[0]))) {
> +            is_broadcast_ether_addr(&(psEthHeader->abyDstAddr[0]))) {
[]
>          if (is_multicast_ether_addr(&(psEthHeader->abyDstAddr[0])) ||
> -            IS_BROADCAST_ADDRESS(&(psEthHeader->abyDstAddr[0]))) {
> +            is_broadcast_ether_addr(&(psEthHeader->abyDstAddr[0]))) {

Also, "&(foo->bar[0])" can generally be replace by "foo->bar"
for easier reading.

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux