staging: vt6655: Replace VNSvOutPortW with iowrite16
authorPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Sun, 22 May 2022 19:48:49 +0000 (21:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Jun 2022 05:58:40 +0000 (07:58 +0200)
Replace macro VNSvOutPortW with iowrite16 because it replaces
just one line.
The name of macro and the arguments use CamelCase which
is not accepted by checkpatch.pl

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/ded437e27cffb040865d4afe47e447c2d0d6f0b8.1653203927.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6655/card.c
drivers/staging/vt6655/device_main.c
drivers/staging/vt6655/mac.h
drivers/staging/vt6655/power.c
drivers/staging/vt6655/rf.c
drivers/staging/vt6655/rxtx.c
drivers/staging/vt6655/upc.h

index 2cde008..72043a2 100644 (file)
@@ -326,7 +326,7 @@ bool CARDbSetBeaconPeriod(struct vnt_private *priv,
        qwNextTBTT = CARDqGetNextTBTT(qwNextTBTT, wBeaconInterval);
 
        /* set HW beacon interval */
-       VNSvOutPortW(priv->port_offset + MAC_REG_BI, wBeaconInterval);
+       iowrite16(wBeaconInterval, priv->port_offset + MAC_REG_BI);
        priv->wBeaconInterval = wBeaconInterval;
        /* Set NextTBTT */
        VNSvOutPortD(priv->port_offset + MAC_REG_NEXTTBTT, (u32)qwNextTBTT);
@@ -587,68 +587,59 @@ void CARDvSetRSPINF(struct vnt_private *priv, u8 bb_type)
                                   bb_type,
                                   &byTxRate,
                                   &byRsvTime);
-       VNSvOutPortW(priv->port_offset + MAC_REG_RSPINF_A_6,
-                    MAKEWORD(byTxRate, byRsvTime));
+       iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_6);
        /* RSPINF_a_9 */
        s_vCalculateOFDMRParameter(RATE_9M,
                                   bb_type,
                                   &byTxRate,
                                   &byRsvTime);
-       VNSvOutPortW(priv->port_offset + MAC_REG_RSPINF_A_9,
-                    MAKEWORD(byTxRate, byRsvTime));
+       iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_9);
        /* RSPINF_a_12 */
        s_vCalculateOFDMRParameter(RATE_12M,
                                   bb_type,
                                   &byTxRate,
                                   &byRsvTime);
-       VNSvOutPortW(priv->port_offset + MAC_REG_RSPINF_A_12,
-                    MAKEWORD(byTxRate, byRsvTime));
+       iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_12);
        /* RSPINF_a_18 */
        s_vCalculateOFDMRParameter(RATE_18M,
                                   bb_type,
                                   &byTxRate,
                                   &byRsvTime);
-       VNSvOutPortW(priv->port_offset + MAC_REG_RSPINF_A_18,
-                    MAKEWORD(byTxRate, byRsvTime));
+       iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_18);
        /* RSPINF_a_24 */
        s_vCalculateOFDMRParameter(RATE_24M,
                                   bb_type,
                                   &byTxRate,
                                   &byRsvTime);
-       VNSvOutPortW(priv->port_offset + MAC_REG_RSPINF_A_24,
-                    MAKEWORD(byTxRate, byRsvTime));
+       iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_24);
        /* RSPINF_a_36 */
        s_vCalculateOFDMRParameter(CARDwGetOFDMControlRate((void *)priv,
                                                           RATE_36M),
                                   bb_type,
                                   &byTxRate,
                                   &byRsvTime);
-       VNSvOutPortW(priv->port_offset + MAC_REG_RSPINF_A_36,
-                    MAKEWORD(byTxRate, byRsvTime));
+       iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_36);
        /* RSPINF_a_48 */
        s_vCalculateOFDMRParameter(CARDwGetOFDMControlRate((void *)priv,
                                                           RATE_48M),
                                   bb_type,
                                   &byTxRate,
                                   &byRsvTime);
-       VNSvOutPortW(priv->port_offset + MAC_REG_RSPINF_A_48,
-                    MAKEWORD(byTxRate, byRsvTime));
+       iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_48);
        /* RSPINF_a_54 */
        s_vCalculateOFDMRParameter(CARDwGetOFDMControlRate((void *)priv,
                                                           RATE_54M),
                                   bb_type,
                                   &byTxRate,
                                   &byRsvTime);
-       VNSvOutPortW(priv->port_offset + MAC_REG_RSPINF_A_54,
-                    MAKEWORD(byTxRate, byRsvTime));
+       iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_54);
        /* RSPINF_a_72 */
        s_vCalculateOFDMRParameter(CARDwGetOFDMControlRate((void *)priv,
                                                           RATE_54M),
                                   bb_type,
                                   &byTxRate,
                                   &byRsvTime);
