All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
Cc: linux-input@vger.kernel.org
Subject: Re: [PATCH] Input: synaptics-rmi4: Use %pe for error codes.
Date: Mon, 1 May 2023 17:40:55 -0700	[thread overview]
Message-ID: <ZFBcF0ZcBfMFdZLu@google.com> (raw)
In-Reply-To: <1ec25bf991f576a98bd8fdc58264a92ee268eba9.1682793592.git.mirq-linux@rere.qmqm.pl>

On Sat, Apr 29, 2023 at 08:41:19PM +0200, Michał Mirosław wrote:
> Make the error messages a bit easier to understand by showing
> error names where that's enabled.
> 
> Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> ---
>  drivers/input/rmi4/rmi_driver.c | 66 +++++++++++++++++----------------
>  1 file changed, 34 insertions(+), 32 deletions(-)
> 
> diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c
> index 258d5fe3d395..82d85c02a873 100644
> --- a/drivers/input/rmi4/rmi_driver.c
> +++ b/drivers/input/rmi4/rmi_driver.c
> @@ -69,8 +69,8 @@ static int reset_one_function(struct rmi_function *fn)
>  	if (fh->reset) {
>  		retval = fh->reset(fn);
>  		if (retval < 0)
> -			dev_err(&fn->dev, "Reset failed with code %d.\n",
> -				retval);
> +			dev_err(&fn->dev, "Reset failed: %pe\n",
> +				ERR_PTR(retval));

If this is desired we should have a format option for
non-err-ptr-encoded errors.

Thanks.

-- 
Dmitry

  reply	other threads:[~2023-05-02  0:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-29 18:41 [PATCH] Input: synaptics-rmi4: Use %pe for error codes Michał Mirosław
2023-05-02  0:40 ` Dmitry Torokhov [this message]
2023-05-05 20:48   ` Michał Mirosław

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=ZFBcF0ZcBfMFdZLu@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=mirq-linux@rere.qmqm.pl \
    /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.