From: YueHaibing <[email protected]>
Date: Mon, 18 Feb 2019 08:15:46 +0000
> @@ -1050,8 +1050,11 @@ static int yellowfin_rx(struct net_device *dev)
> struct sk_buff *rx_skb = yp->rx_skbuff[entry];
> s16 frame_status;
> u16 desc_status;
> - int data_size, yf_size;
> + int data_size;
> u8 *buf_addr;
> +#ifdef YF_PROTOTYPE
> + int yf_size = sizeof(struct yellowfin_desc);
> +#endif
This is just silly.
Please move this variable declaration and initialization into the
YF_PROTOTYPE basic block in the code below it, like this:
#ifdef YF_PROTOTYPE /* Support for prototype hardware errata. */
} else if ((yp->flags & HasMACAddrBug) &&
int yf_size = sizeof(struct yellowfin_desc);
!ether_addr_equal(le32_to_cpu(yp->rx_ring_dma +
entry * yf_size),
dev->dev_addr) &&
!ether_addr_equal(le32_to_cpu(yp->rx_ring_dma +
entry * yf_size),
"\377\377\377\377\377\377")) {
if (bogus_rx++ == 0)
netdev_warn(dev, "Bad frame to %pM\n",
buf_addr);
#endif
Thanks.