staging: vt6655: Remove ununsed macro ASSERT
authorMalcolm Priestley <tvboxspy@gmail.com>
Wed, 22 Jul 2015 18:16:33 +0000 (19:16 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jul 2015 03:51:37 +0000 (20:51 -0700)
VIAWET_DEBUG is not defined so macro is empty.

Remove the macro.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6655/baseband.c
drivers/staging/vt6655/card.c
drivers/staging/vt6655/device_cfg.h
drivers/staging/vt6655/device_main.c
drivers/staging/vt6655/mac.c
drivers/staging/vt6655/rxtx.c

index b0ea38f1911c1bdca61a95b25208126d141645d7..befaa4259fbfbef2c6b08eec2529544add3c8b1b 100644 (file)
@@ -1728,10 +1728,8 @@ BBuGetFrameTime(
        unsigned int uRateIdx = (unsigned int) wRate;
        unsigned int uRate = 0;
 
-       if (uRateIdx > RATE_54M) {
-               ASSERT(0);
+       if (uRateIdx > RATE_54M)
                return 0;
-       }
 
        uRate = (unsigned int)awcFrameTime[uRateIdx];
 
index e00c0605d1541556492c8ab46d5d4db8156a30f6..df62bdc4410851c5e8d93c11feaabb4142126d66 100644 (file)
@@ -847,7 +847,6 @@ void CARDvSetLoopbackMode(struct vnt_private *priv, unsigned short wLoopbackMode
        case CARD_LB_PHY:
                break;
        default:
-               ASSERT(false);
                break;
        }
        /* set MAC loopback */
index a4a8a8489e0befe93488c80130c53f92422ce98e..c7f21716b4f02be04281d3d7642b539702748cc3 100644 (file)
@@ -70,17 +70,8 @@ typedef enum  _chip_type {
 } CHIP_TYPE, *PCHIP_TYPE;
 
 #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)
 #else
-#define ASSERT(x)
 #define DBG_PORT80(value)
 #endif
 
index 23ad16eb1d2a46da64a25ac23f3a9e964b195df6..053291a8e844803ae48027f7ddb7aaf5f877be33 100644 (file)
@@ -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)) {
                pDesc = &(pDevice->aRD0Ring[i]);
                pDesc->pRDInfo = alloc_rd_info();
-               ASSERT(pDesc->pRDInfo);
+
                if (!device_alloc_rx_buf(pDevice, pDesc))
                        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)
        for (i = 0; i < pDevice->sOpts.nRxDescs1; i ++, curr += sizeof(SRxDesc)) {
                pDesc = &(pDevice->aRD1Ring[i]);
                pDesc->pRDInfo = alloc_rd_info();
-               ASSERT(pDesc->pRDInfo);
+
                if (!device_alloc_rx_buf(pDevice, pDesc))
                        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)
        for (i = 0; i < pDevice->sOpts.nTxDescs[0]; i++, curr += sizeof(STxDesc)) {
                pDesc = &(pDevice->apTD0Rings[i]);
                pDesc->pTDInfo = alloc_td_info();
-               ASSERT(pDesc->pTDInfo);
+
                if (pDevice->flags & DEVICE_FLAGS_TX_ALIGN) {
                        pDesc->pTDInfo->buf = pDevice->tx0_bufs + (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)
        for (i = 0; i < pDevice->sOpts.nTxDescs[1]; i++, curr += sizeof(STxDesc)) {
                pDesc = &(pDevice->apTD1Rings[i]);
                pDesc->pTDInfo = alloc_td_info();
-               ASSERT(pDesc->pTDInfo);
+
                if (pDevice->flags & DEVICE_FLAGS_TX_ALIGN) {
                        pDesc->pTDInfo->buf = pDevice->tx1_bufs + (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)
        pRDInfo->skb = dev_alloc_skb((int)pDevice->rx_buf_sz);
        if (pRDInfo->skb == NULL)
                return false;
-       ASSERT(pRDInfo->skb);
 
        pRDInfo->skb_dma =
                dma_map_single(&pDevice->pcid->dev,
index aed530f022b8cf817f3cf703dac8e4d61d21ddf5..65dd49cda33397efa756c23743f100d8ca792e7d 100644 (file)
@@ -186,7 +186,6 @@ void MACvSetLoopbackMode(void __iomem *dwIoBase, unsigned char byLoopbackMode)
 {
        unsigned char byOrgValue;
 
-       ASSERT(byLoopbackMode < 3);
        byLoopbackMode <<= 6;
        /* set TCR */
        VNSvInPortB(dwIoBase + MAC_REG_TEST, &byOrgValue);
index 534338c466197013a5b66a8b3f0e7fe74982e490..0ffa9bf712be4d69d84d3271716a1b5056ea3e68 100644 (file)
@@ -387,7 +387,6 @@ s_uGetDataDuration(
                break;
        }
 
-       ASSERT(false);
        return 0;
 }