-       VNSvOutPortW(priv->port_offset + MAC_REG_RSPINF_A_72,
-                    MAKEWORD(byTxRate, byRsvTime));
+       iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_72);
        /* Set to Page0 */
        MACvSelectPage0(priv->port_offset);
 
index afaf331..5f28d9e 100644 (file)
@@ -1060,8 +1060,7 @@ static void vnt_interrupt_process(struct vnt_private *priv)
                if (isr & ISR_FETALERR) {
                        pr_debug(" ISR_FETALERR\n");
                        iowrite8(0, priv->port_offset + MAC_REG_SOFTPWRCTL);
-                       VNSvOutPortW(priv->port_offset +
-                                    MAC_REG_SOFTPWRCTL, SOFTPWRCTL_SWPECTI);
+                       iowrite16(SOFTPWRCTL_SWPECTI, priv->port_offset + MAC_REG_SOFTPWRCTL);
                        device_error(priv, isr);
                }
 
index 23ebae9..ebadf52 100644 (file)
@@ -548,7 +548,7 @@ do {                                                                        \
 do {                                                                   \
        unsigned short wData;                                           \
        wData = ioread16(iobase + byRegOfs);                            \
-       VNSvOutPortW(iobase + byRegOfs, wData | (wBits));               \
+       iowrite16(wData | (wBits), iobase + byRegOfs);                  \
 } while (0)
 
 #define MACvRegBitsOff(iobase, byRegOfs, byBits)                       \
@@ -562,7 +562,7 @@ do {                                                                        \
 do {                                                                   \
        unsigned short wData;                                           \
        wData = ioread16(iobase + byRegOfs);                            \
-       VNSvOutPortW(iobase + byRegOfs, wData & ~(wBits));              \
+       iowrite16(wData & ~(wBits), iobase + byRegOfs);                 \
 } while (0)
 
 /* set the chip with current BCN tx descriptor address */
index 06066fa..0bd2ddc 100644 (file)
@@ -52,10 +52,10 @@ void PSvEnablePowerSaving(struct vnt_private *priv,
        u16 wAID = priv->current_aid | BIT(14) | BIT(15);
 
        /* set period of power up before TBTT */
-       VNSvOutPortW(priv->port_offset + MAC_REG_PWBT, C_PWBT);
+       iowrite16(C_PWBT, priv->port_offset + MAC_REG_PWBT);
        if (priv->op_mode != NL80211_IFTYPE_ADHOC) {
                /* set AID */
-               VNSvOutPortW(priv->port_offset + MAC_REG_AIDATIM, wAID);
+               iowrite16(wAID, priv->port_offset + MAC_REG_AIDATIM);
        }
 
        /* Set AutoSleep */
index ee5e2e0..ff6f654 100644 (file)
@@ -350,7 +350,7 @@ bool rf_write_wake_prog_syn(struct vnt_private *priv, unsigned char rf_type,
        unsigned char sleep_count = 0;
        unsigned short idx = MISCFIFO_SYNDATA_IDX;
 
-       VNSvOutPortW(iobase + MAC_REG_MISCFFNDEX, 0);
+       iowrite16(0, iobase + MAC_REG_MISCFFNDEX);
        switch (rf_type) {
        case RF_AIROHA:
        case RF_AL2230S:
index 54b0556..390b27b 100644 (file)
@@ -1422,7 +1422,7 @@ static int vnt_beacon_xmit(struct vnt_private *priv,
 
        MACvSetCurrBCNTxDescAddr(priv->port_offset, priv->tx_beacon_dma);
 
-       VNSvOutPortW(priv->port_offset + MAC_REG_BCNDMACTL + 2, priv->wBCNBufLen);
+       iowrite16(priv->wBCNBufLen, priv->port_offset + MAC_REG_BCNDMACTL + 2);
        /* Set auto Transmit on */
        MACvRegBitsOn(priv->port_offset, MAC_REG_TCR, TCR_AUTOBCNTX);
        /* Poll Transmit the adapter */
index 2a47f57..0f2f7df 100644 (file)
@@ -20,9 +20,6 @@
 
 /* For memory mapped IO */
 
-#define VNSvOutPortW(dwIOAddress, wData) \
-       iowrite16((u16)(wData), dwIOAddress)
-
 #define VNSvOutPortD(dwIOAddress, dwData) \
        iowrite32((u32)(dwData), dwIOAddress)