linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: baytrail: Do not call WARN_ON for a firmware bug
@ 2017-07-12 12:31 Hans de Goede
  2017-07-12 12:38 ` Andy Shevchenko
  2017-08-01 13:19 ` Linus Walleij
  0 siblings, 2 replies; 7+ messages in thread
From: Hans de Goede @ 2017-07-12 12:31 UTC (permalink / raw)
  To: Mika Westerberg, Heikki Krogerus, Linus Walleij
  Cc: Hans de Goede, Andy Shevchenko, linux-gpio

WARN_ON causes a backtrace to get logged which is only useful for
kernel bugs. For signalling a firmware bug dev_warn(dev, FW_BUG "...")
should be used.

This fixes users running userspace software to monitor kernel oopses
getting a false positive bug-report every boot because of the wrong
use of WARN_ON.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/pinctrl/intel/pinctrl-baytrail.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/intel/pinctrl-baytrail.c b/drivers/pinctrl/intel/pinctrl-baytrail.c
index fa3c5758ac67..0f3a02495aeb 100644
--- a/drivers/pinctrl/intel/pinctrl-baytrail.c
+++ b/drivers/pinctrl/intel/pinctrl-baytrail.c
@@ -981,12 +981,12 @@ static int byt_gpio_request_enable(struct pinctrl_dev *pctl_dev,
 	 */
 	value = readl(reg) & BYT_PIN_MUX;
 	gpio_mux = byt_get_gpio_mux(vg, offset);
-	if (WARN_ON(gpio_mux != value)) {
+	if (gpio_mux != value) {
 		value = readl(reg) & ~BYT_PIN_MUX;
 		value |= gpio_mux;
 		writel(value, reg);
 
-		dev_warn(&vg->pdev->dev,
+		dev_warn(&vg->pdev->dev, FW_BUG
 			 "pin %u forcibly re-configured as GPIO\n", offset);
 	}
 
-- 
2.13.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-08-01 13:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-12 12:31 [PATCH] pinctrl: baytrail: Do not call WARN_ON for a firmware bug Hans de Goede
2017-07-12 12:38 ` Andy Shevchenko
2017-07-12 12:44   ` Hans de Goede
2017-07-12 13:12     ` Andy Shevchenko
2017-07-12 14:18       ` Hans de Goede
2017-07-12 15:25         ` Andy Shevchenko
2017-08-01 13:19 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).