Commit 42f709ef authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6655: pr_err remove string to net device name

Just print driver name with dev_err removing the string formatting.
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 74316949
...@@ -1043,8 +1043,7 @@ static bool device_init_rings(struct vnt_private *pDevice) ...@@ -1043,8 +1043,7 @@ static bool device_init_rings(struct vnt_private *pDevice)
pDevice->sOpts.nTxDescs[1] * sizeof(STxDesc), pDevice->sOpts.nTxDescs[1] * sizeof(STxDesc),
&pDevice->pool_dma); &pDevice->pool_dma);
if (vir_pool == NULL) { if (vir_pool == NULL) {
pr_err("%s : allocate desc dma memory failed\n", dev_err(&pDevice->pcid->dev, "allocate desc dma memory failed\n");
pDevice->dev->name);
return false; return false;
} }
...@@ -1063,8 +1062,8 @@ static bool device_init_rings(struct vnt_private *pDevice) ...@@ -1063,8 +1062,8 @@ static bool device_init_rings(struct vnt_private *pDevice)
CB_MAX_BUF_SIZE, CB_MAX_BUF_SIZE,
&pDevice->tx_bufs_dma0); &pDevice->tx_bufs_dma0);
if (pDevice->tx0_bufs == NULL) { if (pDevice->tx0_bufs == NULL) {
pr_err("%s: allocate buf dma memory failed\n", dev_err(&pDevice->pcid->dev, "allocate buf dma memory failed\n");
pDevice->dev->name);
pci_free_consistent(pDevice->pcid, pci_free_consistent(pDevice->pcid,
pDevice->sOpts.nRxDescs0 * sizeof(SRxDesc) + pDevice->sOpts.nRxDescs0 * sizeof(SRxDesc) +
pDevice->sOpts.nRxDescs1 * sizeof(SRxDesc) + pDevice->sOpts.nRxDescs1 * sizeof(SRxDesc) +
...@@ -1141,10 +1140,9 @@ static void device_init_rd0_ring(struct vnt_private *pDevice) ...@@ -1141,10 +1140,9 @@ static void device_init_rd0_ring(struct vnt_private *pDevice)
pDesc = &(pDevice->aRD0Ring[i]); pDesc = &(pDevice->aRD0Ring[i]);
pDesc->pRDInfo = alloc_rd_info(); pDesc->pRDInfo = alloc_rd_info();
ASSERT(pDesc->pRDInfo); ASSERT(pDesc->pRDInfo);
if (!device_alloc_rx_buf(pDevice, pDesc)) { if (!device_alloc_rx_buf(pDevice, pDesc))
pr_err("%s: can not alloc rx bufs\n", dev_err(&pDevice->pcid->dev, "can not alloc rx bufs\n");
pDevice->dev->name);
}
pDesc->next = &(pDevice->aRD0Ring[(i+1) % pDevice->sOpts.nRxDescs0]); pDesc->next = &(pDevice->aRD0Ring[(i+1) % pDevice->sOpts.nRxDescs0]);
pDesc->pRDInfo->curr_desc = cpu_to_le32(curr); pDesc->pRDInfo->curr_desc = cpu_to_le32(curr);
pDesc->next_desc = cpu_to_le32(curr + sizeof(SRxDesc)); pDesc->next_desc = cpu_to_le32(curr + sizeof(SRxDesc));
...@@ -1166,10 +1164,9 @@ static void device_init_rd1_ring(struct vnt_private *pDevice) ...@@ -1166,10 +1164,9 @@ static void device_init_rd1_ring(struct vnt_private *pDevice)
pDesc = &(pDevice->aRD1Ring[i]); pDesc = &(pDevice->aRD1Ring[i]);
pDesc->pRDInfo = alloc_rd_info(); pDesc->pRDInfo = alloc_rd_info();
ASSERT(pDesc->pRDInfo); ASSERT(pDesc->pRDInfo);
if (!device_alloc_rx_buf(pDevice, pDesc)) { if (!device_alloc_rx_buf(pDevice, pDesc))
pr_err("%s: can not alloc rx bufs\n", dev_err(&pDevice->pcid->dev, "can not alloc rx bufs\n");
pDevice->dev->name);
}
pDesc->next = &(pDevice->aRD1Ring[(i+1) % pDevice->sOpts.nRxDescs1]); pDesc->next = &(pDevice->aRD1Ring[(i+1) % pDevice->sOpts.nRxDescs1]);
pDesc->pRDInfo->curr_desc = cpu_to_le32(curr); pDesc->pRDInfo->curr_desc = cpu_to_le32(curr);
pDesc->next_desc = cpu_to_le32(curr + sizeof(SRxDesc)); pDesc->next_desc = cpu_to_le32(curr + sizeof(SRxDesc));
...@@ -1188,10 +1185,8 @@ static void device_init_defrag_cb(struct vnt_private *pDevice) ...@@ -1188,10 +1185,8 @@ static void device_init_defrag_cb(struct vnt_private *pDevice)
/* Init the fragment ctl entries */ /* Init the fragment ctl entries */
for (i = 0; i < CB_MAX_RX_FRAG; i++) { for (i = 0; i < CB_MAX_RX_FRAG; i++) {
pDeF = &(pDevice->sRxDFCB[i]); pDeF = &(pDevice->sRxDFCB[i]);
if (!device_alloc_frag_buf(pDevice, pDeF)) { if (!device_alloc_frag_buf(pDevice, pDeF))
pr_err("%s: can not alloc frag bufs\n", dev_err(&pDevice->pcid->dev, "can not alloc frag bufs\n");
pDevice->dev->name);
}
} }
pDevice->cbDFCB = CB_MAX_RX_FRAG; pDevice->cbDFCB = CB_MAX_RX_FRAG;
pDevice->cbFreeDFCB = pDevice->cbDFCB; pDevice->cbFreeDFCB = pDevice->cbDFCB;
...@@ -1348,8 +1343,8 @@ static int device_rx_srv(struct vnt_private *pDevice, unsigned int uIdx) ...@@ -1348,8 +1343,8 @@ static int device_rx_srv(struct vnt_private *pDevice, unsigned int uIdx)
break; break;
if (device_receive_frame(pDevice, pRD)) { if (device_receive_frame(pDevice, pRD)) {
if (!device_alloc_rx_buf(pDevice, pRD)) { if (!device_alloc_rx_buf(pDevice, pRD)) {
pr_err("%s: can not allocate rx buf\n", dev_err(&pDevice->pcid->dev,
pDevice->dev->name); "can not allocate rx buf\n");
break; break;
} }
} }
...@@ -1525,7 +1520,8 @@ static int device_tx_srv(struct vnt_private *pDevice, unsigned int uIdx) ...@@ -1525,7 +1520,8 @@ static int device_tx_srv(struct vnt_private *pDevice, unsigned int uIdx)
static void device_error(struct vnt_private *pDevice, unsigned short status) static void device_error(struct vnt_private *pDevice, unsigned short status)
{ {
if (status & ISR_FETALERR) { if (status & ISR_FETALERR) {
pr_err("%s: Hardware fatal error\n", pDevice->dev->name); dev_err(&pDevice->pcid->dev, "Hardware fatal error\n");
netif_stop_queue(pDevice->dev); netif_stop_queue(pDevice->dev);
del_timer(&pDevice->sTimerCommand); del_timer(&pDevice->sTimerCommand);
del_timer(&(pDevice->pMgmt->sTimerSecondCallback)); del_timer(&(pDevice->pMgmt->sTimerSecondCallback));
......
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