From patchwork Sat Oct 3 19:30:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Malcolm Priestley X-Patchwork-Id: 7322301 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 61DF59F1B9 for ; Sat, 3 Oct 2015 19:30:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 904442055C for ; Sat, 3 Oct 2015 19:30:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 44F2820452 for ; Sat, 3 Oct 2015 19:30:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750935AbbJCTao (ORCPT ); Sat, 3 Oct 2015 15:30:44 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:35480 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750834AbbJCTam (ORCPT ); Sat, 3 Oct 2015 15:30:42 -0400 Received: by wicge5 with SMTP id ge5so72164386wic.0 for ; Sat, 03 Oct 2015 12:30:41 -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=Qbi1tHTQc+HyNSVhGcOQm8VVG1fr/jWZsj23jMK+RMA=; b=peDIJDCV6QyqY+TjyTBrqkAnxua6NKABJvrjP/kR0emNN2Saoh7kev2MEdk8slV/dk hvRKqShxy8Umn1CdQZ5U9fRKK1F+XDvbKxJaF7Te7KXO6I3p+MsW1c16fRxwRHm0T9Z7 YsGSsm2ORTAL52+4PD6cAKah1XB6V6YZaItc5qoKU6poZWrO0euFQUIxE4nQygkOiRWz lwP5Wol3IjbxCb7/vEoHsbTYnmwdIKvZJ2N9Cc5LmYdjkXPhoshZndoWB0n4tiw4TNzI X1VmXpJKSgYdxRhqcvFfqsASPPREfLRdXWT193NTCVuZEbsS/wu4y8wX+I6FSfJRcCmM 9lpg== X-Received: by 10.180.81.199 with SMTP id c7mr3496264wiy.87.1443900641251; Sat, 03 Oct 2015 12:30:41 -0700 (PDT) Received: from tipsey.3.home (188.30.130.225.threembb.co.uk. [188.30.130.225]) by smtp.gmail.com with ESMTPSA id uq5sm17886714wjc.3.2015.10.03.12.30.40 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 03 Oct 2015 12:30:40 -0700 (PDT) From: Malcolm Priestley To: gregkh@linuxfoundation.org Cc: linux-wireless@vger.kernel.org, Malcolm Priestley Subject: [PATCH 2/6] staging: vt6655: device_main.c replace pDesc with desc. Date: Sat, 3 Oct 2015 20:30:23 +0100 Message-Id: <1443900627-2924-2-git-send-email-tvboxspy@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1443900627-2924-1-git-send-email-tvboxspy@gmail.com> References: <1443900627-2924-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=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, 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 Removing camel case. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6655/device_main.c | 80 ++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 603f189..41c08b3 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -545,19 +545,19 @@ static void device_init_rd0_ring(struct vnt_private *priv) { int i; dma_addr_t curr = priv->rd0_pool_dma; - struct vnt_rx_desc *pDesc; + struct vnt_rx_desc *desc; /* Init the RD0 ring entries */ for (i = 0; i < priv->sOpts.nRxDescs0; i ++, curr += sizeof(struct vnt_rx_desc)) { - pDesc = &(priv->aRD0Ring[i]); - pDesc->rd_info = alloc_rd_info(); + desc = &priv->aRD0Ring[i]; + desc->rd_info = alloc_rd_info(); - if (!device_alloc_rx_buf(priv, pDesc)) + if (!device_alloc_rx_buf(priv, desc)) dev_err(&priv->pcid->dev, "can not alloc rx bufs\n"); - pDesc->next = &(priv->aRD0Ring[(i+1) % priv->sOpts.nRxDescs0]); - pDesc->next_desc = cpu_to_le32(curr + sizeof(struct vnt_rx_desc)); + desc->next = &(priv->aRD0Ring[(i+1) % priv->sOpts.nRxDescs0]); + desc->next_desc = cpu_to_le32(curr + sizeof(struct vnt_rx_desc)); } if (i > 0) @@ -569,19 +569,19 @@ static void device_init_rd1_ring(struct vnt_private *priv) { int i; dma_addr_t curr = priv->rd1_pool_dma; - struct vnt_rx_desc *pDesc; + struct vnt_rx_desc *desc; /* Init the RD1 ring entries */ for (i = 0; i < priv->sOpts.nRxDescs1; i ++, curr += sizeof(struct vnt_rx_desc)) { - pDesc = &(priv->aRD1Ring[i]); - pDesc->rd_info = alloc_rd_info(); + desc = &priv->aRD1Ring[i]; + desc->rd_info = alloc_rd_info(); - if (!device_alloc_rx_buf(priv, pDesc)) + if (!device_alloc_rx_buf(priv, desc)) dev_err(&priv->pcid->dev, "can not alloc rx bufs\n"); - pDesc->next = &(priv->aRD1Ring[(i+1) % priv->sOpts.nRxDescs1]); - pDesc->next_desc = cpu_to_le32(curr + sizeof(struct vnt_rx_desc)); + desc->next = &(priv->aRD1Ring[(i+1) % priv->sOpts.nRxDescs1]); + desc->next_desc = cpu_to_le32(curr + sizeof(struct vnt_rx_desc)); } if (i > 0) @@ -594,15 +594,15 @@ static void device_free_rd0_ring(struct vnt_private *priv) int i; for (i = 0; i < priv->sOpts.nRxDescs0; i++) { - struct vnt_rx_desc *pDesc = &(priv->aRD0Ring[i]); - struct vnt_rd_info *rd_info = pDesc->rd_info; + struct vnt_rx_desc *desc = &(priv->aRD0Ring[i]); + struct vnt_rd_info *rd_info = desc->rd_info; dma_unmap_single(&priv->pcid->dev, rd_info->skb_dma, priv->rx_buf_sz, DMA_FROM_DEVICE); dev_kfree_skb(rd_info->skb); - kfree(pDesc->rd_info); + kfree(desc->rd_info); } } @@ -611,15 +611,15 @@ static void device_free_rd1_ring(struct vnt_private *priv) int i; for (i = 0; i < priv->sOpts.nRxDescs1; i++) { - struct vnt_rx_desc *pDesc = &(priv->aRD1Ring[i]); - struct vnt_rd_info *rd_info = pDesc->rd_info; + struct vnt_rx_desc *desc = &priv->aRD1Ring[i]; + struct vnt_rd_info *rd_info = desc->rd_info; dma_unmap_single(&priv->pcid->dev, rd_info->skb_dma, priv->rx_buf_sz, DMA_FROM_DEVICE); dev_kfree_skb(rd_info->skb); - kfree(pDesc->rd_info); + kfree(desc->rd_info); } } @@ -627,19 +627,19 @@ static void device_init_td0_ring(struct vnt_private *priv) { int i; dma_addr_t curr; - struct vnt_tx_desc *pDesc; + struct vnt_tx_desc *desc; curr = priv->td0_pool_dma; for (i = 0; i < priv->sOpts.nTxDescs[0]; i++, curr += sizeof(struct vnt_tx_desc)) { - pDesc = &(priv->apTD0Rings[i]); - pDesc->td_info = alloc_td_info(); + desc = &priv->apTD0Rings[i]; + desc->td_info = alloc_td_info(); - pDesc->td_info->buf = priv->tx0_bufs + i * PKT_BUF_SZ; - pDesc->td_info->buf_dma = priv->tx_bufs_dma0 + i * PKT_BUF_SZ; + desc->td_info->buf = priv->tx0_bufs + i * PKT_BUF_SZ; + desc->td_info->buf_dma = priv->tx_bufs_dma0 + i * PKT_BUF_SZ; - pDesc->next = &(priv->apTD0Rings[(i+1) % priv->sOpts.nTxDescs[0]]); - pDesc->next_desc = cpu_to_le32(curr + sizeof(struct vnt_tx_desc)); + desc->next = &(priv->apTD0Rings[(i+1) % priv->sOpts.nTxDescs[0]]); + desc->next_desc = cpu_to_le32(curr + sizeof(struct vnt_tx_desc)); } if (i > 0) @@ -651,20 +651,20 @@ static void device_init_td1_ring(struct vnt_private *priv) { int i; dma_addr_t curr; - struct vnt_tx_desc *pDesc; + struct vnt_tx_desc *desc; /* Init the TD ring entries */ curr = priv->td1_pool_dma; for (i = 0; i < priv->sOpts.nTxDescs[1]; i++, curr += sizeof(struct vnt_tx_desc)) { - pDesc = &(priv->apTD1Rings[i]); - pDesc->td_info = alloc_td_info(); + desc = &priv->apTD1Rings[i]; + desc->td_info = alloc_td_info(); - pDesc->td_info->buf = priv->tx1_bufs + i * PKT_BUF_SZ; - pDesc->td_info->buf_dma = priv->tx_bufs_dma1 + i * PKT_BUF_SZ; + desc->td_info->buf = priv->tx1_bufs + i * PKT_BUF_SZ; + desc->td_info->buf_dma = priv->tx_bufs_dma1 + i * PKT_BUF_SZ; - pDesc->next = &(priv->apTD1Rings[(i + 1) % priv->sOpts.nTxDescs[1]]); - pDesc->next_desc = cpu_to_le32(curr + sizeof(struct vnt_tx_desc)); + desc->next = &(priv->apTD1Rings[(i + 1) % priv->sOpts.nTxDescs[1]]); + desc->next_desc = cpu_to_le32(curr + sizeof(struct vnt_tx_desc)); } if (i > 0) @@ -677,11 +677,11 @@ static void device_free_td0_ring(struct vnt_private *priv) int i; for (i = 0; i < priv->sOpts.nTxDescs[0]; i++) { - struct vnt_tx_desc *pDesc = &priv->apTD0Rings[i]; - struct vnt_td_info *pTDInfo = pDesc->td_info; + struct vnt_tx_desc *desc = &priv->apTD0Rings[i]; + struct vnt_td_info *pTDInfo = desc->td_info; dev_kfree_skb(pTDInfo->skb); - kfree(pDesc->td_info); + kfree(desc->td_info); } } @@ -690,11 +690,11 @@ static void device_free_td1_ring(struct vnt_private *priv) int i; for (i = 0; i < priv->sOpts.nTxDescs[1]; i++) { - struct vnt_tx_desc *pDesc = &priv->apTD1Rings[i]; - struct vnt_td_info *pTDInfo = pDesc->td_info; + struct vnt_tx_desc *desc = &priv->apTD1Rings[i]; + struct vnt_td_info *pTDInfo = desc->td_info; dev_kfree_skb(pTDInfo->skb); - kfree(pDesc->td_info); + kfree(desc->td_info); } } @@ -890,9 +890,9 @@ static void device_error(struct vnt_private *priv, unsigned short status) } static void device_free_tx_buf(struct vnt_private *priv, - struct vnt_tx_desc *pDesc) + struct vnt_tx_desc *desc) { - struct vnt_td_info *pTDInfo = pDesc->td_info; + struct vnt_td_info *pTDInfo = desc->td_info; struct sk_buff *skb = pTDInfo->skb; if (skb)