LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Michael Straube <straube.linux@gmail.com>
To: gregkh@linuxfoundation.org
Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk,
	martin@kaiser.cx, fmdefrancesco@gmail.com,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	Michael Straube <straube.linux@gmail.com>
Subject: [PATCH 05/23] staging: r8188eu: clean up spacing style issues in core/rtw_efuse.c
Date: Mon, 16 Aug 2021 17:58:00 +0200	[thread overview]
Message-ID: <20210816155818.24005-6-straube.linux@gmail.com> (raw)
In-Reply-To: <20210816155818.24005-1-straube.linux@gmail.com>

Clean up spacing style issues in core/rtw_efuse.c reported by checkpatch.

CHECK: spaces preferred around that ...
WARNING: space prohibited before semicolon

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_efuse.c | 96 ++++++++++++------------
 1 file changed, 48 insertions(+), 48 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_efuse.c b/drivers/staging/r8188eu/core/rtw_efuse.c
index 6e790f529d61..decccf7622f0 100644
--- a/drivers/staging/r8188eu/core/rtw_efuse.c
+++ b/drivers/staging/r8188eu/core/rtw_efuse.c
@@ -46,7 +46,7 @@ Efuse_Read1ByteFromFakeContent(
 	if (fakeEfuseBank == 0)
 		*Value = fakeEfuseContent[Offset];
 	else
-		*Value = fakeBTEfuseContent[fakeEfuseBank-1][Offset];
+		*Value = fakeBTEfuseContent[fakeEfuseBank - 1][Offset];
 	return true;
 }
 
@@ -61,7 +61,7 @@ Efuse_Write1ByteToFakeContent(
 	if (fakeEfuseBank == 0) {
 		fakeEfuseContent[Offset] = Value;
 	} else {
-		fakeBTEfuseContent[fakeEfuseBank-1][Offset] = Value;
+		fakeBTEfuseContent[fakeEfuseBank - 1][Offset] = Value;
 	}
 	return true;
 }
@@ -166,13 +166,13 @@ ReadEFuseByte(
 	}
 
 	/* Write Address */
-	rtw_write8(Adapter, EFUSE_CTRL+1, (_offset & 0xff));
-	readbyte = rtw_read8(Adapter, EFUSE_CTRL+2);
-	rtw_write8(Adapter, EFUSE_CTRL+2, ((_offset >> 8) & 0x03) | (readbyte & 0xfc));
+	rtw_write8(Adapter, EFUSE_CTRL + 1, (_offset & 0xff));
+	readbyte = rtw_read8(Adapter, EFUSE_CTRL + 2);
+	rtw_write8(Adapter, EFUSE_CTRL + 2, ((_offset >> 8) & 0x03) | (readbyte & 0xfc));
 
 	/* Write bit 32 0 */
-	readbyte = rtw_read8(Adapter, EFUSE_CTRL+3);
-	rtw_write8(Adapter, EFUSE_CTRL+3, (readbyte & 0x7f));
+	readbyte = rtw_read8(Adapter, EFUSE_CTRL + 3);
+	rtw_write8(Adapter, EFUSE_CTRL + 3, (readbyte & 0x7f));
 
 	/* Check bit 32 read-ready */
 	retry = 0;
@@ -250,21 +250,21 @@ u8 EFUSE_Read1Byte(struct adapter *Adapter, u16 Address)
 	if (Address < contentLen) {	/* E-fuse 512Byte */
 		/* Write E-fuse Register address bit0~7 */
 		temp = Address & 0xFF;
-		rtw_write8(Adapter, EFUSE_CTRL+1, temp);
-		Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+2);
+		rtw_write8(Adapter, EFUSE_CTRL + 1, temp);
+		Bytetemp = rtw_read8(Adapter, EFUSE_CTRL + 2);
 		/* Write E-fuse Register address bit8~9 */
 		temp = ((Address >> 8) & 0x03) | (Bytetemp & 0xFC);
-		rtw_write8(Adapter, EFUSE_CTRL+2, temp);
+		rtw_write8(Adapter, EFUSE_CTRL + 2, temp);
 
 		/* Write 0x30[31]= 0 */
-		Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3);
+		Bytetemp = rtw_read8(Adapter, EFUSE_CTRL + 3);
 		temp = Bytetemp & 0x7F;
-		rtw_write8(Adapter, EFUSE_CTRL+3, temp);
+		rtw_write8(Adapter, EFUSE_CTRL + 3, temp);
 
 		/* Wait Write-ready (0x30[31]= 1) */
