From patchwork Sun Feb 28 19:02:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Malcolm Priestley X-Patchwork-Id: 8447691 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 19785C0553 for ; Sun, 28 Feb 2016 19:03:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2F439202E9 for ; Sun, 28 Feb 2016 19:03:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3D0FF202DD for ; Sun, 28 Feb 2016 19:03:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754716AbcB1TDR (ORCPT ); Sun, 28 Feb 2016 14:03:17 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34809 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754548AbcB1TDN (ORCPT ); Sun, 28 Feb 2016 14:03:13 -0500 Received: by mail-wm0-f65.google.com with SMTP id p65so6613059wmp.1 for ; Sun, 28 Feb 2016 11:03:12 -0800 (PST) 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=Hc1jfE1lNIOWFEO9itp+xa7QSKsks/0ucNfeMXBi48E=; b=kS/j0Qt4nC5e2mLXr9/Q4O2+EZXylMtGStCmoCUWfLIYwMD10l23IyyOlzP+6f+k2t IqtFlwrskXWzn9HfM7gnmKtWSurOK812mWHhdCfx1XSqYOBq84i2U8dBKYZrcvQ5dJT2 gpk8CfCdEVRCIxVy46VHxZoEXsfTEEFx+tHjZOWNnmH3dV1aYxtXYQytSDu7qldwIJtN +Z3Lo1G4G6tFHtNwJSghzhkfzXJk1uhTJ7PN09fIU2QRmmgx0eo7+kjwZ9C0dZkqtpt1 cfuGSUNLtjCd/06iAeln/jU6MAjdqLRd0QUav0jXw2by8XcWhvuQbpQS5EOx2jVFHsL/ EBDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Hc1jfE1lNIOWFEO9itp+xa7QSKsks/0ucNfeMXBi48E=; b=JQFtwfAIZkEn1+O93w6dd/jOofK9dVIIu7DrKUDHHRkWA8fUwpECtsApKzZDc6zqY9 CjGyVkEnfuliXcx822MkUEB0L/GbFV2uziSHm5i/5kyZJIeA15gvGRmFUF6nR8FAS/+x oE3ZM7alwydrPVblfoAlS6sLN7pGUm30R3eAjvVevqHcMmgTa3qT5Ev63RxyPw26+8Kg 2Y26aeVGLyYrDeKxnOkw8QNYUzAwsxjWs4qfL7gO/OyBwvHcTKWbcTrYP44hhtIiX0bX lZAiVPVlx8MAqvyP+ugt58eU4vqPj4Uk/k2fGdG80Srdpzr7AAbGsaC49q//PnoMwmd1 HaIg== X-Gm-Message-State: AD7BkJI8y+8nJKAseiI+TyiR4ZDWaaG+i0y7ftDoxwhjvZW7cAGERPt8xizT36PYk4l0xA== X-Received: by 10.28.232.194 with SMTP id f63mr8500345wmi.48.1456686191435; Sun, 28 Feb 2016 11:03:11 -0800 (PST) Received: from tipsey.3.home (188.31.161.124.threembb.co.uk. [188.31.161.124]) by smtp.gmail.com with ESMTPSA id w144sm12685086wmd.8.2016.02.28.11.03.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 28 Feb 2016 11:03:11 -0800 (PST) From: Malcolm Priestley To: gregkh@linuxfoundation.org Cc: linux-wireless@vger.kernel.org, Malcolm Priestley Subject: [PATCH 3/4] staging: vt6655: replace VNSvInPortD dwData reads with ioread32 Date: Sun, 28 Feb 2016 19:02:56 +0000 Message-Id: <1456686177-3167-3-git-send-email-tvboxspy@gmail.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1456686177-3167-1-git-send-email-tvboxspy@gmail.com> References: <1456686177-3167-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, 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 Removing dwData variable altogether. The reads are always 32 bit insize. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6655/mac.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/drivers/staging/vt6655/mac.c b/drivers/staging/vt6655/mac.c index 893fc52..c935922 100644 --- a/drivers/staging/vt6655/mac.c +++ b/drivers/staging/vt6655/mac.c @@ -117,10 +117,8 @@ bool MACbIsRegBitsOff(struct vnt_private *priv, unsigned char byRegOfs, bool MACbIsIntDisable(struct vnt_private *priv) { void __iomem *io_base = priv->PortOffset; - unsigned long dwData; - VNSvInPortD(io_base + MAC_REG_IMR, &dwData); - if (dwData != 0) + if (ioread32(io_base + MAC_REG_IMR)) return false; return true; @@ -363,7 +361,6 @@ bool MACbSafeRxOff(struct vnt_private *priv) { void __iomem *io_base = priv->PortOffset; unsigned short ww; - unsigned long dwData; /* turn off wow temp for turn off Rx safely */ @@ -371,8 +368,7 @@ bool MACbSafeRxOff(struct vnt_private *priv) VNSvOutPortD(io_base + MAC_REG_RXDMACTL0, DMACTL_CLRRUN); VNSvOutPortD(io_base + MAC_REG_RXDMACTL1, DMACTL_CLRRUN); for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { - VNSvInPortD(io_base + MAC_REG_RXDMACTL0, &dwData); - if (!(dwData & DMACTL_RUN)) + if (!(ioread32(io_base + MAC_REG_RXDMACTL0) & DMACTL_RUN)) break; } if (ww == W_MAX_TIMEOUT) { @@ -380,8 +376,7 @@ bool MACbSafeRxOff(struct vnt_private *priv) return false; } for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { - VNSvInPortD(io_base + MAC_REG_RXDMACTL1, &dwData); - if (!(dwData & DMACTL_RUN)) + if (!(ioread32(io_base + MAC_REG_RXDMACTL1) & DMACTL_RUN)) break; } if (ww == W_MAX_TIMEOUT) { @@ -420,7 +415,6 @@ bool MACbSafeTxOff(struct vnt_private *priv) { void __iomem *io_base = priv->PortOffset; unsigned short ww; - unsigned long dwData; /* Clear TX DMA */ /* Tx0 */ @@ -429,8 +423,7 @@ bool MACbSafeTxOff(struct vnt_private *priv) VNSvOutPortD(io_base + MAC_REG_AC0DMACTL, DMACTL_CLRRUN); for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { - VNSvInPortD(io_base + MAC_REG_TXDMACTL0, &dwData); - if (!(dwData & DMACTL_RUN)) + if (!(ioread32(io_base + MAC_REG_TXDMACTL0) & DMACTL_RUN)) break; } if (ww == W_MAX_TIMEOUT) { @@ -438,8 +431,7 @@ bool MACbSafeTxOff(struct vnt_private *priv) return false; } for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { - VNSvInPortD(io_base + MAC_REG_AC0DMACTL, &dwData); - if (!(dwData & DMACTL_RUN)) + if (!(ioread32(io_base + MAC_REG_AC0DMACTL) & DMACTL_RUN)) break; } if (ww == W_MAX_TIMEOUT) {