linux_dsm_epyc7002/drivers/net/ethernet/broadcom
Joe Perches cd2b0389dc bnx2x: Remove hidden flow control goto from BNX2X_ALLOC macros
BNX2X_ALLOC macros use "goto alloc_mem_err"
so these labels appear unused in some functions.

Expand these macros in-place via coccinelle and
some typing.

Update the macros to use statement expressions
and remove the BNX2X_ALLOC macro.

This adds some > 80 char lines.

$ cat bnx2x_pci_alloc.cocci
@@
expression e1;
expression e2;
expression e3;
@@
-	BNX2X_PCI_ALLOC(e1, e2, e3);
+	e1 = BNX2X_PCI_ALLOC(e2, e3); if (!e1) goto alloc_mem_err;

@@
expression e1;
expression e2;
expression e3;
@@
-	BNX2X_PCI_FALLOC(e1, e2, e3);
+	e1 = BNX2X_PCI_FALLOC(e2, e3); if (!e1) goto alloc_mem_err;

@@
expression e1;
expression e2;
@@
-	BNX2X_ALLOC(e1, e2);
+	e1 = kzalloc(e2, GFP_KERNEL); if (!e1) goto alloc_mem_err;

@@
expression e1;
expression e2;
expression e3;
@@
-	kzalloc(sizeof(e1) * e2, e3)
+	kcalloc(e2, sizeof(e1), e3)

@@
expression e1;
expression e2;
expression e3;
@@
-	kzalloc(e1 * sizeof(e2), e3)
+	kcalloc(e1, sizeof(e2), e3)

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-02-25 17:36:35 -05:00
..
bnx2x bnx2x: Remove hidden flow control goto from BNX2X_ALLOC macros 2014-02-25 17:36:35 -05:00
genet net: bcmgenet: remove unused bh_lock member 2014-02-24 20:26:37 -05:00
b44.c b44: use fixed PHY device if we do not find any 2013-12-20 20:48:49 -05:00
b44.h b44: use fixed PHY device if we do not find any 2013-12-20 20:48:49 -05:00
bcm63xx_enet.c bcm63xx_enet: remove deprecated IRQF_DISABLED 2013-09-11 16:09:58 -04:00
bcm63xx_enet.h bcm63xx_enet: add support Broadcom BCM6345 Ethernet 2013-06-13 17:22:08 -07:00
bgmac.c bgmac: propagate error codes in bgmac_probe() 2014-01-14 18:19:20 -08:00
bgmac.h bgmac: add support for Northstar SoC (BCM4707, BCM53018) 2014-01-04 20:25:20 -05:00
bnx2_fw.h
bnx2.c bnx2: Use pci_enable_msix_range() instead of pci_enable_msix() 2014-02-18 15:33:29 -05:00
bnx2.h bnx2: Report MDI/MDIX status to ethtool. 2014-01-01 22:03:38 -05:00
cnic_defs.h cnic: Update version to 2.5.17 and copyright year. 2013-07-29 22:03:07 -07:00
cnic_if.h cnic: Add a signature to indicate valid doorbell offset. 2014-01-01 22:08:08 -05:00
cnic.c cnic: Add a signature to indicate valid doorbell offset. 2014-01-01 22:08:08 -05:00
cnic.h cnic: Add a signature to indicate valid doorbell offset. 2014-01-01 22:08:08 -05:00
Kconfig net: bcmgenet: hook into the build system 2014-02-14 00:27:58 -05:00
Makefile net: bcmgenet: hook into the build system 2014-02-14 00:27:58 -05:00
sb1250-mac.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
tg3.c tg3: Use pci_enable_msix_range() instead of pci_enable_msix() 2014-02-18 15:33:29 -05:00
tg3.h tg3: Poll cpmu link state on APE + ASF enabled devices 2014-01-03 20:59:52 -05:00