* [PATCH] staging: vt6656: Fix checkpatch unnecessary parentheses
@ 2024-06-11 15:22 Teddy Engel
2024-06-12 6:57 ` Greg Kroah-Hartman
0 siblings, 1 reply; 3+ messages in thread
From: Teddy Engel @ 2024-06-11 15:22 UTC (permalink / raw)
To: Philipp Hortmann, Greg Kroah-Hartman, linux-staging, linux-kernel
Cc: Teddy Engel
Remove unnecessary parentheses - according to checkpatch.pl strict
Signed-off-by: Teddy Engel <engel.teddy@gmail.com>
---
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(-)
diff --git a/drivers/staging/vt6656/TODO b/drivers/staging/vt6656/TODO
index e154b2f3b247..507b7aec9f14 100644
--- a/drivers/staging/vt6656/TODO
+++ b/drivers/staging/vt6656/TODO
@@ -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
diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c
index ad7b963f0d98..c981fc75a030 100644
--- a/drivers/staging/vt6656/baseband.c
+++ b/drivers/staging/vt6656/baseband.c
@@ -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,
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 7bbed462f062..86085f3674c1 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -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];
diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c
index d505b4b69ba4..42b2e0a0a431 100644
--- a/drivers/staging/vt6656/usbpipe.c
+++ b/drivers/staging/vt6656/usbpipe.c
@@ -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;
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: vt6656: Fix checkpatch unnecessary parentheses
@ 2024-06-12 5:41 Philipp Hortmann
0 siblings, 0 replies; 3+ messages in thread
From: Philipp Hortmann @ 2024-06-12 5:41 UTC (permalink / raw)
To: Teddy Engel; +Cc: Greg Kroah-Hartman, linux-staging, linux-kernel
Remove unnecessary parentheses - according to checkpatch.pl strict
Signed-off-by: Teddy Engel <engel.teddy@gmail.com>
Hi Teddy,
your patch creates a checkpatch warning:
WARNING: A patch subject line should describe the change not the tool
that found it
The next thing that worries me is that the fix does not increase the
readability of the code for me. I think overview is better with
brackets.
I also think that you are doing two things at a time. You are changing
the TODO file and the brackets.
I would change only the TODO file.
Thanks for your support.
Bye Philipp
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: vt6656: Fix checkpatch unnecessary parentheses
2024-06-11 15:22 [PATCH] staging: vt6656: Fix checkpatch unnecessary parentheses Teddy Engel
@ 2024-06-12 6:57 ` Greg Kroah-Hartman
0 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2024-06-12 6:57 UTC (permalink / raw)
To: Teddy Engel; +Cc: Philipp Hortmann, linux-staging, linux-kernel
On Tue, Jun 11, 2024 at 04:22:56PM +0100, Teddy Engel wrote:
> Remove unnecessary parentheses - according to checkpatch.pl strict
>
> Signed-off-by: Teddy Engel <engel.teddy@gmail.com>
> ---
> 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(-)
>
> diff --git a/drivers/staging/vt6656/TODO b/drivers/staging/vt6656/TODO
> index e154b2f3b247..507b7aec9f14 100644
> --- a/drivers/staging/vt6656/TODO
> +++ b/drivers/staging/vt6656/TODO
> @@ -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.
> - sparse fixes
> - integrate with drivers/net/wireless
>
> diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c
> index ad7b963f0d98..c981fc75a030 100644
> --- a/drivers/staging/vt6656/baseband.c
> +++ b/drivers/staging/vt6656/baseband.c
> @@ -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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-12 6:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-11 15:22 [PATCH] staging: vt6656: Fix checkpatch unnecessary parentheses Teddy Engel
2024-06-12 6:57 ` Greg Kroah-Hartman
-- strict thread matches above, loose matches on Subject: below --
2024-06-12 5:41 Philipp Hortmann
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).