linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
To: "Pali Rohár" <pali@kernel.org>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Andrew Murray <amurray@thegoodpenguin.co.uk>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	linux-tegra@vger.kernel.org, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI: tegra: Fix reporting GPIO error value
Date: Wed, 15 Apr 2020 18:49:30 +0200	[thread overview]
Message-ID: <20200415164930.GF19897@qmqm.qmqm.pl> (raw)
In-Reply-To: <20200415111736.czeh7a3iqmmasow6@pali>

On Wed, Apr 15, 2020 at 01:17:36PM +0200, Pali Rohár wrote:
> On Tuesday 14 April 2020 13:31:04 Michał Mirosław wrote:
> > On Tue, Apr 14, 2020 at 12:25:12PM +0200, Pali Rohár wrote:
> > > Error code is stored in rp->reset_gpio and not in err variable.a
[...]
> > > -				dev_err(dev, "failed to get reset GPIO: %d\n",
> > > -					err);
> > > +				dev_err(dev, "failed to get reset GPIO: %ld\n",
> > > +					PTR_ERR(rp->reset_gpio));
> > >  				return PTR_ERR(rp->reset_gpio);
> > >  			}
> > >  		}
> > 
> > You can use %pe directly on the pointer for added benefit of translation
> > of the error to a name.
> 
> Well, I do not know what is the current preferred style of error
> messages. On lot of places I see just numeric error numbers.

%pe is quite a recent addition to the kernel (since v5.3).

Best Regards
Michał Mirosław

  reply	other threads:[~2020-04-15 16:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-14 10:25 [PATCH] PCI: tegra: Fix reporting GPIO error value Pali Rohár
2020-04-14 11:31 ` Michał Mirosław
2020-04-15 11:17   ` Pali Rohár
2020-04-15 16:49     ` Michał Mirosław [this message]
2020-04-14 13:51 ` Thierry Reding
2020-05-07 19:44 ` Rob Herring
2020-05-11  9:47 ` Lorenzo Pieralisi

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=20200415164930.GF19897@qmqm.qmqm.pl \
    --to=mirq-linux@rere.qmqm.pl \
    --cc=amurray@thegoodpenguin.co.uk \
    --cc=bhelgaas@google.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=pali@kernel.org \
    --cc=thierry.reding@gmail.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 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).