Re: [PATCH v2 06/14] net: axienet: Factor out TX descriptor chain cleanup

From: David Miller
Date: Mon Mar 09 2020 - 20:48:20 EST


From: Andre Przywara <andre.przywara@xxxxxxx>
Date: Mon, 9 Mar 2020 18:18:43 +0000

> -static void axienet_start_xmit_done(struct net_device *ndev)
> +static int axienet_free_tx_chain(struct net_device *ndev, u32 first_bd,
> + int nr_bds, u32 *sizep)
> {
> - u32 size = 0;
> - u32 packets = 0;
> struct axienet_local *lp = netdev_priv(ndev);
> + int max_bds = (nr_bds != -1) ? nr_bds : lp->tx_bd_num;
> struct axidma_bd *cur_p;
> - unsigned int status = 0;
> + unsigned int status;
> + int i;

Please use reverse christms tree ordering for local variable
declarations.

> +static void axienet_start_xmit_done(struct net_device *ndev)
> +{
> + u32 size = 0;
> + u32 packets = 0;
> + struct axienet_local *lp = netdev_priv(ndev);

Likewise.