Skip to contentSkip to conversation

staging: cfg80211: Remove parentheses prism2_get_station

PATCH In review Felix N. Kimbu 4 participants 5 messages Mar 11, 2024 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: cfg80211: Remove parentheses prism2_get_station

Remove unnecessary parentheses around 'wlandev->msdstate != WLAN_MSD_RUNNING' in static int prism2_get_station(...)

This change ensures adherence to coding style guidelines.

---
 drivers/staging/wlan-ng/cfg80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wlan-ng/cfg80211.c +1 -1
index 471bb310176f..7451fd2bb580 100644
@@ -247,7 +247,7 @@ static int prism2_get_station(struct wiphy *wiphy, struct net_device *dev,
 
 	memset(sinfo, 0, sizeof(*sinfo));
 
-	if (!wlandev || (wlandev->msdstate != WLAN_MSD_RUNNING))
+	if (!wlandev || wlandev->msdstate != WLAN_MSD_RUNNING)
 		return -EOPNOTSUPP;
 
 	/* build request message */
Signature · 1 line
2.34.1
#1 lore raw
Quoted 15 lines · Felix N. Kimbu

Remove unnecessary parentheses around 'wlandev->msdstate != WLAN_MSD_RUNNING' in static int prism2_get_station(...)

This change ensures adherence to coding style guidelines.

---
 drivers/staging/wlan-ng/cfg80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wlan-ng/cfg80211.c +0 -0
index 471bb310176f..7451fd2bb580 100644

drivers/staging/wlan-ng/cfg80211.c static int prism2_get_station(struct wiphy *wiphy, struct net_device *dev, · line 250

Quoted 5 lines
drivers/staging/wlan-ng/cfg80211.c +1 -1
@@ -247,7 +247,7 @@ static int prism2_get_station(struct wiphy *wiphy, struct net_device *dev,
 
 	memset(sinfo, 0, sizeof(*sinfo));
 
-	if (!wlandev || (wlandev->msdstate != WLAN_MSD_RUNNING))
+	if (!wlandev || wlandev->msdstate != WLAN_MSD_RUNNING)

Sorry, we're ignoring this checkpatch warning.

https://lore.kernel.org/all/?q=prism2_get_station

regards,
dan carpenter

#2 lore raw
In reply to Felix N. Kimbu
Quoted 2 lines · Felix N. Kimbu

Remove unnecessary parentheses around 'wlandev->msdstate != WLAN_MSD_RUNNING' in static int prism2_get_station(...)

You don't need the name of the function in the subject line. That information doesn't help understand the patch.

julia

Quoted 26 lines

This change ensures adherence to coding style guidelines.

---
 drivers/staging/wlan-ng/cfg80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wlan-ng/cfg80211.c +1 -2
index 471bb310176f..7451fd2bb580 100644
@@ -247,7 +247,7 @@ static int prism2_get_station(struct wiphy *wiphy, struct net_device *dev,
 
 	memset(sinfo, 0, sizeof(*sinfo));
 
-	if (!wlandev || (wlandev->msdstate != WLAN_MSD_RUNNING))
+	if (!wlandev || wlandev->msdstate != WLAN_MSD_RUNNING)
 		return -EOPNOTSUPP;
 
 	/* build request message */
--

2.34.1

#3 lore raw
Quoted 11 lines · Julia Lawall
Quoted 2 lines · Felix N. Kimbu

Remove unnecessary parentheses around 'wlandev->msdstate != WLAN_MSD_RUNNING' in static int prism2_get_station(...)

You don't need the name of the function in the subject line. That information doesn't help understand the patch.

julia

Hi Julia,

I think we do not need the function name in the subject but we need something to distinguish between the patches. The subject line needs to be a little unique. Otherwise we will have 100 patches like "[PATCH] staging: cfg80211: Remove parentheses" when we are unlucky. Any better proposal for a Subject uniqueness is welcome.

Function name for this purpose is OK for me.

Thanks for your support.

Bye Philipp

Quoted 28 lines
Quoted 27 lines

This change ensures adherence to coding style guidelines.

---
  drivers/staging/wlan-ng/cfg80211.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wlan-ng/cfg80211.c +1 -2
index 471bb310176f..7451fd2bb580 100644
@@ -247,7 +247,7 @@ static int prism2_get_station(struct wiphy *wiphy, struct net_device *dev,
 
  	memset(sinfo, 0, sizeof(*sinfo));
 
-	if (!wlandev || (wlandev->msdstate != WLAN_MSD_RUNNING))
+	if (!wlandev || wlandev->msdstate != WLAN_MSD_RUNNING)
  		return -EOPNOTSUPP;
 
  	/* build request message */
--

2.34.1

#4 lore raw
Quoted 16 lines · Philipp Hortmann
Quoted 4 lines · Julia Lawall

On Mon, 11 Mar 2024, Felix N. Kimbu wrote:

Quoted 8 lines
Quoted 3 lines

Remove unnecessary parentheses around 'wlandev->msdstate != WLAN_MSD_RUNNING'
in static int prism2_get_station(...)

You don't need the name of the function in the subject line. That information doesn't help understand the patch.

julia

Hi Julia,

Quoted 7 lines

I think we do not need the function name in the subject but we need something to distinguish between the patches. The subject line needs to be a little unique. Otherwise we will have 100 patches like "[PATCH] staging: cfg80211:
Remove parentheses" when we are unlucky. Any better proposal for a Subject uniqueness is welcome.

Function name for this purpose is OK for me.

OK, no problem.

thanks,
julia

Quoted 38 lines

Thanks for your support.

Bye Philipp

Quoted 30 lines
Quoted 29 lines

This change ensures adherence to coding style guidelines.

---
  drivers/staging/wlan-ng/cfg80211.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wlan-ng/cfg80211.c +1 -1
index 471bb310176f..7451fd2bb580 100644
@@ -247,7 +247,7 @@ static int prism2_get_station(struct wiphy *wiphy,
 struct net_device *dev,
 
  	memset(sinfo, 0, sizeof(*sinfo));
 
-	if (!wlandev || (wlandev->msdstate != WLAN_MSD_RUNNING))
+	if (!wlandev || wlandev->msdstate != WLAN_MSD_RUNNING)
  		return -EOPNOTSUPP;
 

/* build request message */
--
2.34.1