-		Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3);
+		Bytetemp = rtw_read8(Adapter, EFUSE_CTRL + 3);
 		while (!(Bytetemp & 0x80)) {
-			Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3);
+			Bytetemp = rtw_read8(Adapter, EFUSE_CTRL + 3);
 			k++;
 			if (k == 1000) {
 				k = 0;
@@ -291,13 +291,13 @@ u8 efuse_OneByteRead(struct adapter *pAdapter, u16 addr, u8 *data, bool pseudo)
 	}
 	/*  -----------------e-fuse reg ctrl --------------------------------- */
 	/* address */
-	rtw_write8(pAdapter, EFUSE_CTRL+1, (u8)(addr & 0xff));
-	rtw_write8(pAdapter, EFUSE_CTRL+2, ((u8)((addr>>8) & 0x03)) |
-		   (rtw_read8(pAdapter, EFUSE_CTRL+2) & 0xFC));
+	rtw_write8(pAdapter, EFUSE_CTRL + 1, (u8)(addr & 0xff));
+	rtw_write8(pAdapter, EFUSE_CTRL + 2, ((u8)((addr >> 8) & 0x03)) |
+		   (rtw_read8(pAdapter, EFUSE_CTRL + 2) & 0xFC));
 
-	rtw_write8(pAdapter, EFUSE_CTRL+3,  0x72);/* read cmd */
+	rtw_write8(pAdapter, EFUSE_CTRL + 3,  0x72);/* read cmd */
 
