[PATCH 4/5] staging: vt6655: Replace two VNSvInPortD with ioread64_lo_hi

From: Philipp Hortmann
Date: Sun Apr 24 2022 - 03:44:35 EST


Replace two macros VNSvInPortD (32 Bit reads) with one ioread64_lo_hi.
The names of macro and the arguments use CamelCase which is not
accepted by checkpatch.pl

Since there are more than one checkpatch issue per line,
more steps are rquired to fix.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@xxxxxxxxx>
---
Used this code for testing:
VNSvInPortD(iobase + MAC_REG_TSFCNTR, (u32 *)pqwCurrTSF);
VNSvInPortD(iobase + MAC_REG_TSFCNTR + 4, (u32 *)pqwCurrTSF + 1);
dev_info(&priv->pcid->dev, "CARDbGetCurrentTSF *pqwCurrTSF: %llx", *pqwCurrTSF);
dev_info(&priv->pcid->dev, "CARDbGetCurrentTSF temp_ph: %llx",
ioread64_lo_hi(iobase + MAC_REG_TSFCNTR));
output:
[ +0.000085] vt6655 0000:01:05.0: CARDbGetCurrentTSF *pqwCurrTSF: 117e7e
[ +0.000005] vt6655 0000:01:05.0: CARDbGetCurrentTSF temp_ph: 117e7e
[ +0.000009] vt6655 0000:01:05.0: CARDbGetCurrentTSF *pqwCurrTSF: 39756d7f
[ +0.000005] vt6655 0000:01:05.0: CARDbGetCurrentTSF temp_ph: 39756d7f
[ +0.000009] vt6655 0000:01:05.0: CARDbGetCurrentTSF *pqwCurrTSF: 39756d8d
[ +0.000004] vt6655 0000:01:05.0: CARDbGetCurrentTSF temp_ph: 39756d8d
---
drivers/staging/vt6655/card.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c
index 022310af5485..5da25140ed4b 100644
--- a/drivers/staging/vt6655/card.c
+++ b/drivers/staging/vt6655/card.c
@@ -30,6 +30,7 @@
#include "desc.h"
#include "rf.h"
#include "power.h"
+#include <linux/io.h>

/*--------------------- Static Definitions -------------------------*/

@@ -753,8 +754,7 @@ bool CARDbGetCurrentTSF(struct vnt_private *priv, u64 *pqwCurrTSF)
}
if (ww == W_MAX_TIMEOUT)
return false;
- VNSvInPortD(iobase + MAC_REG_TSFCNTR, (u32 *)pqwCurrTSF);
- VNSvInPortD(iobase + MAC_REG_TSFCNTR + 4, (u32 *)pqwCurrTSF + 1);
+ *pqwCurrTSF = ioread64_lo_hi(iobase + MAC_REG_TSFCNTR);

return true;
}
--
2.25.1