Commit 217ed3ab authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6655: Remove ununsed macro ASSERT

VIAWET_DEBUG is not defined so macro is empty.

Remove the macro.
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 83aa2ac6
...@@ -1728,10 +1728,8 @@ BBuGetFrameTime( ...@@ -1728,10 +1728,8 @@ BBuGetFrameTime(
unsigned int uRateIdx = (unsigned int) wRate; unsigned int uRateIdx = (unsigned int) wRate;
unsigned int uRate = 0; unsigned int uRate = 0;
if (uRateIdx > RATE_54M) { if (uRateIdx > RATE_54M)
ASSERT(0);
return 0; return 0;
}
uRate = (unsigned int)awcFrameTime[uRateIdx]; uRate = (unsigned int)awcFrameTime[uRateIdx];
......
...@@ -847,7 +847,6 @@ void CARDvSetLoopbackMode(struct vnt_private *priv, unsigned short wLoopbackMode ...@@ -847,7 +847,6 @@ void CARDvSetLoopbackMode(struct vnt_private *priv, unsigned short wLoopbackMode
case CARD_LB_PHY: case CARD_LB_PHY:
break; break;
default: default:
ASSERT(false);
break; break;
} }
/* set MAC loopback */ /* set MAC loopback */
......
...@@ -70,17 +70,8 @@ typedef enum _chip_type { ...@@ -70,17 +70,8 @@ typedef enum _chip_type {
} CHIP_TYPE, *PCHIP_TYPE; } CHIP_TYPE, *PCHIP_TYPE;
#ifdef VIAWET_DEBUG #ifdef VIAWET_DEBUG
#define ASSERT(x) \
do { \
if (!(x)) { \
pr_err("assertion %s failed: file %s line %d\n", \
#x, __func__, __LINE__); \
*(int *)0 = 0; \
} \
} while (0)
#define DBG_PORT80(value) outb(value, 0x80) #define DBG_PORT80(value) outb(value, 0x80)
#else #else
#define ASSERT(x)
#define DBG_PORT80(value) #define DBG_PORT80(value)
#endif #endif
......
...@@ -623,7 +623,7 @@ static void device_init_rd0_ring(struct vnt_private *pDevice) ...@@ -623,7 +623,7 @@ static void device_init_rd0_ring(struct vnt_private *pDevice)
for (i = 0; i < pDevice->sOpts.nRxDescs0; i ++, curr += sizeof(SRxDesc)) { for (i = 0; i < pDevice->sOpts.nRxDescs0; i ++, curr += sizeof(SRxDesc)) {
pDesc = &(pDevice->aRD0Ring[i]); pDesc = &(pDevice->aRD0Ring[i]);
pDesc->pRDInfo = alloc_rd_info(); pDesc->pRDInfo = alloc_rd_info();
ASSERT(pDesc->pRDInfo);
if (!device_alloc_rx_buf(pDevice, pDesc)) if (!device_alloc_rx_buf(pDevice, pDesc))
dev_err(&pDevice->pcid->dev, "can not alloc rx bufs\n"); dev_err(&pDevice->pcid->dev, "can not alloc rx bufs\n");
...@@ -647,7 +647,7 @@ static void device_init_rd1_ring(struct vnt_private *pDevice) ...@@ -647,7 +647,7 @@ static void device_init_rd1_ring(struct vnt_private *pDevice)
for (i = 0; i < pDevice->sOpts.nRxDescs1; i ++, curr += sizeof(SRxDesc)) { for (i = 0; i < pDevice->sOpts.nRxDescs1; i ++, curr += sizeof(SRxDesc)) {
pDesc = &(pDevice->aRD1Ring[i]); pDesc = &(pDevice->aRD1Ring[i]);
pDesc->pRDInfo = alloc_rd_info(); pDesc->pRDInfo = alloc_rd_info();
ASSERT(pDesc->pRDInfo);
if (!device_alloc_rx_buf(pDevice, pDesc)) if (!device_alloc_rx_buf(pDevice, pDesc))
dev_err(&pDevice->pcid->dev, "can not alloc rx bufs\n"); dev_err(&pDevice->pcid->dev, "can not alloc rx bufs\n");
...@@ -705,7 +705,7 @@ static void device_init_td0_ring(struct vnt_private *pDevice) ...@@ -705,7 +705,7 @@ static void device_init_td0_ring(struct vnt_private *pDevice)
for (i = 0; i < pDevice->sOpts.nTxDescs[0]; i++, curr += sizeof(STxDesc)) { for (i = 0; i < pDevice->sOpts.nTxDescs[0]; i++, curr += sizeof(STxDesc)) {
pDesc = &(pDevice->apTD0Rings[i]); pDesc = &(pDevice->apTD0Rings[i]);
pDesc->pTDInfo = alloc_td_info(); pDesc->pTDInfo = alloc_td_info();
ASSERT(pDesc->pTDInfo);
if (pDevice->flags & DEVICE_FLAGS_TX_ALIGN) { if (pDevice->flags & DEVICE_FLAGS_TX_ALIGN) {
pDesc->pTDInfo->buf = pDevice->tx0_bufs + (i)*PKT_BUF_SZ; pDesc->pTDInfo->buf = pDevice->tx0_bufs + (i)*PKT_BUF_SZ;
pDesc->pTDInfo->buf_dma = pDevice->tx_bufs_dma0 + (i)*PKT_BUF_SZ; pDesc->pTDInfo->buf_dma = pDevice->tx_bufs_dma0 + (i)*PKT_BUF_SZ;
...@@ -731,7 +731,7 @@ static void device_init_td1_ring(struct vnt_private *pDevice) ...@@ -731,7 +731,7 @@ static void device_init_td1_ring(struct vnt_private *pDevice)
for (i = 0; i < pDevice->sOpts.nTxDescs[1]; i++, curr += sizeof(STxDesc)) { for (i = 0; i < pDevice->sOpts.nTxDescs[1]; i++, curr += sizeof(STxDesc)) {
pDesc = &(pDevice->apTD1Rings[i]); pDesc = &(pDevice->apTD1Rings[i]);
pDesc->pTDInfo = alloc_td_info(); pDesc->pTDInfo = alloc_td_info();
ASSERT(pDesc->pTDInfo);
if (pDevice->flags & DEVICE_FLAGS_TX_ALIGN) { if (pDevice->flags & DEVICE_FLAGS_TX_ALIGN) {
pDesc->pTDInfo->buf = pDevice->tx1_bufs + (i) * PKT_BUF_SZ; pDesc->pTDInfo->buf = pDevice->tx1_bufs + (i) * PKT_BUF_SZ;
pDesc->pTDInfo->buf_dma = pDevice->tx_bufs_dma1 + (i) * PKT_BUF_SZ; pDesc->pTDInfo->buf_dma = pDevice->tx_bufs_dma1 + (i) * PKT_BUF_SZ;
...@@ -818,7 +818,6 @@ static bool device_alloc_rx_buf(struct vnt_private *pDevice, PSRxDesc pRD) ...@@ -818,7 +818,6 @@ static bool device_alloc_rx_buf(struct vnt_private *pDevice, PSRxDesc pRD)
pRDInfo->skb = dev_alloc_skb((int)pDevice->rx_buf_sz); pRDInfo->skb = dev_alloc_skb((int)pDevice->rx_buf_sz);
if (pRDInfo->skb == NULL) if (pRDInfo->skb == NULL)
return false; return false;
ASSERT(pRDInfo->skb);
pRDInfo->skb_dma = pRDInfo->skb_dma =
dma_map_single(&pDevice->pcid->dev, dma_map_single(&pDevice->pcid->dev,
......
...@@ -186,7 +186,6 @@ void MACvSetLoopbackMode(void __iomem *dwIoBase, unsigned char byLoopbackMode) ...@@ -186,7 +186,6 @@ void MACvSetLoopbackMode(void __iomem *dwIoBase, unsigned char byLoopbackMode)
{ {
unsigned char byOrgValue; unsigned char byOrgValue;
ASSERT(byLoopbackMode < 3);
byLoopbackMode <<= 6; byLoopbackMode <<= 6;
/* set TCR */ /* set TCR */
VNSvInPortB(dwIoBase + MAC_REG_TEST, &byOrgValue); VNSvInPortB(dwIoBase + MAC_REG_TEST, &byOrgValue);
......
...@@ -387,7 +387,6 @@ s_uGetDataDuration( ...@@ -387,7 +387,6 @@ s_uGetDataDuration(
break; break;
} }
ASSERT(false);
return 0; return 0;
} }
......
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