From patchwork Sat Aug 15 20:57:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Malcolm Priestley X-Patchwork-Id: 7021481 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 EDBF0C05AC for ; Sat, 15 Aug 2015 20:58:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E251D20524 for ; Sat, 15 Aug 2015 20:58:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CEC1020523 for ; Sat, 15 Aug 2015 20:58:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754557AbbHOU6P (ORCPT ); Sat, 15 Aug 2015 16:58:15 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:36716 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754229AbbHOU6H (ORCPT ); Sat, 15 Aug 2015 16:58:07 -0400 Received: by wicja10 with SMTP id ja10so43297812wic.1 for ; Sat, 15 Aug 2015 13:58:06 -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=TLpJzRc13VCS0sM/W/CmY3bNtVL9tNCgDhj+XkyXeR4=; b=dFE8pfnFBLf95zageJ1CttODgO+fU6XIDrM6Lgw/l4MhFGkZAuFEa5BUx4tuwJB3Qf +tOxRUUsIGgbXaX8SvY8zrqSXAWETXIVxHZTh4mp5fNTPtU/E5ApUTmA4qsQ+l9IjiaT M8JOdnd4ZCj1wnIb+MNQsRa1S2IRi5ijd+fadMIM/T4p3KFOHqOLKbY0qrSeXQ/+p4sI rKx8AWHn8PAdmRKGNxmceoanryvmsH8YhBI6HpT0oyPpfNQUQlpSUa/HMOTqTaUSigf6 N6OsOwttAG3Ie8/H/0aCIuEI3gz3ADyf+rXqHAn2+48HJSn3N2sKe8qG5kGP4nATt33F y+jw== X-Received: by 10.180.19.102 with SMTP id d6mr19190088wie.86.1439672286260; Sat, 15 Aug 2015 13:58:06 -0700 (PDT) Received: from tipsey.3.home (188.31.160.140.threembb.co.uk. [188.31.160.140]) by smtp.gmail.com with ESMTPSA id jr5sm14438355wjc.14.2015.08.15.13.58.05 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 15 Aug 2015 13:58:05 -0700 (PDT) From: Malcolm Priestley To: gregkh@linuxfoundation.org Cc: linux-wireless@vger.kernel.org, Malcolm Priestley Subject: [PATCH 3/4] staging: vt6655: replace typedef struct tagDEVICE_RD_INFO Date: Sat, 15 Aug 2015 21:57:34 +0100 Message-Id: <1439672255-2548-3-git-send-email-tvboxspy@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1439672255-2548-1-git-send-email-tvboxspy@gmail.com> References: <1439672255-2548-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 with struct vnt_rd_info volatile is removed because it will generate a warning (in any case this member is not) and renaming rd_info. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6655/desc.h | 6 +++--- drivers/staging/vt6655/device.h | 4 ++-- drivers/staging/vt6655/device_main.c | 24 ++++++++++++------------ drivers/staging/vt6655/dpc.c | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/staging/vt6655/desc.h b/drivers/staging/vt6655/desc.h index eb0c7c3..752c546 100644 --- a/drivers/staging/vt6655/desc.h +++ b/drivers/staging/vt6655/desc.h @@ -167,10 +167,10 @@ * leads error. */ -typedef struct tagDEVICE_RD_INFO { +struct vnt_rd_info { struct sk_buff *skb; dma_addr_t skb_dma; -} DEVICE_RD_INFO, *PDEVICE_RD_INFO; +}; struct vnt_rdes0 { volatile __le16 res_count; @@ -201,7 +201,7 @@ typedef struct tagSRxDesc { volatile __le32 buff_addr; volatile __le32 next_desc; struct tagSRxDesc *next __aligned(8); - volatile PDEVICE_RD_INFO pRDInfo __aligned(8); + struct vnt_rd_info *rd_info __aligned(8); } __attribute__ ((__packed__)) SRxDesc, *PSRxDesc; typedef const SRxDesc *PCSRxDesc; diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h index c9fa6ef..80cc170 100644 --- a/drivers/staging/vt6655/device.h +++ b/drivers/staging/vt6655/device.h @@ -410,9 +410,9 @@ struct vnt_private { struct ieee80211_low_level_stats low_stats; }; -static inline PDEVICE_RD_INFO alloc_rd_info(void) +static inline struct vnt_rd_info *alloc_rd_info(void) { - return kzalloc(sizeof(DEVICE_RD_INFO), GFP_ATOMIC); + return kzalloc(sizeof(struct vnt_rd_info), GFP_ATOMIC); } static inline struct vnt_td_info *alloc_td_info(void) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 22c1957..defdcc0 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -622,7 +622,7 @@ static void device_init_rd0_ring(struct vnt_private *pDevice) /* Init the RD0 ring entries */ for (i = 0; i < pDevice->sOpts.nRxDescs0; i ++, curr += sizeof(SRxDesc)) { pDesc = &(pDevice->aRD0Ring[i]); - pDesc->pRDInfo = alloc_rd_info(); + pDesc->rd_info = alloc_rd_info(); if (!device_alloc_rx_buf(pDevice, pDesc)) dev_err(&pDevice->pcid->dev, "can not alloc rx bufs\n"); @@ -645,7 +645,7 @@ static void device_init_rd1_ring(struct vnt_private *pDevice) /* Init the RD1 ring entries */ for (i = 0; i < pDevice->sOpts.nRxDescs1; i ++, curr += sizeof(SRxDesc)) { pDesc = &(pDevice->aRD1Ring[i]); - pDesc->pRDInfo = alloc_rd_info(); + pDesc->rd_info = alloc_rd_info(); if (!device_alloc_rx_buf(pDevice, pDesc)) dev_err(&pDevice->pcid->dev, "can not alloc rx bufs\n"); @@ -665,14 +665,14 @@ static void device_free_rd0_ring(struct vnt_private *pDevice) for (i = 0; i < pDevice->sOpts.nRxDescs0; i++) { PSRxDesc pDesc = &(pDevice->aRD0Ring[i]); - PDEVICE_RD_INFO pRDInfo = pDesc->pRDInfo; + struct vnt_rd_info *rd_info = pDesc->rd_info; - dma_unmap_single(&pDevice->pcid->dev, pRDInfo->skb_dma, + dma_unmap_single(&pDevice->pcid->dev, rd_info->skb_dma, pDevice->rx_buf_sz, DMA_FROM_DEVICE); - dev_kfree_skb(pRDInfo->skb); + dev_kfree_skb(rd_info->skb); - kfree(pDesc->pRDInfo); + kfree(pDesc->rd_info); } } @@ -682,14 +682,14 @@ static void device_free_rd1_ring(struct vnt_private *pDevice) for (i = 0; i < pDevice->sOpts.nRxDescs1; i++) { PSRxDesc pDesc = &(pDevice->aRD1Ring[i]); - PDEVICE_RD_INFO pRDInfo = pDesc->pRDInfo; + struct vnt_rd_info *rd_info = pDesc->rd_info; - dma_unmap_single(&pDevice->pcid->dev, pRDInfo->skb_dma, + dma_unmap_single(&pDevice->pcid->dev, rd_info->skb_dma, pDevice->rx_buf_sz, DMA_FROM_DEVICE); - dev_kfree_skb(pRDInfo->skb); + dev_kfree_skb(rd_info->skb); - kfree(pDesc->pRDInfo); + kfree(pDesc->rd_info); } } @@ -783,7 +783,7 @@ static int device_rx_srv(struct vnt_private *pDevice, unsigned int uIdx) if (works++ > 15) break; - if (!pRD->pRDInfo->skb) + if (!pRD->rd_info->skb) break; if (vnt_receive_frame(pDevice, pRD)) { @@ -803,7 +803,7 @@ static int device_rx_srv(struct vnt_private *pDevice, unsigned int uIdx) static bool device_alloc_rx_buf(struct vnt_private *pDevice, PSRxDesc pRD) { - PDEVICE_RD_INFO pRDInfo = pRD->pRDInfo; + struct vnt_rd_info *pRDInfo = pRD->rd_info; pRDInfo->skb = dev_alloc_skb((int)pDevice->rx_buf_sz); if (pRDInfo->skb == NULL) diff --git a/drivers/staging/vt6655/dpc.c b/drivers/staging/vt6655/dpc.c index ef39cbe..4659185 100644 --- a/drivers/staging/vt6655/dpc.c +++ b/drivers/staging/vt6655/dpc.c @@ -134,7 +134,7 @@ static bool vnt_rx_data(struct vnt_private *priv, struct sk_buff *skb, bool vnt_receive_frame(struct vnt_private *priv, PSRxDesc curr_rd) { - PDEVICE_RD_INFO rd_info = curr_rd->pRDInfo; + struct vnt_rd_info *rd_info = curr_rd->rd_info; struct sk_buff *skb; u16 frame_size;