From: Hans de Goede Date: Wed, 12 Jul 2017 12:31:01 +0000 (+0200) Subject: pinctrl: baytrail: Do not call WARN_ON for a firmware bug X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b5894d129b90f6600ac7e3420ac813c74054319b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git pinctrl: baytrail: Do not call WARN_ON for a firmware bug 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 Acked-by: Andy Shevchenko Signed-off-by: Linus Walleij --- 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); }