* [PATCH] Staging: vt6656: fix unnecessary parantheses
@ 2017-12-22 14:23 Sumit Pundir
2018-01-08 15:44 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Sumit Pundir @ 2017-12-22 14:23 UTC (permalink / raw)
To: forest; +Cc: gregkh, devel, linux-kernel
This patch fixes a coding style issue as noted by
checkpatch.pl related to unnecessary parentheses.
This patch fixes the following checkpatch.pl warning:
WARNING: Unnecessary parentheses around 'priv->basic_rates'.
Signed-off-by: Sumit Pundir <pundirsumit11@gmail.com>
---
drivers/staging/vt6656/card.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index 501f482..811602e 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -443,7 +443,7 @@ int vnt_ofdm_min_rate(struct vnt_private *priv)
int ii;
for (ii = RATE_54M; ii >= RATE_6M; ii--) {
- if ((priv->basic_rates) & ((u16)BIT(ii)))
+ if (priv->basic_rates & ((u16)BIT(ii)))
return true;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Staging: vt6656: fix unnecessary parantheses
2017-12-22 14:23 [PATCH] Staging: vt6656: fix unnecessary parantheses Sumit Pundir
@ 2018-01-08 15:44 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2018-01-08 15:44 UTC (permalink / raw)
To: Sumit Pundir; +Cc: forest, devel, linux-kernel
On Fri, Dec 22, 2017 at 07:53:52PM +0530, Sumit Pundir wrote:
> This patch fixes a coding style issue as noted by
> checkpatch.pl related to unnecessary parentheses.
>
> This patch fixes the following checkpatch.pl warning:
>
> WARNING: Unnecessary parentheses around 'priv->basic_rates'.
>
> Signed-off-by: Sumit Pundir <pundirsumit11@gmail.com>
> ---
> drivers/staging/vt6656/card.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
> index 501f482..811602e 100644
> --- a/drivers/staging/vt6656/card.c
> +++ b/drivers/staging/vt6656/card.c
> @@ -443,7 +443,7 @@ int vnt_ofdm_min_rate(struct vnt_private *priv)
> int ii;
>
> for (ii = RATE_54M; ii >= RATE_6M; ii--) {
> - if ((priv->basic_rates) & ((u16)BIT(ii)))
> + if (priv->basic_rates & ((u16)BIT(ii)))
You still have one too many () around the BIT stuff...
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Staging: vt6656: Fix unnecessary parantheses
2017-12-25 5:35 [PATCH] Staging: vt6656: Fix " Sumit Pundir
@ 2018-01-08 15:45 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2018-01-08 15:45 UTC (permalink / raw)
To: Sumit Pundir; +Cc: devel, forest, linux-kernel
On Mon, Dec 25, 2017 at 11:05:34AM +0530, Sumit Pundir wrote:
> This patch fixes a few coding style issues as noted by checkpatch.pl
> related to unnecessary parantheses.
>
> This patch fixes the following checkpatch.pl warnings:
>
> WARNING: Unnecessary parentheses around 'priv->eeprom[EEP_OFS_MAJOR_VER] == 0x1'
> WARNING: Unnecessary parentheses around 'priv->eeprom[EEP_OFS_MINOR_VER] >= 0x4'
>
> Signed-off-by: Sumit Pundir <pundirsumit11@gmail.com>
> ---
> drivers/staging/vt6656/main_usb.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
> index 1b51b83..c15ae72 100644
> --- a/drivers/staging/vt6656/main_usb.c
> +++ b/drivers/staging/vt6656/main_usb.c
> @@ -266,8 +266,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) {
No, now you have to guess if && or == or >= comes first :(
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] Staging: vt6656: Fix unnecessary parantheses
@ 2017-12-25 5:35 Sumit Pundir
2018-01-08 15:45 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Sumit Pundir @ 2017-12-25 5:35 UTC (permalink / raw)
To: gregkh; +Cc: forest, devel, linux-kernel
This patch fixes a few coding style issues as noted by checkpatch.pl
related to unnecessary parantheses.
This patch fixes the following checkpatch.pl warnings:
WARNING: Unnecessary parentheses around 'priv->eeprom[EEP_OFS_MAJOR_VER] == 0x1'
WARNING: Unnecessary parentheses around 'priv->eeprom[EEP_OFS_MINOR_VER] >= 0x4'
Signed-off-by: Sumit Pundir <pundirsumit11@gmail.com>
---
drivers/staging/vt6656/main_usb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 1b51b83..c15ae72 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -266,8 +266,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];
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-01-08 15:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-22 14:23 [PATCH] Staging: vt6656: fix unnecessary parantheses Sumit Pundir
2018-01-08 15:44 ` Greg KH
2017-12-25 5:35 [PATCH] Staging: vt6656: Fix " Sumit Pundir
2018-01-08 15:45 ` Greg KH
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).