Skip to contentSkip to conversation

Staging: rtl8188eu/core: remove paragraph which mention FSF address in comment header

PATCH Superseded Colin Vidal 2 participants 8 messages Feb 12, 2016 – Feb 15, 2016 Staging

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/5 Staging: rtl8188eu/core: remove paragraph which mention FSF address in comment header

---
 drivers/staging/rtl8188eu/core/rtw_iol.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/staging/rtl8188eu/core/rtw_iol.c +0 -4
index cdcf0ea..000a81c 100644
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  *
  ******************************************************************************/
 
Signature · 1 line
2.5.0
#1 lore raw

PATCH v3 2/5 Staging: rtl8188eu/core: Coding style fix, set conform spaces between identifiers

---
 drivers/staging/rtl8188eu/core/rtw_iol.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8188eu/core/rtw_iol.c +2 -2
index 000a81c..7642c22 100644
@@ -14,9 +14,9 @@
  *
  ******************************************************************************/
 
-#include<rtw_iol.h>
+#include <rtw_iol.h>
 
-bool rtw_IOL_applied(struct adapter  *adapter)
+bool rtw_IOL_applied(struct adapter *adapter)
 {
 	if (1 == adapter->registrypriv.fw_iol)
 		return true;
Signature · 1 line
2.5.0
#2 lore raw

PATCH v3 3/5 Staging: rtl8188eu/core: Coding style fix, set constant operand on right in tests

---
 drivers/staging/rtl8188eu/core/rtw_iol.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8188eu/core/rtw_iol.c +2 -2
index 7642c22..3dd1a9a 100644
@@ -18,10 +18,10 @@
 
 bool rtw_IOL_applied(struct adapter *adapter)
 {
-	if (1 == adapter->registrypriv.fw_iol)
+	if (adapter->registrypriv.fw_iol == 1)
 		return true;
 
-	if ((2 == adapter->registrypriv.fw_iol) && (!adapter_to_dvobj(adapter)->ishighspeed))
+	if ((adapter->registrypriv.fw_iol == 2) && (!adapter_to_dvobj(adapter)->ishighspeed))
 		return true;
 	return false;
 }
Signature · 1 line
2.5.0
#3 lore raw

PATCH v3 4/5 Staging: rtl8188eu/core: Coding style fix, avoid line over 80 characters

---
 drivers/staging/rtl8188eu/core/rtw_iol.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/rtl8188eu/core/rtw_iol.c +2 -1
index 3dd1a9a..2e2145c 100644
@@ -21,7 +21,8 @@ bool rtw_IOL_applied(struct adapter *adapter)
 	if (adapter->registrypriv.fw_iol == 1)
 		return true;
 
-	if ((adapter->registrypriv.fw_iol == 2) && (!adapter_to_dvobj(adapter)->ishighspeed))
+	if ((adapter->registrypriv.fw_iol == 2) &&
+	    (!adapter_to_dvobj(adapter)->ishighspeed))
 		return true;
 	return false;
 }
Signature · 1 line
2.5.0
#4 lore raw

PATCH v3 5/5 Staging: rtl8188eu/core: make core more readable

---
 drivers/staging/rtl8188eu/core/rtw_iol.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/staging/rtl8188eu/core/rtw_iol.c +3 -7
index 2e2145c..ba6c492 100644
@@ -18,11 +18,7 @@
 
 bool rtw_IOL_applied(struct adapter *adapter)
 {
-	if (adapter->registrypriv.fw_iol == 1)
-		return true;
-
-	if ((adapter->registrypriv.fw_iol == 2) &&
-	    (!adapter_to_dvobj(adapter)->ishighspeed))
-		return true;
-	return false;
+	return adapter->registrypriv.fw_iol == 1 ||
+		(adapter->registrypriv.fw_iol == 2 &&
+		 !adapter_to_dvobj(adapter)->ishighspeed);
 }
Signature · 1 line
2.5.0
#5 lore raw

Re: [PATCH v3 5/5] Staging: rtl8188eu/core: make core more readable

Quoted 14 lines · Colin Vidal
---
 drivers/staging/rtl8188eu/core/rtw_iol.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/staging/rtl8188eu/core/rtw_iol.c +0 -1
index 2e2145c..ba6c492 100644
@@ -18,11 +18,7 @@
 
 bool rtw_IOL_applied(struct adapter *adapter)
 {
-	if (adapter->registrypriv.fw_iol == 1)

drivers/staging/rtl8188eu/core/rtw_iol.c line 24

Quoted 10 lines
drivers/staging/rtl8188eu/core/rtw_iol.c +3 -6
-		return true;
-
-	if ((adapter->registrypriv.fw_iol == 2) &&
-	    (!adapter_to_dvobj(adapter)->ishighspeed))
-		return true;
-	return false;
+	return adapter->registrypriv.fw_iol == 1 ||
+		(adapter->registrypriv.fw_iol == 2 &&
+		 !adapter_to_dvobj(adapter)->ishighspeed);
 }

I'm sorry, but this patch does not do what you said it does, it's much harder to read now :(

Also, I can't take a patch without a changelog text :(

thanks,

greg k-h

#6 lore raw

Re: [PATCH v3 5/5] Staging: rtl8188eu/core: make core more readable

Quoted 31 lines · Greg Kroah-Hartman
Quoted 24 lines · Colin Vidal

---
 drivers/staging/rtl8188eu/core/rtw_iol.c | 10 +++-------

 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/staging/rtl8188eu/core/rtw_iol.c +0 -0
index 2e2145c..ba6c492 100644
@@ -18,11 +18,7 @@


 bool rtw_IOL_applied(struct adapter *adapter)
 {

drivers/staging/rtl8188eu/core/rtw_iol.c +3 -7
-	if (adapter->registrypriv.fw_iol == 1)
-		return true;
-
-	if ((adapter->registrypriv.fw_iol == 2) &&
-	    (!adapter_to_dvobj(adapter)->ishighspeed))
-		return true;
-	return false;
+	return adapter->registrypriv.fw_iol == 1 ||
+		(adapter->registrypriv.fw_iol == 2 &&
+		 !adapter_to_dvobj(adapter)->ishighspeed);
Quoted 1 line

 }

I'm sorry, but this patch does not do what you said it does, it's much
harder to read now :(

Quoted 5 lines

Also, I can't take a patch without a changelog text :(

thanks,

greg k-h

Hi Greg,

Thanks for you replie!

OK, I thought it was a better idea (as suggests Joe Perches) to group the test in a way to avoid multiples - and maybe confusing - returns. So, I'll remove this one.

Sorry about the changelot, I missed it while making patch series, I'll resend it.

Thanks,

Colin