From patchwork Wed Jul 22 18:16:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Malcolm Priestley X-Patchwork-Id: 6845731 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 65922C05AC for ; Wed, 22 Jul 2015 18:17:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 66CE0206CE for ; Wed, 22 Jul 2015 18:17:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6E05A206B2 for ; Wed, 22 Jul 2015 18:17:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751245AbbGVSRF (ORCPT ); Wed, 22 Jul 2015 14:17:05 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:37363 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750753AbbGVSRD (ORCPT ); Wed, 22 Jul 2015 14:17:03 -0400 Received: by wibud3 with SMTP id ud3so184779026wib.0 for ; Wed, 22 Jul 2015 11:17:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=i1KYU9WnJMPsi9q8HScfr8/cN7tiIQFswojsmtHolow=; b=vLYVKdtdAqDZwjzixRhz6zmfMGvZPgjEXgRIrokJ6QDI5iQJmb0ji4RsZ946BbTPwR 3Z7KfHSpWmul/AdxvNy1Utnx5lGtuePGfsDrPo1hbU3YEEHpH+wENORgtAt6VMptiNCq jMPmkoaFtRnGKfiASshy/gV9j7cdFIGpd1HiZCThiJ0Iu3sBhoNE249B7FeBsSE7ZkXR orFBh7Z/DCoTKLVLoH4l7FK+ptv5zFay7QGpE4QhNiiYwmL+1OwBDe+i8EZnHcdXGOXV nvEWO94u6zRIcXVemTPHNGQ20canFDO1vStBrctzxCx7UUNS8BxWUlU4rjRxoYLlclaL RZjg== X-Received: by 10.180.211.98 with SMTP id nb2mr38432277wic.91.1437589021906; Wed, 22 Jul 2015 11:17:01 -0700 (PDT) Received: from tipsey.3.home (188.30.183.207.threembb.co.uk. [188.30.183.207]) by smtp.gmail.com with ESMTPSA id ha4sm23219334wib.0.2015.07.22.11.17.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Jul 2015 11:17:00 -0700 (PDT) From: Malcolm Priestley To: gregkh@linuxfoundation.org Cc: linux-wireless@vger.kernel.org, Malcolm Priestley Subject: [PATCH 01/15] staging: vt6655: Remove ununsed macro ASSERT Date: Wed, 22 Jul 2015 19:16:33 +0100 Message-Id: <1437589007-5479-1-git-send-email-tvboxspy@gmail.com> X-Mailer: git-send-email 2.1.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP VIAWET_DEBUG is not defined so macro is empty. Remove the macro. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6655/baseband.c | 4 +--- drivers/staging/vt6655/card.c | 1 - drivers/staging/vt6655/device_cfg.h | 9 --------- drivers/staging/vt6655/device_main.c | 9 ++++----- drivers/staging/vt6655/mac.c | 1 - drivers/staging/vt6655/rxtx.c | 1 - 6 files changed, 5 insertions(+), 20 deletions(-) diff --git a/drivers/staging/vt6655/baseband.c b/drivers/staging/vt6655/baseband.c index b0ea38f..befaa42 100644 --- a/drivers/staging/vt6655/baseband.c +++ b/drivers/staging/vt6655/baseband.c @@ -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]; diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c index e00c060..df62bdc 100644 --- a/drivers/staging/vt6655/card.c +++ b/drivers/staging/vt6655/card.c @@ -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 */ diff --git a/drivers/staging/vt6655/device_cfg.h b/drivers/staging/vt6655/device_cfg.h index a4a8a84..c7f21716 100644 --- a/drivers/staging/vt6655/device_cfg.h +++ b/drivers/staging/vt6655/device_cfg.h @@ -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 diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 23ad16e..053291a 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -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, diff --git a/drivers/staging/vt6655/mac.c b/drivers/staging/vt6655/mac.c index aed530f..65dd49c 100644 --- a/drivers/staging/vt6655/mac.c +++ b/drivers/staging/vt6655/mac.c @@ -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); diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 534338c..0ffa9bf 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -387,7 +387,6 @@ s_uGetDataDuration( break; } - ASSERT(false); return 0; }