Re: [PATCH] PCI: tegra: Fix reporting GPIO error value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux