mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gilbert Adikankwu <gilbertadikankwu@gmail.com>
To: gregkh@linuxfoundation.org, outreachy@lists.linux.dev
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	Gilbert Adikankwu <gilbertadikankwu@gmail.com>
Subject: [PATCH 1/5] staging: vt6655: Rename variable byCWMaxMin
Date: Sun, 22 Oct 2023 00:12:27 +0100	[thread overview]
Message-ID: <ed8ff47e7ee3a03d8c8c3cc43b4773bb1eb01f16.1697927812.git.gilbertadikankwu@gmail.com> (raw)
In-Reply-To: <cover.1697927812.git.gilbertadikankwu@gmail.com>

Remove byte Type encoding "by" from variable name and replace camelcase
with snakecase

Fix checkpatch.pl error:
	CHECK: Avoid CamelCase: <byCWMaxMin>

Signed-off-by: Gilbert Adikankwu <gilbertadikankwu@gmail.com>
---
 drivers/staging/vt6655/card.c   | 16 ++++++++--------
 drivers/staging/vt6655/device.h |  2 +-
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c
index bec39c72d540..08e50311f7ba 100644
--- a/drivers/staging/vt6655/card.c
+++ b/drivers/staging/vt6655/card.c
@@ -184,7 +184,7 @@ static void s_vCalculateOFDMRParameter(unsigned char rate,
  */
 bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type)
 {
-	unsigned char byCWMaxMin = 0;
+	unsigned char cw_max_min = 0;
 	unsigned char bySlot = 0;
 	unsigned char bySIFS = 0;
 	unsigned char byDIFS = 0;
@@ -197,14 +197,14 @@ bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type)
 		bySlot = C_SLOT_SHORT;
 		bySIFS = C_SIFS_A;
 		byDIFS = C_SIFS_A + 2 * C_SLOT_SHORT;
-		byCWMaxMin = 0xA4;
+		cw_max_min = 0xA4;
 	} else if (bb_type == BB_TYPE_11B) {
 		vt6655_mac_set_bb_type(priv->port_offset, BB_TYPE_11B);
 		bb_write_embedded(priv, 0x88, 0x02);
 		bySlot = C_SLOT_LONG;
 		bySIFS = C_SIFS_BG;
 		byDIFS = C_SIFS_BG + 2 * C_SLOT_LONG;
-		byCWMaxMin = 0xA5;
+		cw_max_min = 0xA5;
 	} else { /* PK_TYPE_11GA & PK_TYPE_11GB */
 		vt6655_mac_set_bb_type(priv->port_offset, BB_TYPE_11G);
 		bb_write_embedded(priv, 0x88, 0x08);
@@ -218,11 +218,11 @@ bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type)
 			byDIFS = C_SIFS_BG + 2 * C_SLOT_LONG;
 		}
 
-		byCWMaxMin = 0xa4;
+		cw_max_min = 0xa4;
 
 		for (i = RATE_54M; i >= RATE_6M; i--) {
 			if (priv->basic_rates & ((u32)(0x1 << i))) {
-				byCWMaxMin |= 0x1;
+				cw_max_min |= 0x1;
 				break;
 			}
 		}
@@ -260,9 +260,9 @@ bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type)
 
 		bb_set_short_slot_time(priv);
 	}
-	if (priv->byCWMaxMin != byCWMaxMin) {
-		priv->byCWMaxMin = byCWMaxMin;
-		iowrite8(priv->byCWMaxMin, priv->port_offset + MAC_REG_CWMAXMIN0);
+	if (priv->cw_max_min != cw_max_min) {
+		priv->cw_max_min = cw_max_min;
+		iowrite8(priv->cw_max_min, priv->port_offset + MAC_REG_CWMAXMIN0);
 	}
 
 	priv->byPacketType = CARDbyGetPktType(priv);
diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h
index 2b5f9bf6aa5d..8ff28e4e72a4 100644
--- a/drivers/staging/vt6655/device.h
+++ b/drivers/staging/vt6655/device.h
@@ -185,7 +185,7 @@ struct vnt_private {
 	unsigned char byDIFS;
 	unsigned char byEIFS;
 	unsigned char bySlot;
-	unsigned char byCWMaxMin;
+	unsigned char cw_max_min;
 
 	u8		byBBType; /* 0:11A, 1:11B, 2:11G */
 	u8		byPacketType; /*
-- 
2.34.1


  reply	other threads:[~2023-10-21 23:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-21 23:12 [PATCH 0/5] staging: vt6655: Rename variables byCWMaxMin, bySlot, bySIFS, byDIFS and byEIFS Gilbert Adikankwu
2023-10-21 23:12 ` Gilbert Adikankwu [this message]
2023-10-21 23:12 ` [PATCH 2/5] staging: vt6655: Rename variable bySlot Gilbert Adikankwu
2023-10-21 23:12 ` [PATCH 3/5] staging: vt6655: Rename variable bySIFS Gilbert Adikankwu
2023-10-21 23:12 ` [PATCH 4/5] staging: vt6655: Rename variable byDIFS Gilbert Adikankwu
2023-10-21 23:12 ` [PATCH 5/5] staging: vt6655: Rename variable byEIFS Gilbert Adikankwu
2023-10-22  7:09 ` [PATCH 0/5] staging: vt6655: Rename variables byCWMaxMin, bySlot, bySIFS, byDIFS and byEIFS 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=ed8ff47e7ee3a03d8c8c3cc43b4773bb1eb01f16.1697927812.git.gilbertadikankwu@gmail.com \
    --to=gilbertadikankwu@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=outreachy@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

all inboxes | Powered by JetHome®