Commit c199fdb8 authored by Daode Huang's avatar Daode Huang Committed by David S. Miller

net: hinic: Remove unnecessary 'out of memory' message

This patch removes unnecessary out of memory message in hinic driver,
fixes the following checkpatch.pl warning:
"WARNING: Possible unnecessary 'out of memory' message"
Signed-off-by: default avatarDaode Huang <huangdaode@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a9d6df64
...@@ -629,10 +629,8 @@ static int alloc_cmd_buf(struct hinic_api_cmd_chain *chain, ...@@ -629,10 +629,8 @@ static int alloc_cmd_buf(struct hinic_api_cmd_chain *chain,
cmd_vaddr = dma_alloc_coherent(&pdev->dev, API_CMD_BUF_SIZE, cmd_vaddr = dma_alloc_coherent(&pdev->dev, API_CMD_BUF_SIZE,
&cmd_paddr, GFP_KERNEL); &cmd_paddr, GFP_KERNEL);
if (!cmd_vaddr) { if (!cmd_vaddr)
dev_err(&pdev->dev, "Failed to allocate API CMD DMA memory\n");
return -ENOMEM; return -ENOMEM;
}
cell_ctxt = &chain->cell_ctxt[cell_idx]; cell_ctxt = &chain->cell_ctxt[cell_idx];
...@@ -679,10 +677,8 @@ static int api_cmd_create_cell(struct hinic_api_cmd_chain *chain, ...@@ -679,10 +677,8 @@ static int api_cmd_create_cell(struct hinic_api_cmd_chain *chain,
node = dma_alloc_coherent(&pdev->dev, chain->cell_size, &node_paddr, node = dma_alloc_coherent(&pdev->dev, chain->cell_size, &node_paddr,
GFP_KERNEL); GFP_KERNEL);
if (!node) { if (!node)
dev_err(&pdev->dev, "Failed to allocate dma API CMD cell\n");
return -ENOMEM; return -ENOMEM;
}
node->read.hw_wb_resp_paddr = 0; node->read.hw_wb_resp_paddr = 0;
......
...@@ -443,15 +443,12 @@ static void mgmt_recv_msg_handler(struct hinic_pf_to_mgmt *pf_to_mgmt, ...@@ -443,15 +443,12 @@ static void mgmt_recv_msg_handler(struct hinic_pf_to_mgmt *pf_to_mgmt,
struct pci_dev *pdev = pf_to_mgmt->hwif->pdev; struct pci_dev *pdev = pf_to_mgmt->hwif->pdev;
mgmt_work = kzalloc(sizeof(*mgmt_work), GFP_KERNEL); mgmt_work = kzalloc(sizeof(*mgmt_work), GFP_KERNEL);
if (!mgmt_work) { if (!mgmt_work)
dev_err(&pdev->dev, "Allocate mgmt work memory failed\n");
return; return;
}
if (recv_msg->msg_len) { if (recv_msg->msg_len) {
mgmt_work->msg = kzalloc(recv_msg->msg_len, GFP_KERNEL); mgmt_work->msg = kzalloc(recv_msg->msg_len, GFP_KERNEL);
if (!mgmt_work->msg) { if (!mgmt_work->msg) {
dev_err(&pdev->dev, "Allocate mgmt msg memory failed\n");
kfree(mgmt_work); kfree(mgmt_work);
return; return;
} }
......
...@@ -414,7 +414,6 @@ int hinic_init_rq(struct hinic_rq *rq, struct hinic_hwif *hwif, ...@@ -414,7 +414,6 @@ int hinic_init_rq(struct hinic_rq *rq, struct hinic_hwif *hwif,
rq->pi_virt_addr = dma_alloc_coherent(&pdev->dev, pi_size, rq->pi_virt_addr = dma_alloc_coherent(&pdev->dev, pi_size,
&rq->pi_dma_addr, GFP_KERNEL); &rq->pi_dma_addr, GFP_KERNEL);
if (!rq->pi_virt_addr) { if (!rq->pi_virt_addr) {
dev_err(&pdev->dev, "Failed to allocate PI address\n");
err = -ENOMEM; err = -ENOMEM;
goto err_pi_virt; goto err_pi_virt;
} }
......
...@@ -137,10 +137,8 @@ static struct sk_buff *rx_alloc_skb(struct hinic_rxq *rxq, ...@@ -137,10 +137,8 @@ static struct sk_buff *rx_alloc_skb(struct hinic_rxq *rxq,
int err; int err;
skb = netdev_alloc_skb_ip_align(rxq->netdev, rxq->rq->buf_sz); skb = netdev_alloc_skb_ip_align(rxq->netdev, rxq->rq->buf_sz);
if (!skb) { if (!skb)
netdev_err(rxq->netdev, "Failed to allocate Rx SKB\n");
return NULL; return NULL;
}
addr = dma_map_single(&pdev->dev, skb->data, rxq->rq->buf_sz, addr = dma_map_single(&pdev->dev, skb->data, rxq->rq->buf_sz,
DMA_FROM_DEVICE); DMA_FROM_DEVICE);
...@@ -212,10 +210,8 @@ static int rx_alloc_pkts(struct hinic_rxq *rxq) ...@@ -212,10 +210,8 @@ static int rx_alloc_pkts(struct hinic_rxq *rxq)
for (i = 0; i < free_wqebbs; i++) { for (i = 0; i < free_wqebbs; i++) {
skb = rx_alloc_skb(rxq, &dma_addr); skb = rx_alloc_skb(rxq, &dma_addr);
if (!skb) { if (!skb)
netdev_err(rxq->netdev, "Failed to alloc Rx skb\n");
goto skb_out; goto skb_out;
}
hinic_set_sge(&sge, dma_addr, skb->len); hinic_set_sge(&sge, dma_addr, skb->len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment