All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] staging: rtl8723au: Small cleanups
@ 2014-08-07 17:20 Andreas Schlick
  2014-08-07 17:20 ` [PATCH 1/2] staging: rtl8723au: Move open braces to the previous line Andreas Schlick
  2014-08-07 17:20 ` [PATCH 2/2] staging: rtl8723au: Remove unnecessary bit masking Andreas Schlick
  0 siblings, 2 replies; 3+ messages in thread
From: Andreas Schlick @ 2014-08-07 17:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, Jes Sorensen, Larry Finger, linux-wireless,
	Andreas Schlick

Andreas Schlick (2):
  staging: rtl8723au: Move open braces to the previous line.
  staging: rtl8723au: Remove unnecessary bit masking.

 drivers/staging/rtl8723au/core/rtw_efuse.c | 34 ++++++++++--------------------
 1 file changed, 11 insertions(+), 23 deletions(-)

-- 
2.0.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] staging: rtl8723au: Move open braces to the previous line.
  2014-08-07 17:20 [PATCH 0/2] staging: rtl8723au: Small cleanups Andreas Schlick
@ 2014-08-07 17:20 ` Andreas Schlick
  2014-08-07 17:20 ` [PATCH 2/2] staging: rtl8723au: Remove unnecessary bit masking Andreas Schlick
  1 sibling, 0 replies; 3+ messages in thread
From: Andreas Schlick @ 2014-08-07 17:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, Jes Sorensen, Larry Finger, linux-wireless,
	Andreas Schlick

Correct coding style errors in rtw_efuse.c. checkpatch.pl reported:
ERROR: that open brace { should be on the previous line

Signed-off-by: Andreas Schlick <ninox@posteo.net>
---
 drivers/staging/rtl8723au/core/rtw_efuse.c | 33 ++++++++++--------------------
 1 file changed, 11 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_efuse.c b/drivers/staging/rtl8723au/core/rtw_efuse.c
index fe092c5..0bec131 100644
--- a/drivers/staging/rtl8723au/core/rtw_efuse.c
+++ b/drivers/staging/rtl8723au/core/rtw_efuse.c
@@ -157,8 +157,7 @@ ReadEFuseByte23a(struct rtw_adapter *Adapter, u16 _offset, u8 *pbuf)
 	retry = 0;
 	value32 = rtl8723au_read32(Adapter, EFUSE_CTRL);
 	/* while(!(((value32 >> 24) & 0xff) & 0x80)  && (retry<10)) */
-	while(!(((value32 >> 24) & 0xff) & 0x80)  && (retry<10000))
-	{
+	while (!(((value32 >> 24) & 0xff) & 0x80) && (retry<10000)) {
 		value32 = rtl8723au_read32(Adapter, EFUSE_CTRL);
 		retry++;
 	}
@@ -285,8 +284,7 @@ EFUSE_Read1Byte23a(struct rtw_adapter *Adapter, u16 Address)
 				 TYPE_EFUSE_REAL_CONTENT_LEN,
 				 (void *)&contentLen);
 
-	if (Address < contentLen)	/* E-fuse 512Byte */
-	{
+	if (Address < contentLen) { /* E-fuse 512Byte */
 		/* Write E-fuse Register address bit0~7 */
 		temp = Address & 0xFF;
 		rtl8723au_write8(Adapter, EFUSE_CTRL+1, temp);
@@ -302,12 +300,10 @@ EFUSE_Read1Byte23a(struct rtw_adapter *Adapter, u16 Address)
 
 		/* Wait Write-ready (0x30[31]= 1) */
 		Bytetemp = rtl8723au_read8(Adapter, EFUSE_CTRL+3);
-		while(!(Bytetemp & 0x80))
-		{
+		while (!(Bytetemp & 0x80)) {
 			Bytetemp = rtl8723au_read8(Adapter, EFUSE_CTRL+3);
 			k++;
-			if (k == 1000)
-			{
+			if (k == 1000) {
 				k = 0;
 				break;
 			}
@@ -357,8 +353,7 @@ EFUSE_Write1Byte(
 				 TYPE_EFUSE_REAL_CONTENT_LEN,
 				 (void *)&contentLen);
 
-	if (Address < contentLen)	/* E-fuse 512Byte */
-	{
+	if (Address < contentLen) { /* E-fuse 512Byte */
 		rtl8723au_write8(Adapter, EFUSE_CTRL, Value);
 
 		/* Write E-fuse Register address bit0~7 */
@@ -377,12 +372,10 @@ EFUSE_Write1Byte(
 
 		/* Wait Write-ready (0x30[31]= 0) */
 		Bytetemp = rtl8723au_read8(Adapter, EFUSE_CTRL+3);
-		while(Bytetemp & 0x80)
-		{
+		while (Bytetemp & 0x80) {
 			Bytetemp = rtl8723au_read8(Adapter, EFUSE_CTRL+3);
 			k++;
-			if (k == 100)
-			{
+			if (k == 100) {
 				k = 0;
 				break;
 			}
@@ -472,23 +465,19 @@ efuse_WordEnableDataRead23a(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];
 	}
-- 
2.0.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] staging: rtl8723au: Remove unnecessary bit masking.
  2014-08-07 17:20 [PATCH 0/2] staging: rtl8723au: Small cleanups Andreas Schlick
  2014-08-07 17:20 ` [PATCH 1/2] staging: rtl8723au: Move open braces to the previous line Andreas Schlick
@ 2014-08-07 17:20 ` Andreas Schlick
  1 sibling, 0 replies; 3+ messages in thread
From: Andreas Schlick @ 2014-08-07 17:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, Jes Sorensen, Larry Finger, linux-wireless,
	Andreas Schlick

Signed-off-by: Andreas Schlick <ninox@posteo.net>
---
 drivers/staging/rtl8723au/core/rtw_efuse.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_efuse.c b/drivers/staging/rtl8723au/core/rtw_efuse.c
index 0bec131..abc5d3c 100644
--- a/drivers/staging/rtl8723au/core/rtw_efuse.c
+++ b/drivers/staging/rtl8723au/core/rtw_efuse.c
@@ -156,8 +156,7 @@ ReadEFuseByte23a(struct rtw_adapter *Adapter, u16 _offset, u8 *pbuf)
 	/* Check bit 32 read-ready */
 	retry = 0;
 	value32 = rtl8723au_read32(Adapter, EFUSE_CTRL);
-	/* while(!(((value32 >> 24) & 0xff) & 0x80)  && (retry<10)) */
-	while (!(((value32 >> 24) & 0xff) & 0x80) && (retry<10000)) {
+	while (!((value32 >> 24) & 0x80) && retry < 10000) {
 		value32 = rtl8723au_read32(Adapter, EFUSE_CTRL);
 		retry++;
 	}
-- 
2.0.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-08-07 17:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-07 17:20 [PATCH 0/2] staging: rtl8723au: Small cleanups Andreas Schlick
2014-08-07 17:20 ` [PATCH 1/2] staging: rtl8723au: Move open braces to the previous line Andreas Schlick
2014-08-07 17:20 ` [PATCH 2/2] staging: rtl8723au: Remove unnecessary bit masking Andreas Schlick

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.