Skip to contentSkip to conversation

staging: ks7010: fix spinlock_t definition without comment

PATCH In review TaheraFahimi 2 participants 4 messages Mar 12, 2024 – Mar 13, 2024 1 message not in the archive Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: ks7010: fix spinlock_t definition without comment

This change ensures adherence to coding style guidelines.

---
 drivers/staging/ks7010/ks_wlan.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/ks7010/ks_wlan.h +1 -1
index 3e9a91b5131c..94322e2ea304 100644
@@ -468,7 +468,7 @@ struct ks_wlan_private {
 	char nick[IW_ESSID_MAX_SIZE + 1];
 
 	spinlock_t multicast_spin;
-
+	/* lock for synchronize access to device read operation */
 	spinlock_t dev_read_lock;
 	wait_queue_head_t devread_wait;
 
Signature · 1 line
2.34.1
#1 lore raw
Quoted 12 lines · TaheraFahimi

This change ensures adherence to coding style guidelines.

---
 drivers/staging/ks7010/ks_wlan.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/ks7010/ks_wlan.h +0 -0
index 3e9a91b5131c..94322e2ea304 100644

drivers/staging/ks7010/ks_wlan.h struct ks_wlan_private { · line 471

Quoted 5 lines
drivers/staging/ks7010/ks_wlan.h +1 -1
@@ -468,7 +468,7 @@ struct ks_wlan_private {
 	char nick[IW_ESSID_MAX_SIZE + 1];
 
 	spinlock_t multicast_spin;
-
+	/* lock for synchronize access to device read operation */

How did you come up with this comment? I'm not sure that it reflects very well the function in which the lock is used.

julia

Quoted 8 lines
drivers/staging/ks7010/ks_wlan.h +0 -1
 	spinlock_t dev_read_lock;
 	wait_queue_head_t devread_wait;
 
--

2.34.1

#2 lore raw
Quoted 18 lines · Julia Lawall
Quoted 14 lines · TaheraFahimi

This change ensures adherence to coding style guidelines.

---
 drivers/staging/ks7010/ks_wlan.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/ks7010/ks_wlan.h +0 -0
index 3e9a91b5131c..94322e2ea304 100644
@@ -468,7 +468,7 @@ struct ks_wlan_private {
 	char nick[IW_ESSID_MAX_SIZE + 1];
 
Quoted 17 lines

drivers/staging/ks7010/ks_wlan.h struct ks_wlan_private { · line 471

Quoted 3 lines
drivers/staging/ks7010/ks_wlan.h +1 -1
 	spinlock_t multicast_spin;
-
+	/* lock for synchronize access to device read operation */

How did you come up with this comment? I'm not sure that it reflects very well the function in which the lock is used.

julia

Quoted 8 lines
drivers/staging/ks7010/ks_wlan.h +0 -1
 	spinlock_t dev_read_lock;
 	wait_queue_head_t devread_wait;
 
--

2.34.1

I came up with this comment since this lock is used in function "devio_rec_ind" in ks_hostif.c to ensure safe access to the device's receive buffer.

A message that is not in the archive (sent off-list or not yet received): ZfDdQDvGglrAX0Kq@tahera-OptiPlex-5000

#4 lore raw
Quoted 31 lines · Tahera Fahimi
Quoted 30 lines · Julia Lawall
Quoted 12 lines · TaheraFahimi

This change ensures adherence to coding style guidelines.

---
 drivers/staging/ks7010/ks_wlan.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/ks7010/ks_wlan.h +0 -0
index 3e9a91b5131c..94322e2ea304 100644

drivers/staging/ks7010/ks_wlan.h struct ks_wlan_private { · line 471

Quoted 5 lines
drivers/staging/ks7010/ks_wlan.h +1 -1
@@ -468,7 +468,7 @@ struct ks_wlan_private {
 	char nick[IW_ESSID_MAX_SIZE + 1];
 
 	spinlock_t multicast_spin;
-
+	/* lock for synchronize access to device read operation */

How did you come up with this comment? I'm not sure that it reflects very well the function in which the lock is used.

julia

Quoted 3 lines
drivers/staging/ks7010/ks_wlan.h +0 -0
 	spinlock_t dev_read_lock;
 	wait_queue_head_t devread_wait;
 
Quoted 6 lines
Quoted 5 lines
Quoted 5 lines

--
2.34.1

I came up with this comment since this lock is used in function "devio_rec_ind" in ks_hostif.c to ensure safe access to the device's receive buffer.

OK. That doesn't seem to be conveyed by the comment.

Since you are replying to my message, it would be better to put your text directly under my message, and not at the end.

julia