[PATCH] staging: prism2mgmt: Removed unnecessary parentheses in if statment

Hoorad Farrokh posted 1 patch 1 year, 11 months ago
drivers/staging/wlan-ng/prism2mgmt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] staging: prism2mgmt: Removed unnecessary parentheses in if statment
Posted by Hoorad Farrokh 1 year, 11 months ago
Fixed a Linux coding style problem.

Reported by checkpatch:

CHECK: Unnecessary parentheses around 'msg->prismheader.status ==
                     P80211ENUM_msgitem_status_data_ok'

Signed-off-by: Hoorad Farrokh <hourrad.f@gmail.com>
---
 drivers/staging/wlan-ng/prism2mgmt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c
index d5737166564e..a1adf69ba9f9 100644
--- a/drivers/staging/wlan-ng/prism2mgmt.c
+++ b/drivers/staging/wlan-ng/prism2mgmt.c
@@ -1288,8 +1288,8 @@ int prism2mgmt_wlansniff(struct wlandevice *wlandev, void *msgp)
 
 		/* Set the driver state */
 		/* Do we want the prism2 header? */
-		if ((msg->prismheader.status ==
-		     P80211ENUM_msgitem_status_data_ok) &&
+		if (msg->prismheader.status ==
+		     P80211ENUM_msgitem_status_data_ok &&
 		    (msg->prismheader.data == P80211ENUM_truth_true)) {
 			hw->sniffhdr = 0;
 			wlandev->netdev->type = ARPHRD_IEEE80211_PRISM;
-- 
2.42.0
Re: [PATCH] staging: prism2mgmt: Removed unnecessary parentheses in if statment
Posted by Dan Carpenter 1 year, 11 months ago
On Wed, Jan 17, 2024 at 07:11:17PM +1300, Hoorad Farrokh wrote:
> Fixed a Linux coding style problem.
> 
> Reported by checkpatch:
> 
> CHECK: Unnecessary parentheses around 'msg->prismheader.status ==
>                      P80211ENUM_msgitem_status_data_ok'
> 
> Signed-off-by: Hoorad Farrokh <hourrad.f@gmail.com>

Just ignore these warnings.

https://lore.kernel.org/all/?q=prism2mgmt_wlansniff+Unnecessary+parentheses

regards,
dan carpenter