summaryrefslogtreecommitdiffstats
path: root/net/ipv4/proc.c
diff options
context:
space:
mode:
authorJoe Perches2014-02-20 22:25:51 +0100
committerDavid S. Miller2014-02-25 23:36:35 +0100
commitcd2b0389dc304c6a7fa2ebae200f246059c68dd9 (patch)
tree6ca645d573cebfe45567671df3ef989549ba45c2 /net/ipv4/proc.c
parentnet: bcmgenet: remove unused bh_lock member (diff)
downloadkernel-qcow2-linux-cd2b0389dc304c6a7fa2ebae200f246059c68dd9.tar.gz
kernel-qcow2-linux-cd2b0389dc304c6a7fa2ebae200f246059c68dd9.tar.xz
kernel-qcow2-linux-cd2b0389dc304c6a7fa2ebae200f246059c68dd9.zip
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>
Diffstat (limited to 'net/ipv4/proc.c')
0 files changed, 0 insertions, 0 deletions