[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200415164930.GF19897@qmqm.qmqm.pl>
Date: Wed, 15 Apr 2020 18:49:30 +0200
From: Michał Mirosław <mirq-linux@...e.qmqm.pl>
To: Pali Rohár <pali@...nel.org>
Cc: Thierry Reding <thierry.reding@...il.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Andrew Murray <amurray@...goodpenguin.co.uk>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Jonathan Hunter <jonathanh@...dia.com>,
linux-tegra@...r.kernel.org, linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] PCI: tegra: Fix reporting GPIO error value
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
Powered by blists - more mailing lists