Skip to contentSkip to conversation

gpio: gpiolib: fix an incorrect use of WARN_ON()

PATCH In review Bartosz Golaszewski 2 participants 2 messages Sep 9, 2016 – Sep 12, 2016 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: gpiolib: fix an incorrect use of WARN_ON()

This breaks the build due to the format string being passed as argument. Fix it by using WARN().

---
NOTE This patch applies on top of linux-gpio devel branch.

 drivers/gpio/gpiolib.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpio/gpiolib.c +2 -2
index 95effec..384ed0a 100644
@@ -1618,8 +1618,8 @@ int _gpiochip_irqchip_add(struct gpio_chip *gpiochip,
 	 * used to configure the interrupts, as you may end-up with
 	 * conflicting triggers. Tell the user, and reset to NONE.
 	 */
-	if (WARN_ON(of_node && type != IRQ_TYPE_NONE,
-		    "%s: Ignoring %d default trigger\n", of_node->full_name))
+	if (WARN(of_node && type != IRQ_TYPE_NONE,
+		 "%s: Ignoring default trigger\n", of_node->full_name))
 		type = IRQ_TYPE_NONE;
 
 	gpiochip->irqchip = irqchip;
Signature · 1 line
2.7.4
#1 lore raw
Quoted 6 lines · Bartosz Golaszewski

This breaks the build due to the format string being passed as argument. Fix it by using WARN().

---
NOTE This patch applies on top of linux-gpio devel branch.

Thanks, Marc realized the mistake and sent a v2 patch so I have already fixed this up, sorry for leaving the tree in a mess over the weekend.

Yours,
Linus Walleij