From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753563AbcIIJTl (ORCPT ); Fri, 9 Sep 2016 05:19:41 -0400 Received: from mail-wm0-f42.google.com ([74.125.82.42]:36442 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753541AbcIIJTh (ORCPT ); Fri, 9 Sep 2016 05:19:37 -0400 From: Bartosz Golaszewski To: Linus Walleij , Alexandre Courbot , Andy Shevchenko , Vignesh R , Yong Li , Geert Uytterhoeven Cc: linux-gpio , LKML , Bartosz Golaszewski Subject: [PATCH] gpio: gpiolib: fix an incorrect use of WARN_ON() Date: Fri, 9 Sep 2016 11:19:29 +0200 Message-Id: <1473412769-17428-1-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This breaks the build due to the format string being passed as argument. Fix it by using WARN(). Signed-off-by: Bartosz Golaszewski --- NOTE This patch applies on top of linux-gpio devel branch. drivers/gpio/gpiolib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.7.4