From: Philipp Hortmann <philipp.g.hortmann@gmail.com>
To: Forest Bond <forest@alittletooquiet.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH 4/5] staging: vt6655: Replace two VNSvInPortD with ioread64_lo_hi
Date: Sun, 24 Apr 2022 09:44:22 +0200 [thread overview]
Message-ID: <db5ba681cea27de815b172f8b93a8fd1efa30e99.1650784817.git.philipp.g.hortmann@gmail.com> (raw)
In-Reply-To: <cover.1650784817.git.philipp.g.hortmann@gmail.com>
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@gmail.com>
---
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
next prev parent reply other threads:[~2022-04-24 7:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-24 7:44 [PATCH 0/5] staging: vt6655: Replace macro VNSvInPortW,D with ioread16,32() Philipp Hortmann
2022-04-24 7:44 ` [PATCH 1/5] staging: vt6655: Replace VNSvInPortW with ioread16 Philipp Hortmann
2022-04-24 7:44 ` [PATCH 2/5] staging: vt6655: Replace MACvReadMIBCounter with VNSvInPortD Philipp Hortmann
2022-04-26 9:38 ` Greg Kroah-Hartman
2022-04-24 7:44 ` [PATCH 3/5] staging: vt6655: Replace MACvReadISR " Philipp Hortmann
2022-04-24 7:44 ` Philipp Hortmann [this message]
2022-04-24 11:27 ` [PATCH 4/5] staging: vt6655: Replace two VNSvInPortD with ioread64_lo_hi kernel test robot
2022-04-24 14:40 ` kernel test robot
2022-04-26 9:31 ` Greg Kroah-Hartman
2022-04-24 7:44 ` [PATCH 5/5] staging: vt6655: Replace VNSvInPortD with ioread32 Philipp Hortmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=db5ba681cea27de815b172f8b93a8fd1efa30e99.1650784817.git.philipp.g.hortmann@gmail.com \
--to=philipp.g.hortmann@gmail.com \
--cc=forest@alittletooquiet.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).