linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zoeb Mithaiwala <zoebm@google.com>
To: greg@kroah.com
Cc: trivial@kernel.org, linux-kernel@vger.kernel.org,
	linux-staging@lists.linux.dev, Zoeb Mithaiwala <zoebm@google.com>
Subject: [PATCH 2/2] Staging: rtl8712: rtl871x_security: fixed a camel case variable name coding style issue
Date: Sat, 20 Nov 2021 11:11:51 +0000	[thread overview]
Message-ID: <20211120111151.1086970-1-zoebm@google.com> (raw)
In-Reply-To: <YZixPDg8kKHZrGJB@kroah.com>

Changed additional 'n' from variable name. Corrected comment indentation.

Signed-off-by: Zoeb Mithaiwala <zoebm@google.com>
---
 drivers/staging/rtl8712/rtl871x_security.c | 12 ++++++------
 drivers/staging/rtl8712/rtl871x_security.h |  6 +++---
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl871x_security.c b/drivers/staging/rtl8712/rtl871x_security.c
index 4b341074b1b2..529527e201e3 100644
--- a/drivers/staging/rtl8712/rtl871x_security.c
+++ b/drivers/staging/rtl8712/rtl871x_security.c
@@ -269,7 +269,7 @@ static void secmicclear(struct mic_data *pmicdata)
 /* Reset the state to the empty message. */
 	pmicdata->L = pmicdata->K0;
 	pmicdata->R = pmicdata->K1;
-	pmicdata->nbytes_in_m = 0;
+	pmicdata->bytes_in_m = 0;
 	pmicdata->M = 0;
 }
 
@@ -285,10 +285,10 @@ void r8712_secmicsetkey(struct mic_data *pmicdata, u8 *key)
 static void secmicappendbyte(struct mic_data *pmicdata, u8 b)
 {
 	/* Append the byte to our word-sized buffer */
-	pmicdata->M |= ((u32)b) << (8 * pmicdata->n_bytes_in_m);
-	pmicdata->nbytes_in_m++;
+	pmicdata->M |= ((u32)b) << (8 * pmicdata->bytes_in_m);
+	pmicdata->bytes_in_m++;
 	/* Process the word if it is full. */
-	if (pmicdata->nbytes_in_m >= 4) {
+	if (pmicdata->bytes_in_m >= 4) {
 		pmicdata->L ^= pmicdata->M;
 		pmicdata->R ^= ROL32(pmicdata->L, 17);
 		pmicdata->L += pmicdata->R;
@@ -301,7 +301,7 @@ static void secmicappendbyte(struct mic_data *pmicdata, u8 b)
 		pmicdata->L += pmicdata->R;
 		/* Clear the buffer */
 		pmicdata->M = 0;
-		pmicdata->nbytes_in_m = 0;
+		pmicdata->bytes_in_m = 0;
 	}
 }
 
@@ -323,7 +323,7 @@ void r8712_secgetmic(struct mic_data *pmicdata, u8 *dst)
 	secmicappendbyte(pmicdata, 0);
 	secmicappendbyte(pmicdata, 0);
 	/* and then zeroes until the length is a multiple of 4 */
-	while (pmicdata->nbytes_in_m != 0)
+	while (pmicdata->bytes_in_m != 0)
 		secmicappendbyte(pmicdata, 0);
 	/* The appendByte function has already computed the result. */
 	secmicputuint32(dst, pmicdata->L);
diff --git a/drivers/staging/rtl8712/rtl871x_security.h b/drivers/staging/rtl8712/rtl871x_security.h
index 006ce05c798f..1de662940417 100644
--- a/drivers/staging/rtl8712/rtl871x_security.h
+++ b/drivers/staging/rtl8712/rtl871x_security.h
@@ -192,7 +192,7 @@ struct mic_data {
 	u32  K0, K1;         /* Key */
 	u32  L, R;           /* Current state */
 	u32  M;              /* Message accumulator (single word) */
-	u32  nbytes_in_m;      /* # bytes in M */
+	u32  bytes_in_m;     /* # bytes in M */
 };
 
 void seccalctkipmic(
@@ -200,11 +200,11 @@ void seccalctkipmic(
 	u8  *header,
 	u8  *data,
 	u32  data_len,
-	u8  *miccode,
+	u8  *Miccode,
 	u8   priority);
 
 void r8712_secmicsetkey(struct mic_data *pmicdata, u8 *key);
-void r8712_secmicappend(struct mic_data *pmicdata, u8 *src, u32 nbytes);
+void r8712_secmicappend(struct mic_data *pmicdata, u8 *src, u32 nBytes);
 void r8712_secgetmic(struct mic_data *pmicdata, u8 *dst);
 u32 r8712_aes_encrypt(struct _adapter *padapter, u8 *pxmitframe);
 u32 r8712_tkip_encrypt(struct _adapter *padapter, u8 *pxmitframe);
-- 
2.20.1


  reply	other threads:[~2021-11-20 11:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-20  8:06 [PATCH] Staging: rtl8712: rtl871x_security: fixed a camel case variable name coding style issue Zoeb Mithaiwala
2021-11-20  8:26 ` Greg KH
2021-11-20 11:11   ` Zoeb Mithaiwala [this message]
2021-11-22 10:39     ` [PATCH 2/2] " Dan Carpenter
2021-11-22 17:03       ` [PATCH v3 3/3] Staging: rtl8712: Fixes a camel case variable name " Zoeb Mithaiwala
2021-11-24 10:01         ` Greg KH
2021-11-25 17:07           ` Zoeb Mithaiwala
2021-11-25 17:14             ` Greg KH
2021-11-24 10:00     ` [PATCH 2/2] Staging: rtl8712: rtl871x_security: fixed a camel case variable name coding " Greg KH
2021-11-22 15:22 ` [PATCH] " kernel test robot
2021-11-26  8:54 ` kernel test robot

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=20211120111151.1086970-1-zoebm@google.com \
    --to=zoebm@google.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=trivial@kernel.org \
    /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).