Skip to contentSkip to conversation

staging: vt6656: Fix checkpatch unnecessary parentheses

PATCH In review Teddy Engel 2 participants 2 messages Jun 11, 2024 – Jun 12, 2024 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: vt6656: Fix checkpatch unnecessary parentheses

Remove unnecessary parentheses - according to checkpatch.pl strict

---
 drivers/staging/vt6656/TODO       | 2 +-
 drivers/staging/vt6656/baseband.c | 8 ++++----
 drivers/staging/vt6656/main_usb.c | 4 ++--
 drivers/staging/vt6656/usbpipe.c  | 8 ++++----
 4 files changed, 11 insertions(+), 11 deletions(-)
drivers/staging/vt6656/TODO +1 -1
index e154b2f3b247..507b7aec9f14 100644
@@ -11,7 +11,7 @@ TODO:
 - switch to use LIB80211
 - switch to use MAC80211
 - use kernel coding style
-- checkpatch.pl fixes
+- checkpatch.pl fixes -- done
 - sparse fixes
 - integrate with drivers/net/wireless
 
drivers/staging/vt6656/baseband.c +4 -4
index ad7b963f0d98..c981fc75a030 100644
@@ -230,8 +230,8 @@ int vnt_vt3184_init(struct vnt_private *priv)
 
 	dev_dbg(&priv->usb->dev, "RF Type %d\n", priv->rf_type);
 
-	if ((priv->rf_type == RF_AL2230) ||
-	    (priv->rf_type == RF_AL2230S)) {
+	if (priv->rf_type == RF_AL2230 ||
+	    priv->rf_type == RF_AL2230S) {
 		priv->bb_rx_conf = vnt_vt3184_al2230[10];
 		length = sizeof(vnt_vt3184_al2230);
 		addr = vnt_vt3184_al2230;
@@ -275,8 +275,8 @@ int vnt_vt3184_init(struct vnt_private *priv)
 	if (ret)
 		goto end;
 
-	if ((priv->rf_type == RF_VT3226) ||
-	    (priv->rf_type == RF_VT3226D0)) {
+	if (priv->rf_type == RF_VT3226 ||
+	    priv->rf_type == RF_VT3226D0) {
 		data = (priv->rf_type == RF_VT3226D0) ? 0x11 : 0x23;
 
 		ret = vnt_control_out_u8(priv, MESSAGE_REQUEST_MACREG,
drivers/staging/vt6656/main_usb.c +2 -2
index 7bbed462f062..86085f3674c1 100644
@@ -339,8 +339,8 @@ static int vnt_init_registers(struct vnt_private *priv)
 
 	/* load vt3266 calibration parameters in EEPROM */
 	if (priv->rf_type == RF_VT3226D0) {
-		if ((priv->eeprom[EEP_OFS_MAJOR_VER] == 0x1) &&
-		    (priv->eeprom[EEP_OFS_MINOR_VER] >= 0x4)) {
+		if (priv->eeprom[EEP_OFS_MAJOR_VER] == 0x1 &&
+		    priv->eeprom[EEP_OFS_MINOR_VER] >= 0x4) {
 			calib_tx_iq = priv->eeprom[EEP_OFS_CALIB_TX_IQ];
 			calib_tx_dc = priv->eeprom[EEP_OFS_CALIB_TX_DC];
 			calib_rx_iq = priv->eeprom[EEP_OFS_CALIB_RX_IQ];
drivers/staging/vt6656/usbpipe.c +4 -4
index d505b4b69ba4..42b2e0a0a431 100644
@@ -287,7 +287,7 @@ static int vnt_rx_data(struct vnt_private *priv, struct vnt_rcb *ptr_rcb,
 		return false;
 	}
 
-	if ((bytes_received > 2372) || (bytes_received <= 40)) {
+	if (bytes_received > 2372 || bytes_received <= 40) {
 		/* Frame Size error drop this packet.*/
 		dev_dbg(&priv->usb->dev, "------ WRONG Length 2\n");
 		return false;
@@ -299,9 +299,9 @@ static int vnt_rx_data(struct vnt_private *priv, struct vnt_rcb *ptr_rcb,
 	/* if SQ3 the range is 24~27, if no SQ3 the range is 20~23 */
 
 	/*Fix hardware bug => PLCP_Length error */
-	if (((bytes_received - head->pay_load_len) > 27) ||
-	    ((bytes_received - head->pay_load_len) < 24) ||
-	    (bytes_received < head->pay_load_len)) {
+	if ((bytes_received - head->pay_load_len) > 27 ||
+	    (bytes_received - head->pay_load_len) < 24 ||
+	    bytes_received < head->pay_load_len) {
 		dev_dbg(&priv->usb->dev, "Wrong PLCP Length %x\n",
 			head->pay_load_len);
 		return false;
Signature · 1 line
2.39.2
#1 lore raw
Quoted 15 lines · Teddy Engel

Remove unnecessary parentheses - according to checkpatch.pl strict

---
 drivers/staging/vt6656/TODO       | 2 +-
 drivers/staging/vt6656/baseband.c | 8 ++++----
 drivers/staging/vt6656/main_usb.c | 4 ++--
 drivers/staging/vt6656/usbpipe.c  | 8 ++++----
 4 files changed, 11 insertions(+), 11 deletions(-)
drivers/staging/vt6656/TODO +0 -0
index e154b2f3b247..507b7aec9f14 100644

drivers/staging/vt6656/TODO TODO: · line 14

Quoted 5 lines
drivers/staging/vt6656/TODO +1 -1
@@ -11,7 +11,7 @@ TODO:
 - switch to use LIB80211
 - switch to use MAC80211
 - use kernel coding style
-- checkpatch.pl fixes
+- checkpatch.pl fixes -- done

When fixing something, you can just remove the line.

Quoted 8 lines
drivers/staging/vt6656/TODO +0 -0
 - sparse fixes
 - integrate with drivers/net/wireless
 
drivers/staging/vt6656/baseband.c +0 -0
index ad7b963f0d98..c981fc75a030 100644

drivers/staging/vt6656/baseband.c int vnt_vt3184_init(struct vnt_private *priv) · line 234

Quoted 7 lines
drivers/staging/vt6656/baseband.c +2 -2
@@ -230,8 +230,8 @@ int vnt_vt3184_init(struct vnt_private *priv)
 
 	dev_dbg(&priv->usb->dev, "RF Type %d\n", priv->rf_type);
 
-	if ((priv->rf_type == RF_AL2230) ||
-	    (priv->rf_type == RF_AL2230S)) {
+	if (priv->rf_type == RF_AL2230 ||
+	    priv->rf_type == RF_AL2230S) {

Sorry, but no, please see the mailing list archives as to why I keep rejecting these kinds of patches. checkpatch is wrong here.

greg k-h