ibmveth: Fix multiple errors with dma_mapping_error conversion
Stephen Rothwell [Sun, 27 Jul 2008 16:14:24 +0000 (02:14 +1000)]
The addition of an argument to dma_mapping_error() in commit
8d8bb39b9eba32dd70e87fd5ad5c5dd4ba118e06 "dma-mapping: add the device
argument to dma_mapping_error()" left a bit of fallout:

drivers/net/ibmveth.c:263: error: too few arguments to function 'dma_mapping_error'
drivers/net/ibmveth.c:264: error: expected ')' before 'goto'
drivers/net/ibmveth.c:284: error: expected expression before '}' token
drivers/net/ibmveth.c:297: error: too few arguments to function 'dma_mapping_error'
drivers/net/ibmveth.c:298: error: expected ')' before 'dma_unmap_single'
drivers/net/ibmveth.c:306: error: expected expression before '}' token
drivers/net/ibmveth.c:491: error: too few arguments to function 'dma_mapping_error'
drivers/net/ibmveth.c:927: error: too few arguments to function 'dma_mapping_error'
drivers/net/ibmveth.c:927: error: expected ')' before '{' token
drivers/net/ibmveth.c:974: error: expected expression before '}' token
drivers/net/ibmveth.c:914: error: label 'out' used but not defined m

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

drivers/net/ibmveth.c

index 91ec9fd..a03fe1f 100644 (file)
@@ -260,7 +260,7 @@ static void ibmveth_replenish_buffer_pool(struct ibmveth_adapter *adapter, struc
                dma_addr = dma_map_single(&adapter->vdev->dev, skb->data,
                                pool->buff_size, DMA_FROM_DEVICE);
 
-               if (dma_mapping_error((&adapter->vdev->dev, dma_addr))
+               if (dma_mapping_error(&adapter->vdev->dev, dma_addr))
                        goto failure;
 
                pool->free_map[free_index] = IBM_VETH_INVALID_MAP;
@@ -294,7 +294,7 @@ failure:
                pool->consumer_index = pool->size - 1;
        else
                pool->consumer_index--;
-       if (!dma_mapping_error((&adapter->vdev->dev, dma_addr))
+       if (!dma_mapping_error(&adapter->vdev->dev, dma_addr))
                dma_unmap_single(&adapter->vdev->dev,
                                 pool->dma_addr[index], pool->buff_size,
                                 DMA_FROM_DEVICE);
@@ -488,7 +488,7 @@ static void ibmveth_cleanup(struct ibmveth_adapter *adapter)
                                                 &adapter->rx_buff_pool[i]);
 
        if (adapter->bounce_buffer != NULL) {
-               if (!dma_mapping_error(adapter->bounce_buffer_dma)) {
+               if (!dma_mapping_error(dev, adapter->bounce_buffer_dma)) {
                        dma_unmap_single(&adapter->vdev->dev,
                                        adapter->bounce_buffer_dma,
                                        adapter->netdev->mtu + IBMVETH_BUFF_OH,
@@ -924,7 +924,7 @@ static int ibmveth_start_xmit(struct sk_buff *skb, struct net_device *netdev)
                buf[1] = 0;
        }
 
-       if (dma_mapping_error((&adapter->vdev->dev, data_dma_addr)) {
+       if (dma_mapping_error(&adapter->vdev->dev, data_dma_addr)) {
                if (!firmware_has_feature(FW_FEATURE_CMO))
                        ibmveth_error_printk("tx: unable to map xmit buffer\n");
                skb_copy_from_linear_data(skb, adapter->bounce_buffer,