staging: vt6655: Type encoding info dropped from variable "byRFType"
authorPavan Bobba <opensource206@gmail.com>
Thu, 21 Sep 2023 12:08:37 +0000 (17:38 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Sep 2023 09:19:59 +0000 (11:19 +0200)
variable name "byRFType" updated like below:

a.type encoding info dropped from name
b.camelcase name replaced by snakecase

Issue found by checkpatch

Signed-off-by: Pavan Bobba <opensource206@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/ZQwyRXFHA9hTLcyv@ubuntu.myguest.virtualbox.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6655/baseband.c
drivers/staging/vt6655/card.c
drivers/staging/vt6655/channel.c
drivers/staging/vt6655/device.h
drivers/staging/vt6655/device_main.c
drivers/staging/vt6655/rf.c
drivers/staging/vt6655/rf.h

index 55224918794bd2ff8e38b4f9ea2b5562994d9d16..0ae2ab3987c6f5cc27efe5f282756d48d13fce2f 100644 (file)
@@ -1979,7 +1979,7 @@ bool bb_write_embedded(struct vnt_private *priv, unsigned char by_bb_addr,
  *  In:
  *      iobase      - I/O base address
  *      byRevId     - Revision ID
- *      byRFType    - RF type
+ *      rf_type     - RF type
  *  Out:
  *      none
  *
@@ -1992,10 +1992,10 @@ bool bb_vt3253_init(struct vnt_private *priv)
        bool result = true;
        int        ii;
        void __iomem *iobase = priv->port_offset;
-       unsigned char by_rf_type = priv->byRFType;
+       unsigned char rf_type = priv->rf_type;
        unsigned char by_local_id = priv->local_id;
 
-       if (by_rf_type == RF_RFMD2959) {
+       if (rf_type == RF_RFMD2959) {
                if (by_local_id <= REV_ID_VT3253_A1) {
                        for (ii = 0; ii < CB_VT3253_INIT_FOR_RFMD; ii++)
                                result &= bb_write_embedded(priv,
@@ -2024,7 +2024,7 @@ bool bb_vt3253_init(struct vnt_private *priv)
                priv->dbm_threshold[1] = -50;
                priv->dbm_threshold[2] = 0;
                priv->dbm_threshold[3] = 0;
-       } else if ((by_rf_type == RF_AIROHA) || (by_rf_type == RF_AL2230S)) {
+       } else if ((rf_type == RF_AIROHA) || (rf_type == RF_AL2230S)) {
                for (ii = 0; ii < CB_VT3253B0_INIT_FOR_AIROHA2230; ii++)
                        result &= bb_write_embedded(priv,
                                vt3253b0_airoha2230[ii][0],
@@ -2042,7 +2042,7 @@ bool bb_vt3253_init(struct vnt_private *priv)
                priv->dbm_threshold[1] = -48;
                priv->dbm_threshold[2] = 0;
                priv->dbm_threshold[3] = 0;
-       } else if (by_rf_type == RF_UW2451) {
+       } else if (rf_type == RF_UW2451) {
                for (ii = 0; ii < CB_VT3253B0_INIT_FOR_UW2451; ii++)
                        result &= bb_write_embedded(priv,
                                vt3253b0_uw2451[ii][0],
@@ -2064,7 +2064,7 @@ bool bb_vt3253_init(struct vnt_private *priv)
                priv->dbm_threshold[1] = -50;
                priv->dbm_threshold[2] = 0;
                priv->dbm_threshold[3] = 0;
-       } else if (by_rf_type == RF_VT3226) {
+       } else if (rf_type == RF_VT3226) {
                for (ii = 0; ii < CB_VT3253B0_INIT_FOR_AIROHA2230; ii++)
                        result &= bb_write_embedded(priv,
                                vt3253b0_airoha2230[ii][0],
index c680925b9c92c5664673697e2b5b60f6822361dc..bec39c72d5404556870d339863d5aa7c9131d02f 100644 (file)
@@ -228,7 +228,7 @@ bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type)
                }
        }
 
-       if (priv->byRFType == RF_RFMD2959) {
+       if (priv->rf_type == RF_RFMD2959) {
                /*
                 * bcs TX_PE will reserve 3 us hardware's processing
                 * time here is 2 us.
@@ -356,7 +356,7 @@ void CARDbRadioPowerOff(struct vnt_private *priv)
        if (priv->radio_off)
                return;
 
-       switch (priv->byRFType) {
+       switch (priv->rf_type) {
        case RF_RFMD2959:
                vt6655_mac_word_reg_bits_off(priv->port_offset, MAC_REG_SOFTPWRCTL,
                                             SOFTPWRCTL_TXPEINV);
index 4122875ebcaaab15fbbcfa61b1cbf50e243d8e01..e90e0b43505da53e733165c7b4c1dc3fb8febb70 100644 (file)
@@ -101,12 +101,12 @@ bool set_channel(struct vnt_private *priv, struct ieee80211_channel *ch)
         */
 
        priv->byCurrentCh = ch->hw_value;
-       ret &= RFbSelectChannel(priv, priv->byRFType,
+       ret &= RFbSelectChannel(priv, priv->rf_type,
                                ch->hw_value);
 
        /* Init Synthesizer Table */
        if (priv->bEnablePSMode)
-               rf_write_wake_prog_syn(priv, priv->byRFType, ch->hw_value);
+               rf_write_wake_prog_syn(priv, priv->rf_type, ch->hw_value);
 
        bb_software_reset(priv);
 
index c272a4ab2fa0741727d079bb0e295bafbda80adb..8c90539cc3d71df2b6a0f59f6e529579a1b86617 100644 (file)
@@ -153,7 +153,7 @@ struct vnt_private {
 
        /* Version control */
        unsigned char local_id;
-       unsigned char byRFType;
+       unsigned char rf_type;
 
        unsigned char max_pwr_level;
        unsigned char byZoneType;
index 45e5eccadb44143f4445a755605c04478e113c03..f76f482f4c06d32683a9a0631f01ea6494afc204 100644 (file)
@@ -1792,10 +1792,10 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent)
        vt6655_mac_read_ether_addr(priv->port_offset, priv->abyCurrentNetAddr);
 
        /* Get RFType */
-       priv->byRFType = SROMbyReadEmbedded(priv->port_offset, EEP_OFS_RFTYPE);
-       priv->byRFType &= RF_MASK;
+       priv->rf_type = SROMbyReadEmbedded(priv->port_offset, EEP_OFS_RFTYPE);
+       priv->rf_type &= RF_MASK;
 
-       dev_dbg(&pcid->dev, "RF Type = %x\n", priv->byRFType);
+       dev_dbg(&pcid->dev, "RF Type = %x\n", priv->rf_type);
 
        device_get_options(priv);
        device_set_options(priv);
index 1fadc2fc441298646ace9af70162120f7b1d2871..bf9a10563b12a626e454a3c24d2687b7909b98b6 100644 (file)
@@ -268,7 +268,7 @@ static bool RFbAL2230SelectChannel(struct vnt_private *priv, unsigned char byCha
  * Parameters:
  *  In:
  *      byBBType
- *      byRFType
+ *      rf_type
  *  Out:
  *      none
  *
@@ -279,7 +279,7 @@ bool RFbInit(struct vnt_private *priv)
 {
        bool ret = true;
 
-       switch (priv->byRFType) {
+       switch (priv->rf_type) {
        case RF_AIROHA:
        case RF_AL2230S:
                priv->max_pwr_level = AL2230_PWR_IDX_LEN;
@@ -300,7 +300,7 @@ bool RFbInit(struct vnt_private *priv)
  *
  * Parameters:
  *  In:
- *      byRFType
+ *      rf_type
  *      byChannel    - Channel number
  *  Out:
  *      none
@@ -308,12 +308,12 @@ bool RFbInit(struct vnt_private *priv)
  * Return Value: true if succeeded; false if failed.
  *
  */
-bool RFbSelectChannel(struct vnt_private *priv, unsigned char byRFType,
+bool RFbSelectChannel(struct vnt_private *priv, unsigned char rf_type,
                      u16 byChannel)
 {
        bool ret = true;
 
-       switch (byRFType) {
+       switch (rf_type) {
        case RF_AIROHA:
        case RF_AL2230S:
                ret = RFbAL2230SelectChannel(priv, byChannel);
@@ -470,7 +470,7 @@ bool RFbRawSetPower(struct vnt_private *priv, unsigned char byPwr,
        if (byPwr >= priv->max_pwr_level)
                return false;
 
-       switch (priv->byRFType) {
+       switch (priv->rf_type) {
        case RF_AIROHA:
                ret &= IFRFbWriteEmbedded(priv, al2230_power_table[byPwr]);
                if (rate <= RATE_11M)
@@ -521,7 +521,7 @@ RFvRSSITodBm(struct vnt_private *priv, unsigned char byCurrRSSI, long *pldBm)
        long a = 0;
        unsigned char abyAIROHARF[4] = {0, 18, 0, 40};
 
-       switch (priv->byRFType) {
+       switch (priv->rf_type) {
        case RF_AIROHA:
        case RF_AL2230S:
                a = abyAIROHARF[byIdx];
index 9fef81846a9fccc1d249e81f70034872b2eefc82..6f842ac00526577cb11764bbf6ff73417c56ae94 100644 (file)
@@ -58,7 +58,7 @@
 /*---------------------  Export Functions  --------------------------*/
 
 bool IFRFbWriteEmbedded(struct vnt_private *priv, unsigned long dwData);
-bool RFbSelectChannel(struct vnt_private *priv, unsigned char byRFType, u16 byChannel);
+bool RFbSelectChannel(struct vnt_private *priv, unsigned char rf_type, u16 byChannel);
 bool RFbInit(struct vnt_private *priv);
 bool rf_write_wake_prog_syn(struct vnt_private *priv, unsigned char rf_type, u16 channel);
 bool RFbSetPower(struct vnt_private *priv, unsigned int rate, u16 uCH);