On Mon, Jul 24, 2023 at 11:20:42AM -0700, Brett Creeley wrote: > On 7/24/2023 6:00 AM, Jason Gunthorpe wrote: > > Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. > > > > > > On Sat, Jul 22, 2023 at 12:09:58AM -0700, Brett Creeley wrote: > > > On 7/21/2023 2:01 AM, Tian, Kevin wrote: > > > > Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. > > > > > > > > > > > > > From: Brett Creeley <brett.creeley@xxxxxxx> > > > > > Sent: Thursday, July 20, 2023 6:35 AM > > > > > > > > > > +void pds_vfio_unregister_client_cmd(struct pds_vfio_pci_device *pds_vfio) > > > > > +{ > > > > > + struct pci_dev *pdev = pds_vfio_to_pci_dev(pds_vfio); > > > > > + int err; > > > > > + > > > > > + err = pds_client_unregister(pci_physfn(pdev), pds_vfio->client_id); > > > > > + if (err) > > > > > + dev_err(&pdev->dev, "unregister from DSC failed: %pe\n", > > > > > + ERR_PTR(err)); > > > > > > > > Why using ERR_PTR() here? it looks a common pattern used cross > > > > this series. > > > > > > Yes, this is intentional. This is more readable than just printing out the > > > error value. > > > > That seems like a hack, it would be nicer if printk could format > > errnos natively > > This is already being used all over the driver hierarchy. That seems like an overstatement. The 100 places it is already used would all be better as some '%de' instead. Jason