diff options
author | Philipp Hortmann <philipp.g.hortmann@gmail.com> | 2022-05-01 22:25:41 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-05-05 23:21:04 +0200 |
commit | 60a16985171c4e53e98facf40dfe035f7e34fc83 (patch) | |
tree | 6f122fe848aafd90152992d0ebda04930b73f7bf /drivers/staging | |
parent | fed5b53385f313bf7a6efa9649bf20a12eead833 (diff) | |
download | linux-stable-60a16985171c4e53e98facf40dfe035f7e34fc83.tar.gz linux-stable-60a16985171c4e53e98facf40dfe035f7e34fc83.tar.bz2 linux-stable-60a16985171c4e53e98facf40dfe035f7e34fc83.zip |
staging: vt6655: Replace unused return value of vt6655_get_current_tsf
Replace unused return value with u64 to increase readability,
reduce address and dereference operators and omit pqwCurrTSF that
uses CamelCase which is not accepted by checkpatch.pl
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/62c83d78627196ec0ce2f5a562cb080a1c87a05a.1651435890.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/vt6655/card.c | 18 | ||||
-rw-r--r-- | drivers/staging/vt6655/card.h | 2 | ||||
-rw-r--r-- | drivers/staging/vt6655/device_main.c | 2 |
3 files changed, 10 insertions, 12 deletions
diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c index c8372701bf43..d3c47b37ad3b 100644 --- a/drivers/staging/vt6655/card.c +++ b/drivers/staging/vt6655/card.c @@ -288,7 +288,7 @@ bool CARDbUpdateTSF(struct vnt_private *priv, unsigned char byRxRate, u64 local_tsf; u64 qwTSFOffset = 0; - vt6655_get_current_tsf(priv, &local_tsf); + local_tsf = vt6655_get_current_tsf(priv); if (qwBSSTimestamp != local_tsf) { qwTSFOffset = CARDqGetTSFOffset(byRxRate, qwBSSTimestamp, @@ -320,9 +320,9 @@ bool CARDbUpdateTSF(struct vnt_private *priv, unsigned char byRxRate, bool CARDbSetBeaconPeriod(struct vnt_private *priv, unsigned short wBeaconInterval) { - u64 qwNextTBTT = 0; + u64 qwNextTBTT; - vt6655_get_current_tsf(priv, &qwNextTBTT); /* Get Local TSF counter */ + qwNextTBTT = vt6655_get_current_tsf(priv); /* Get Local TSF counter */ qwNextTBTT = CARDqGetNextTBTT(qwNextTBTT, wBeaconInterval); @@ -739,7 +739,7 @@ u64 CARDqGetTSFOffset(unsigned char byRxRate, u64 qwTSF1, u64 qwTSF2) * * Return Value: true if success; otherwise false */ -bool vt6655_get_current_tsf(struct vnt_private *priv, u64 *pqwCurrTSF) +u64 vt6655_get_current_tsf(struct vnt_private *priv) { void __iomem *iobase = priv->port_offset; unsigned short ww; @@ -753,12 +753,10 @@ bool vt6655_get_current_tsf(struct vnt_private *priv, u64 *pqwCurrTSF) break; } if (ww == W_MAX_TIMEOUT) - return false; + return 0; low = ioread32(iobase + MAC_REG_TSFCNTR); high = ioread32(iobase + MAC_REG_TSFCNTR + 4); - *pqwCurrTSF = le64_to_cpu(low + ((u64)high << 32)); - - return true; + return le64_to_cpu(low + ((u64)high << 32)); } /* @@ -805,9 +803,9 @@ void CARDvSetFirstNextTBTT(struct vnt_private *priv, unsigned short wBeaconInterval) { void __iomem *iobase = priv->port_offset; - u64 qwNextTBTT = 0; + u64 qwNextTBTT; - vt6655_get_current_tsf(priv, &qwNextTBTT); /* Get Local TSF counter */ + qwNextTBTT = vt6655_get_current_tsf(priv); /* Get Local TSF counter */ qwNextTBTT = CARDqGetNextTBTT(qwNextTBTT, wBeaconInterval); /* Set NextTBTT */ diff --git a/drivers/staging/vt6655/card.h b/drivers/staging/vt6655/card.h index 340516b329e3..22dc359a6565 100644 --- a/drivers/staging/vt6655/card.h +++ b/drivers/staging/vt6655/card.h @@ -46,7 +46,7 @@ void CARDvSetFirstNextTBTT(struct vnt_private *priv, unsigned short wBeaconInterval); void CARDvUpdateNextTBTT(struct vnt_private *priv, u64 qwTSF, unsigned short wBeaconInterval); -bool vt6655_get_current_tsf(struct vnt_private *priv, u64 *pqwCurrTSF); +u64 vt6655_get_current_tsf(struct vnt_private *priv); u64 CARDqGetNextTBTT(u64 qwTSF, unsigned short wBeaconInterval); u64 CARDqGetTSFOffset(unsigned char byRxRate, u64 qwTSF1, u64 qwTSF2); unsigned char CARDbyGetPktType(struct vnt_private *priv); diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index bb8a30eefc74..4f26f5c7e84f 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -1603,7 +1603,7 @@ static u64 vnt_get_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif) struct vnt_private *priv = hw->priv; u64 tsf; - vt6655_get_current_tsf(priv, &tsf); + tsf = vt6655_get_current_tsf(priv); return tsf; } |