-	while (!(0x80 & rtw_read8(pAdapter, EFUSE_CTRL+3)) && (tmpidx < 100))
+	while (!(0x80 & rtw_read8(pAdapter, EFUSE_CTRL + 3)) && (tmpidx < 100))
 		tmpidx++;
 	if (tmpidx < 100) {
 		*data = rtw_read8(pAdapter, EFUSE_CTRL);
@@ -322,15 +322,15 @@ u8 efuse_OneByteWrite(struct adapter *pAdapter, u16 addr, u8 data, bool pseudo)
 
 	/*  -----------------e-fuse reg ctrl --------------------------------- */
 	/* address */
-	rtw_write8(pAdapter, EFUSE_CTRL+1, (u8)(addr&0xff));
-	rtw_write8(pAdapter, EFUSE_CTRL+2,
-		   (rtw_read8(pAdapter, EFUSE_CTRL+2) & 0xFC) |
-		   (u8)((addr>>8) & 0x03));
+	rtw_write8(pAdapter, EFUSE_CTRL + 1, (u8)(addr & 0xff));
+	rtw_write8(pAdapter, EFUSE_CTRL + 2,
+		   (rtw_read8(pAdapter, EFUSE_CTRL + 2) & 0xFC) |
+		   (u8)((addr >> 8) & 0x03));
 	rtw_write8(pAdapter, EFUSE_CTRL, data);/* data */
 
-	rtw_write8(pAdapter, EFUSE_CTRL+3, 0xF2);/* write cmd */
+	rtw_write8(pAdapter, EFUSE_CTRL + 3, 0xF2);/* write cmd */
 
-	while ((0x80 &  rtw_read8(pAdapter, EFUSE_CTRL+3)) && (tmpidx < 100))
+	while ((0x80 &  rtw_read8(pAdapter, EFUSE_CTRL + 3)) && (tmpidx < 100))
 		tmpidx++;
 
 	if (tmpidx < 100)
@@ -387,19 +387,19 @@ static int Efuse_PgPacketWrite_BT(struct adapter *pAdapter, u8 offset, u8 word_e
  *---------------------------------------------------------------------------*/
 void efuse_WordEnableDataRead(u8 word_en, u8 *sourdata, u8 *targetdata)
 {
-	if (!(word_en&BIT(0))) {
+	if (!(word_en & BIT(0))) {
 		targetdata[0] = sourdata[0];
 		targetdata[1] = sourdata[1];
 	}
-	if (!(word_en&BIT(1))) {
+	if (!(word_en & BIT(1))) {
 		targetdata[2] = sourdata[2];
 		targetdata[3] = sourdata[3];
 	}
-	if (!(word_en&BIT(2))) {
+	if (!(word_en & BIT(2))) {
 		targetdata[4] = sourdata[4];
 		targetdata[5] = sourdata[5];
 	}
-	if (!(word_en&BIT(3))) {
+	if (!(word_en & BIT(3))) {
 		targetdata[6] = sourdata[6];
 		targetdata[7] = sourdata[7];
 	}
@@ -431,7 +431,7 @@ u8 rtw_efuse_access(struct adapter *padapter, u8 write, u16 start_addr, u16 cnts
 {
 	int i = 0;
 	u16 real_content_len = 0, max_available_size = 0;
-	u8 res = _FAIL ;
+	u8 res = _FAIL;
 	u8 (*rw8)(struct adapter *, u16, u8*);
 
 	EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&real_content_len, false);
@@ -551,9 +551,9 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
 
 	if (i & 0x1) {
 		/*  odd start */
-		if (data[idx] != map[addr+idx]) {
+		if (data[idx] != map[addr + idx]) {
 			word_en &= ~BIT(i >> 1);
-			newdata[i-1] = map[addr+idx-1];
+			newdata[i - 1] = map[addr + idx - 1];
 			newdata[i] = data[idx];
 		}
 		i++;
@@ -564,19 +564,19 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
 			if (cnts == idx)
 				break;
 			if ((cnts - idx) == 1) {
-				if (data[idx] != map[addr+idx]) {
+				if (data[idx] != map[addr + idx]) {
 					word_en &= ~BIT(i >> 1);
 					newdata[i] = data[idx];
-					newdata[i+1] = map[addr+idx+1];
+					newdata[i + 1] = map[addr + idx + 1];
 				}
 				idx++;
 				break;
 			} else {
-				if ((data[idx] != map[addr+idx]) ||
-				    (data[idx+1] != map[addr+idx+1])) {
+				if ((data[idx] != map[addr + idx]) ||
+				    (data[idx + 1] != map[addr + idx + 1])) {
 					word_en &= ~BIT(i >> 1);
 					newdata[i] = data[idx];
-					newdata[i+1] = data[idx + 1];
+					newdata[i + 1] = data[idx + 1];
 				}
 				idx += 2;
 			}
@@ -643,9 +643,9 @@ u8 rtw_BT_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data
 
 	if (i & 0x1) {
 		/*  odd start */
-		if (data[idx] != map[addr+idx]) {
+		if (data[idx] != map[addr + idx]) {
 			word_en &= ~BIT(i >> 1);
-			newdata[i-1] = map[addr+idx-1];
+			newdata[i - 1] = map[addr + idx - 1];
 			newdata[i] = data[idx];
 		}
 		i++;
@@ -656,19 +656,19 @@ u8 rtw_BT_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data
 			if (cnts == idx)
 				break;
 			if ((cnts - idx) == 1) {
-				if (data[idx] != map[addr+idx]) {
+				if (data[idx] != map[addr + idx]) {
 					word_en &= ~BIT(i >> 1);
 					newdata[i] = data[idx];
-					newdata[i+1] = map[addr+idx+1];
+					newdata[i + 1] = map[addr + idx + 1];
 				}
 				idx++;
 				break;
 			} else {
-				if ((data[idx] != map[addr+idx]) ||
-				    (data[idx+1] != map[addr+idx+1])) {
+				if ((data[idx] != map[addr + idx]) ||
+				    (data[idx + 1] != map[addr + idx + 1])) {
 					word_en &= ~BIT(i >> 1);
 					newdata[i] = data[idx];
-					newdata[i+1] = data[idx + 1];
+					newdata[i + 1] = data[idx + 1];
 				}
 				idx += 2;
 			}
@@ -747,7 +747,7 @@ efuse_ShadowRead2Byte(
 	struct eeprom_priv *pEEPROM = GET_EEPROM_EFUSE_PRIV(pAdapter);
 
 	*Value = pEEPROM->efuse_eeprom_data[Offset];
-	*Value |= pEEPROM->efuse_eeprom_data[Offset+1]<<8;
+	*Value |= pEEPROM->efuse_eeprom_data[Offset + 1] << 8;
 
 }	/*  EFUSE_ShadowRead2Byte */
 
@@ -761,9 +761,9 @@ efuse_ShadowRead4Byte(
 	struct eeprom_priv *pEEPROM = GET_EEPROM_EFUSE_PRIV(pAdapter);
 
 	*Value = pEEPROM->efuse_eeprom_data[Offset];
-	*Value |= pEEPROM->efuse_eeprom_data[Offset+1]<<8;
-	*Value |= pEEPROM->efuse_eeprom_data[Offset+2]<<16;
-	*Value |= pEEPROM->efuse_eeprom_data[Offset+3]<<24;
+	*Value |= pEEPROM->efuse_eeprom_data[Offset + 1] << 8;
+	*Value |= pEEPROM->efuse_eeprom_data[Offset + 2] << 16;
+	*Value |= pEEPROM->efuse_eeprom_data[Offset + 3] << 24;
 
 }	/*  efuse_ShadowRead4Byte */
 
-- 
2.32.0


  parent reply	other threads:[~2021-08-16 15:59 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-16 15:57 [PATCH 00/23] staging: r8188eu: clean up spacing style issues in core dir Michael Straube
2021-08-16 15:57 ` [PATCH 01/23] staging: r8188eu: add spaces around operators in core/rtw_ap.c Michael Straube
2021-08-16 15:57 ` [PATCH 02/23] staging: r8188eu: rewrite subtraction in core/rtw_cmd.c Michael Straube
2021-08-16 15:57 ` [PATCH 03/23] staging: r8188eu: remove unnecessary parentheses " Michael Straube
2021-08-16 15:57 ` [PATCH 04/23] staging: r8188eu: clean up spacing style issues " Michael Straube
2021-08-16 15:58 ` Michael Straube [this message]
2021-08-16 15:58 ` [PATCH 06/23] staging: r8188eu: clean up spacing style issues in core/rtw_ieee80211.c Michael Straube
2021-08-16 15:58 ` [PATCH 07/23] staging: r8188eu: simplify multiplication in core/rtw_ioctl_set.c Michael Straube
2021-08-16 15:58 ` [PATCH 08/23] staging: r8188eu: clean up spacing style issues " Michael Straube
2021-08-16 15:58 ` [PATCH 09/23] staging: r8188eu: add spaces around operators in core/rtw_iol.c Michael Straube
2021-08-16 15:58 ` [PATCH 10/23] staging: r8188eu: clean up spacing style issues in core/rtw_mlme.c Michael Straube
2021-08-16 15:58 ` [PATCH 11/23] staging: r8188eu: clean up spacing style issues in core/rtw_mlme_ext.c Michael Straube
2021-08-16 15:58 ` [PATCH 12/23] staging: r8188eu: clean up spacing style issues in core/rtw_mp.c Michael Straube
2021-08-16 15:58 ` [PATCH 13/23] staging: r8188eu: clean up spacing style issues in core/rtw_mp_ioctl.c Michael Straube
2021-08-16 15:58 ` [PATCH 14/23] staging: r8188eu: clean up spacing style issues in core/rtw_p2p.c Michael Straube
2021-08-16 15:58 ` [PATCH 15/23] staging: r8188eu: clean up spacing style issues in core/rtw_pwrctrl.c Michael Straube
2021-08-16 15:58 ` [PATCH 16/23] staging: r8188eu: clean up spacing style issues in core/rtw_recv.c Michael Straube
2021-08-16 15:58 ` [PATCH 17/23] staging: r8188eu: clean up spacing style issues in core/rtw_security.c Michael Straube
2021-08-16 15:58 ` [PATCH 18/23] staging: r8188eu: add spaces around operators in core/rtw_wlan_util.c Michael Straube
2021-08-16 15:58 ` [PATCH 19/23] staging: r8188eu: clean up spacing style issues in core/rtw_xmit.c Michael Straube
2021-08-16 15:58 ` [PATCH 20/23] staging: r8188eu: clean up spacing style issues in core/rtw_debug.c Michael Straube
2021-08-16 15:58 ` [PATCH 21/23] staging: r8188eu: add space around operator in core/rtw_sreset.c Michael Straube
2021-08-16 15:58 ` [PATCH 22/23] staging: r8188eu: clean up spacing style issues in core/rtw_sta_mgt.c Michael Straube
2021-08-16 15:58 ` [PATCH 23/23] staging: r8188eu: add spaces around operators in core/rtw_br_ext.c Michael Straube
2021-08-24  8:58 ` [PATCH 00/23] staging: r8188eu: clean up spacing style issues in core dir Dan Carpenter
2021-08-24 10:25   ` Michael Straube

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=20210816155818.24005-6-straube.linux@gmail.com \
    --to=straube.linux@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=fmdefrancesco@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=martin@kaiser.cx \
    --cc=phil@philpotter.co.uk \
    --subject='Re: [PATCH 05/23] staging: r8188eu: clean up spacing style issues in core/rtw_efuse.c' \
    /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

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).