Skip to contentSkip to conversation

staging: wlan-ng: add comment to spinlock_t

PATCH In review Dalvin-Ehinoma Noah Aiguobas 2 participants 2 messages Apr 2, 2023 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: wlan-ng: add comment to spinlock_t

Fix checkpatch.pl warning: spinlock_t definition without comment in drivers/staging/wlan-ng/hfa384x.h

---
 drivers/staging/wlan-ng/hfa384x.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wlan-ng/hfa384x.h +1 -1
index e33dd1b9c40e..fc6d67cec5b1 100644
@@ -1000,7 +1000,7 @@ struct hfa384x_usbctlx {
 };
 
 struct hfa384x_usbctlxq {
-	spinlock_t lock;
+	spinlock_t lock;	/* disable interrupts while working in hfa384 or hfa384x_usbctlx */
 	struct list_head pending;
 	struct list_head active;
 	struct list_head completing;
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 13 lines · Dalvin-Ehinoma Noah Aiguobas

Fix checkpatch.pl warning: spinlock_t definition without comment in drivers/staging/wlan-ng/hfa384x.h

---
 drivers/staging/wlan-ng/hfa384x.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wlan-ng/hfa384x.h +0 -0
index e33dd1b9c40e..fc6d67cec5b1 100644

drivers/staging/wlan-ng/hfa384x.h struct hfa384x_usbctlx { · line 1003

Quoted 5 lines
drivers/staging/wlan-ng/hfa384x.h +1 -1
@@ -1000,7 +1000,7 @@ struct hfa384x_usbctlx {
 };
 
 struct hfa384x_usbctlxq {
-	spinlock_t lock;
+	spinlock_t lock;	/* disable interrupts while working in hfa384 or hfa384x_usbctlx */

Disable interrupts? Are you sure that is what this lock is doing? And what exactly does "while working in..." mean?

Why not just write real kernel doc for all of the fields in this structure?

thanks,

greg k-h