[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1421546666-21461-5-git-send-email-mathieu.poirier@linaro.org>
Date: Sat, 17 Jan 2015 19:04:26 -0700
From: mathieu.poirier@...aro.org
To: forest@...ttletooquiet.net, gregkh@...uxfoundation.org
Cc: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
mathieu.poirier@...aro.org
Subject: [PATCH 4/4] staging: vt6655: correcting parameter related sparse error
From: Mathieu Poirier <mathieu.poirier@...aro.org>
mpoirier@...0:~/work/kernel1$ make C=1 M=drivers/staging/vt6655/
LD drivers/staging/vt6655/built-in.o
CHECK drivers/staging/vt6655/device_main.c
drivers/staging/vt6655/device_main.c:1503:25: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/vt6655/device_main.c:1503:25: expected void [noderef] <asn:2>*<noident>
drivers/staging/vt6655/device_main.c:1503:25: got struct vnt_private *
drivers/staging/vt6655/device_main.c:1503:25: warning: incorrect type in argument 2 (different address spaces)
drivers/staging/vt6655/device_main.c:1503:25: expected void [noderef] <asn:2>*<noident>
drivers/staging/vt6655/device_main.c:1503:25: got struct vnt_private *
drivers/staging/vt6655/device_main.c:1505:25: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/vt6655/device_main.c:1505:25: expected void [noderef] <asn:2>*<noident>
drivers/staging/vt6655/device_main.c:1505:25: got struct vnt_private *
drivers/staging/vt6655/device_main.c:1505:25: warning: incorrect type in argument 2 (different address spaces)
drivers/staging/vt6655/device_main.c:1505:25: expected void [noderef] <asn:2>*<noident>
drivers/staging/vt6655/device_main.c:1505:25: got struct vnt_private *
In this case a pointer to "struct vnt_private" is given to macros @MACvRegBitsOn()
and @MACvRegBitsOff(). These in turn eventually call @ioread8(), which take a
"void __iomem *" as parameter. The first field of "struct vnt_private" is a
pointer to a "struct pci_dev", whose first field is a "struct list_head".
Correcting the problem by following the trend set fort in every other calls to
the macros by passing "->PortOffset", declared as "void __iomem *".
Signed-off-by: Mathieu Poirier <mathieu.poirier@...aro.org>
---
drivers/staging/vt6655/device_main.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index a3f5cd84259a..951ea5321d61 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -1500,9 +1500,11 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw,
if (conf->enable_beacon) {
vnt_beacon_enable(priv, vif, conf);
- MACvRegBitsOn(priv, MAC_REG_TCR, TCR_AUTOBCNTX);
+ MACvRegBitsOn(priv->PortOffset,
+ MAC_REG_TCR, TCR_AUTOBCNTX);
} else {
- MACvRegBitsOff(priv, MAC_REG_TCR, TCR_AUTOBCNTX);
+ MACvRegBitsOff(priv->PortOffset,
+ MAC_REG_TCR, TCR_AUTOBCNTX);
}
}
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists