Skip to contentSkip to conversation

staging: greybus: gpio: add comment to mutex definition

PATCH In review Rahul Joshi 2 participants 2 messages Mar 11 – Mar 18

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: greybus: gpio: add comment to mutex definition

The irq_lock mutex is missing a comment describing what it protects, which is required by kernel coding style. Add a comment clarifying that it serializes IRQ bus lock/unlock operations used to defer and sync pending IRQ type and mask changes to hardware.

---
 drivers/staging/greybus/gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/greybus/gpio.c +1 -1
index 12185f7a982c..89c15b804b2a 100644
@@ -39,7 +39,7 @@ struct gb_gpio_controller {
 
 	struct gpio_chip	chip;
 	struct irq_chip		irqc;
-	struct mutex		irq_lock;
+	struct mutex		irq_lock;	/* protects irq bus operations */
 };
 
 static struct gpio_chip *irq_data_to_gpio_chip(struct irq_data *d)
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 15 lines · Rahul Joshi

The irq_lock mutex is missing a comment describing what it protects, which is required by kernel coding style. Add a comment clarifying that it serializes IRQ bus lock/unlock operations used to defer and sync pending IRQ type and mask changes to hardware.

---
 drivers/staging/greybus/gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/greybus/gpio.c +0 -0
index 12185f7a982c..89c15b804b2a 100644

drivers/staging/greybus/gpio.c struct gb_gpio_controller { · line 42

Quoted 5 lines
drivers/staging/greybus/gpio.c +1 -1
@@ -39,7 +39,7 @@ struct gb_gpio_controller {
 
 	struct gpio_chip	chip;
 	struct irq_chip		irqc;
-	struct mutex		irq_lock;
+	struct mutex		irq_lock;	/* protects irq bus operations */

What is a "irq bus"? This comment feels odd to me :(

thanks,

greg k-h