All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Hans de Goede <hdegoede@redhat.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org
Subject: Re: [PATCH] pinctrl: baytrail: Do not call WARN_ON for a firmware bug
Date: Wed, 12 Jul 2017 15:38:52 +0300	[thread overview]
Message-ID: <1499863132.22624.361.camel@linux.intel.com> (raw)
In-Reply-To: <20170712123101.26996-1-hdegoede@redhat.com>

On Wed, 2017-07-12 at 14:31 +0200, Hans de Goede wrote:
> 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.

I'm not against the patch, looks good to me, though can you shed a bit
of light what is the FW bug you are experiencing?

> 
> 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);
>  	}
>  

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

  reply	other threads:[~2017-07-12 12:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1499863132.22624.361.camel@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.