Re: [PATCH v3 4/4] can: kvaser_usb: Add support for the Usbcan-II family

Oliver Hartkopp
2015-01-09T16:23:31Z

On 09.01.2015 15:05, Marc Kleine-Budde wrote:
> On 01/09/2015 04:06 AM, Ahmed S. Darwish wrote:

>>>> stats->rx_over_errors++;
>>>> stats->rx_errors++;
>>>>
>>>> netif_rx(skb);
>>>>
>>>> stats->rx_packets++;
>>>> stats->rx_bytes += cf->can_dlc;

> A quick look shows that almost no ethernet or wireless drivers take care
> about the return value. In case of a RX_DROPPED some increase a drop
> counter, though.

As there IS a return value it makes sense to check it and to increase either
the packet OR the drop counter accordingly.

This is definitely better than increasing just the packet counter in every
case. Maybe something for the 3.21 merge window ...

Regards,
Oliver

ps. removed the heavy cross-posting on LKML and netdev and others. Posting on
linux-can is the right place for this kind of CAN driver discussions.