diff mbox

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

Message ID 1473412769-17428-1-git-send-email-bgolaszewski@baylibre.com
State New
Headers show

Commit Message

Bartosz Golaszewski Sept. 9, 2016, 9:19 a.m. UTC
This breaks the build due to the format string being passed as
argument. Fix it by using WARN().

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
NOTE This patch applies on top of linux-gpio devel branch.

 drivers/gpio/gpiolib.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Linus Walleij Sept. 12, 2016, 12:51 p.m. UTC | #1
On Fri, Sep 9, 2016 at 11:19 AM, Bartosz Golaszewski
<bgolaszewski@baylibre.com> wrote:

> This breaks the build due to the format string being passed as
> argument. Fix it by using WARN().
>
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> ---
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 95effec..384ed0a 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -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;