linux_dsm_epyc7002/drivers/net/ethernet/3com
Sylvain "ythier" Hitier 88b09a6d95 3c59x: fix bad split of cpu_to_le32(pci_map_single())
In commit 6f2b6a3005,
  # 3c59x: Add dma error checking and recovery
the intent is to split out the mapping from the byte-swapping in order to
insert a dma_mapping_error() check.

Kinda this semantic patch:

    // See http://coccinelle.lip6.fr/
    //
    // Beware, grouik-and-dirty!
    @@
    expression DEV, X, Y, Z;
    @@
    -   cpu_to_le32(pci_map_single(DEV, X, Y, Z))
    +   dma_addr_t addr = pci_map_single(DEV, X, Y, Z);
    +   if (dma_mapping_error(&DEV->dev, addr))
    +       /* snip */;
    +   cpu_to_le32(addr)

However, the #else part (of the #if DO_ZEROCOPY test) is changed this way:

    -   cpu_to_le32(pci_map_single(DEV, X, Y, Z))
    +   dma_addr_t addr = cpu_to_le32(pci_map_single(DEV, X, Y, Z));
    //                    ^^^^^^^^^^^
    //                    That mismatches the 3 other changes!
    +   if (dma_mapping_error(&DEV->dev, addr))
    +       /* snip */;
    +   cpu_to_le32(addr)

Let's remove the leftover cpu_to_le32() for coherency.

v2: Better changelog.
v3: Add Acked-by

Fixes: 6f2b6a3005
  # 3c59x: Add dma error checking and recovery
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Sylvain "ythier" Hitier <sylvain.hitier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-10-07 13:16:06 -04:00
..
3c59x.c 3c59x: fix bad split of cpu_to_le32(pci_map_single()) 2014-10-07 13:16:06 -04:00
3c509.c net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
3c515.c ethtool: fix drvinfo strings set in drivers 2013-01-06 21:06:31 -08:00
3c574_cs.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
3c589_cs.c net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
Kconfig Kconfig: rename HAS_IOPORT to HAS_IOPORT_MAP 2014-04-07 16:36:11 -07:00
Makefile drivers/net: delete old 8bit ISA 3c501 driver. 2013-01-22 10:39:49 -05:00
typhoon.c PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
typhoon.h