public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Input: gpio-keys - print button label in IRQ button error messages
Date: Fri, 15 Oct 2021 22:34:25 -0700	[thread overview]
Message-ID: <YWpkYWCFMtR40A6m@google.com> (raw)
In-Reply-To: <f1728883a5bf4481eb1d45e7b7a71005e29e259a.1632467859.git.geert+renesas@glider.be>

Hi Geert,
On Fri, Sep 24, 2021 at 09:18:02AM +0200, Geert Uytterhoeven wrote:
> When an error message related to IRQ buttons is printed, no clue is
> given about the actual button that caused the failure.  Fix this by
> including the button label, to make it more obvious which button has an
> incomplete or incorrect hardware description.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  drivers/input/keyboard/gpio_keys.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
> index 0f2250c6aa4978d5..fc706918d7b103cb 100644
> --- a/drivers/input/keyboard/gpio_keys.c
> +++ b/drivers/input/keyboard/gpio_keys.c
> @@ -617,14 +617,16 @@ static int gpio_keys_setup_key(struct platform_device *pdev,
>  		}
>  	} else {
>  		if (!button->irq) {
> -			dev_err(dev, "Found button without gpio or irq\n");
> +			dev_err(dev, "Found button %s without gpio or irq\n",
> +				desc);

I do not believe description is mandatory, so we may end up printing
"gpio_keys" here. I wonder if it would not be more reliable to print the
index of the problematic key?

Thanks.

-- 
Dmitry

  reply	other threads:[~2021-10-16  5:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-24  7:18 [PATCH] Input: gpio-keys - print button label in IRQ button error messages Geert Uytterhoeven
2021-10-16  5:34 ` Dmitry Torokhov [this message]
2021-10-18 11:47   ` Geert Uytterhoeven

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=YWpkYWCFMtR40A6m@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox