Commit 5edbf7df authored by David S. Miller's avatar David S. Miller

Merge branch 'systemport-next'

Florian Fainelli says:

====================
net: systemport: checkpatch fixes

These two patches fixes the multiple line alignment issues and
kzalloc on array reported by checkpatch.pl
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 316158fe 40a8a317
...@@ -531,9 +531,7 @@ static unsigned int bcm_sysport_desc_rx(struct bcm_sysport_priv *priv, ...@@ -531,9 +531,7 @@ static unsigned int bcm_sysport_desc_rx(struct bcm_sysport_priv *priv,
"p_index=%d rx_c_index=%d to_process=%d\n", "p_index=%d rx_c_index=%d to_process=%d\n",
p_index, priv->rx_c_index, to_process); p_index, priv->rx_c_index, to_process);
while ((processed < to_process) && while ((processed < to_process) && (processed < budget)) {
(processed < budget)) {
cb = &priv->rx_cbs[priv->rx_read_ptr]; cb = &priv->rx_cbs[priv->rx_read_ptr];
skb = cb->skb; skb = cb->skb;
dma_unmap_single(kdev, dma_unmap_addr(cb, dma_addr), dma_unmap_single(kdev, dma_unmap_addr(cb, dma_addr),
...@@ -890,8 +888,9 @@ static int bcm_sysport_insert_tsb(struct sk_buff *skb, struct net_device *dev) ...@@ -890,8 +888,9 @@ static int bcm_sysport_insert_tsb(struct sk_buff *skb, struct net_device *dev)
csum_info |= L4_LENGTH_VALID; csum_info |= L4_LENGTH_VALID;
if (ip_proto == IPPROTO_UDP && ip_ver == ETH_P_IP) if (ip_proto == IPPROTO_UDP && ip_ver == ETH_P_IP)
csum_info |= L4_UDP; csum_info |= L4_UDP;
} else } else {
csum_info = 0; csum_info = 0;
}
tsb->l4_ptr_dest_map = csum_info; tsb->l4_ptr_dest_map = csum_info;
} }
...@@ -1096,7 +1095,7 @@ static int bcm_sysport_init_tx_ring(struct bcm_sysport_priv *priv, ...@@ -1096,7 +1095,7 @@ static int bcm_sysport_init_tx_ring(struct bcm_sysport_priv *priv,
return -ENOMEM; return -ENOMEM;
} }
ring->cbs = kzalloc(sizeof(struct bcm_sysport_cb) * size, GFP_KERNEL); ring->cbs = kcalloc(size, sizeof(struct bcm_sysport_cb), GFP_KERNEL);
if (!ring->cbs) { if (!ring->cbs) {
netif_err(priv, hw, priv->netdev, "CB allocation failed\n"); netif_err(priv, hw, priv->netdev, "CB allocation failed\n");
return -ENOMEM; return -ENOMEM;
...@@ -1239,8 +1238,8 @@ static int bcm_sysport_init_rx_ring(struct bcm_sysport_priv *priv) ...@@ -1239,8 +1238,8 @@ static int bcm_sysport_init_rx_ring(struct bcm_sysport_priv *priv)
priv->rx_bd_assign_index = 0; priv->rx_bd_assign_index = 0;
priv->rx_c_index = 0; priv->rx_c_index = 0;
priv->rx_read_ptr = 0; priv->rx_read_ptr = 0;
priv->rx_cbs = kzalloc(priv->num_rx_bds * priv->rx_cbs = kcalloc(priv->num_rx_bds, sizeof(struct bcm_sysport_cb),
sizeof(struct bcm_sysport_cb), GFP_KERNEL); GFP_KERNEL);
if (!priv->rx_cbs) { if (!priv->rx_cbs) {
netif_err(priv, hw, priv->netdev, "CB allocation failed\n"); netif_err(priv, hw, priv->netdev, "CB allocation failed\n");
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment