]> Pileus Git - ~andy/linux/commitdiff
xen-netback: remove redundent parameter in netbk_count_requests
authorWei Liu <wei.liu2@citrix.com>
Thu, 2 May 2013 00:43:57 +0000 (00:43 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 2 May 2013 20:50:08 +0000 (16:50 -0400)
Tracking down from the caller, first_idx is always equal to vif->tx.req_cons.
Remove it to avoid confusion.

Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/xen-netback/netback.c

index a2865f17c6673837ea982b0ac2a983c455a62cad..c44772d6bba089a2e26d0318bcb5a9bbce81472a 100644 (file)
@@ -928,7 +928,6 @@ static void netbk_fatal_tx_err(struct xenvif *vif)
 
 static int netbk_count_requests(struct xenvif *vif,
                                struct xen_netif_tx_request *first,
-                               RING_IDX first_idx,
                                struct xen_netif_tx_request *txp,
                                int work_to_do)
 {
@@ -1005,7 +1004,7 @@ static int netbk_count_requests(struct xenvif *vif,
        } while ((txp++)->flags & XEN_NETTXF_more_data);
 
        if (drop_err) {
-               netbk_tx_err(vif, first, first_idx + slots);
+               netbk_tx_err(vif, first, cons + slots);
                return drop_err;
        }
 
@@ -1470,8 +1469,7 @@ static unsigned xen_netbk_tx_build_gops(struct xen_netbk *netbk)
                                continue;
                }
 
-               ret = netbk_count_requests(vif, &txreq, idx,
-                                          txfrags, work_to_do);
+               ret = netbk_count_requests(vif, &txreq, txfrags, work_to_do);
                if (unlikely(ret < 0))
                        continue;