From patchwork Wed Jul 22 18:16:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Malcolm Priestley X-Patchwork-Id: 6845741 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 866E8C05AD for ; Wed, 22 Jul 2015 18:17:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A92F2206B2 for ; Wed, 22 Jul 2015 18:17:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 693E5206D0 for ; Wed, 22 Jul 2015 18:17:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751504AbbGVSRK (ORCPT ); Wed, 22 Jul 2015 14:17:10 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:36630 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750753AbbGVSRG (ORCPT ); Wed, 22 Jul 2015 14:17:06 -0400 Received: by wicgb10 with SMTP id gb10so109849080wic.1 for ; Wed, 22 Jul 2015 11:17:05 -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:in-reply-to:references; bh=3ssaD6Da3uaTdUjkv4QiavWT+NFCNZ2xk3nNzI0NZS8=; b=zEfYNykPQPwLQcJ+5Qk+K5jVgkdTPVWXzhgFNMWhGlVkxhw366ljnvLGdiI86z6kxf +tymw67s75xJsqsycVXSE3ITIFg1QbAqn5yaXb7ZYmaE2NrYNpPf/rrvfooqdMTSGcoh phhd4anUT62UGcmuxWoDnwqzueXh2X3lEO8srPgGfXzEgDW7cwCjIQKfZHns5YQnIk7V 2CujFGpja2f6nk1FK9NRpcyXRrAe+sFf7bdJlVlobzAaOExgGghLgXhClOdyjI2NFqfU wEFx6YGbbaH2x0GL6r7LkuKd2xFX0hycLEELcJ0JSSA/gmIwZH0+d89iuxiV1Ab54kLh MDow== X-Received: by 10.194.85.130 with SMTP id h2mr8146975wjz.2.1437589025086; Wed, 22 Jul 2015 11:17:05 -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.03 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Jul 2015 11:17:04 -0700 (PDT) From: Malcolm Priestley To: gregkh@linuxfoundation.org Cc: linux-wireless@vger.kernel.org, Malcolm Priestley Subject: [PATCH 03/15] staging: vt6655: dead code tx path remove dma_unmap_single Date: Wed, 22 Jul 2015 19:16:35 +0100 Message-Id: <1437589007-5479-3-git-send-email-tvboxspy@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1437589007-5479-1-git-send-email-tvboxspy@gmail.com> References: <1437589007-5479-1-git-send-email-tvboxspy@gmail.com> 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 When pTDInfo->skb_dma not equal to pTDInfo->buf_dma, pTDInfo->skb_dma equals zero. as mentioned in comment pre-allocated buf_dma can't be unmapped so remove dead code. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6655/device_main.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 053291a..695aa25 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -754,10 +754,6 @@ static void device_free_td0_ring(struct vnt_private *pDevice) PSTxDesc pDesc = &(pDevice->apTD0Rings[i]); PDEVICE_TD_INFO pTDInfo = pDesc->pTDInfo; - if (pTDInfo->skb_dma && (pTDInfo->skb_dma != pTDInfo->buf_dma)) - dma_unmap_single(&pDevice->pcid->dev, pTDInfo->skb_dma, - pTDInfo->skb->len, DMA_TO_DEVICE); - dev_kfree_skb(pTDInfo->skb); kfree(pDesc->pTDInfo); } @@ -771,10 +767,6 @@ static void device_free_td1_ring(struct vnt_private *pDevice) PSTxDesc pDesc = &(pDevice->apTD1Rings[i]); PDEVICE_TD_INFO pTDInfo = pDesc->pTDInfo; - if (pTDInfo->skb_dma && (pTDInfo->skb_dma != pTDInfo->buf_dma)) - dma_unmap_single(&pDevice->pcid->dev, pTDInfo->skb_dma, - pTDInfo->skb->len, DMA_TO_DEVICE); - dev_kfree_skb(pTDInfo->skb); kfree(pDesc->pTDInfo); } @@ -975,12 +967,6 @@ static void device_free_tx_buf(struct vnt_private *pDevice, PSTxDesc pDesc) PDEVICE_TD_INFO pTDInfo = pDesc->pTDInfo; struct sk_buff *skb = pTDInfo->skb; - /* pre-allocated buf_dma can't be unmapped. */ - if (pTDInfo->skb_dma && (pTDInfo->skb_dma != pTDInfo->buf_dma)) { - dma_unmap_single(&pDevice->pcid->dev, pTDInfo->skb_dma, - skb->len, DMA_TO_DEVICE); - } - if (skb) ieee80211_tx_status_irqsafe(pDevice->hw, skb);