diff options
author | Joe Perches <joe@perches.com> | 2016-09-04 14:24:03 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-06 13:54:32 -0700 |
commit | 2591c280c375c547022eb619895c1aebbbc38219 (patch) | |
tree | 19932d8d7f6af8e9e4c9c3f1c413a871b0db4ff2 /drivers/net/ethernet/qlogic/qed/qed_int.c | |
parent | c7ee5672f38e3602e2c1bc935ba2f7c41b36bf40 (diff) | |
download | linux-2591c280c375c547022eb619895c1aebbbc38219.tar.gz linux-2591c280c375c547022eb619895c1aebbbc38219.tar.bz2 linux-2591c280c375c547022eb619895c1aebbbc38219.zip |
qed: Remove OOM messages
These messages are unnecessary as OOM allocation failures already do
a dump_stack() giving more or less the same information.
$ size drivers/net/ethernet/qlogic/qed/built-in.o* (defconfig x86-64)
text data bss dec hex filename
127817 27969 32800 188586 2e0aa drivers/net/ethernet/qlogic/qed/built-in.o.new
132474 27969 32800 193243 2f2db drivers/net/ethernet/qlogic/qed/built-in.o.old
Miscellanea:
o Change allocs to the generally preferred forms where possible.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qed/qed_int.c')
-rw-r--r-- | drivers/net/ethernet/qlogic/qed/qed_int.c | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_int.c b/drivers/net/ethernet/qlogic/qed/qed_int.c index 61ec973a06c7..2adedc6fb6cf 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_int.c +++ b/drivers/net/ethernet/qlogic/qed/qed_int.c @@ -2370,10 +2370,8 @@ static int qed_int_sb_attn_alloc(struct qed_hwfn *p_hwfn, /* SB struct */ p_sb = kmalloc(sizeof(*p_sb), GFP_KERNEL); - if (!p_sb) { - DP_NOTICE(cdev, "Failed to allocate `struct qed_sb_attn_info'\n"); + if (!p_sb) return -ENOMEM; - } /* SB ring */ p_virt = dma_alloc_coherent(&cdev->pdev->dev, @@ -2381,7 +2379,6 @@ static int qed_int_sb_attn_alloc(struct qed_hwfn *p_hwfn, &p_phys, GFP_KERNEL); if (!p_virt) { - DP_NOTICE(cdev, "Failed to allocate status block (attentions)\n"); kfree(p_sb); return -ENOMEM; } @@ -2667,17 +2664,14 @@ static int qed_int_sp_sb_alloc(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt) /* SB struct */ p_sb = kmalloc(sizeof(*p_sb), GFP_KERNEL); - if (!p_sb) { - DP_NOTICE(p_hwfn, "Failed to allocate `struct qed_sb_info'\n"); + if (!p_sb) return -ENOMEM; - } /* SB ring */ p_virt = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev, SB_ALIGNED_SIZE(p_hwfn), &p_phys, GFP_KERNEL); if (!p_virt) { - DP_NOTICE(p_hwfn, "Failed to allocate status block\n"); kfree(p_sb); return -ENOMEM; } @@ -2959,7 +2953,6 @@ int qed_int_igu_read_cam(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt) u16 prev_sb_id = 0xFF; p_hwfn->hw_info.p_igu_info = kzalloc(sizeof(*p_igu_info), GFP_KERNEL); - if (!p_hwfn->hw_info.p_igu_info) return -ENOMEM; @@ -3121,18 +3114,14 @@ int qed_int_alloc(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt) int rc = 0; rc = qed_int_sp_dpc_alloc(p_hwfn); - if (rc) { - DP_ERR(p_hwfn->cdev, "Failed to allocate sp dpc mem\n"); + if (rc) return rc; - } + rc = qed_int_sp_sb_alloc(p_hwfn, p_ptt); - if (rc) { - DP_ERR(p_hwfn->cdev, "Failed to allocate sp sb mem\n"); + if (rc) return rc; - } + rc = qed_int_sb_attn_alloc(p_hwfn, p_ptt); - if (rc) - DP_ERR(p_hwfn->cdev, "Failed to allocate sb attn mem\n"); return rc; } |