Messages in this thread |  | | Date | Fri, 6 Mar 2026 17:25:49 +0530 | | Subject | Re: [PATCH 2/2] PCI: endpoint: Improve error messages | | From | ALOK TIWARI <> |
| |
On 3/5/2026 12:42 PM, Manivannan Sadhasivam wrote: > From: Manivannan Sadhasivam<manivannan.sadhasivam@oss.qualcomm.com> > > Include errno in the error prints and also use dev_err() where applicable. > > Signed-off-by: Manivannan Sadhasivam<manivannan.sadhasivam@oss.qualcomm.com> > --- > drivers/pci/endpoint/pci-ep-cfs.c | 15 ++++++++++----- > 1 file changed, 10 insertions(+), 5 deletions(-) > > diff --git a/drivers/pci/endpoint/pci-ep-cfs.c b/drivers/pci/endpoint/pci-ep-cfs.c > index a19db22b7991..2d2efd444b02 100644 > --- a/drivers/pci/endpoint/pci-ep-cfs.c > +++ b/drivers/pci/endpoint/pci-ep-cfs.c > @@ -565,7 +565,8 @@ static void pci_ep_cfs_add_type_group(struct pci_epf_group *epf_group) > > if (IS_ERR(group)) { > dev_err(&epf_group->epf->dev, > - "failed to create epf type specific attributes\n"); > + "failed to create epf type specific attributes: %d\n", > + (int)PTR_ERR(group)); > return; > } > > @@ -578,13 +579,17 @@ static void pci_epf_cfs_add_sub_groups(struct pci_epf_group *epf_group) > > group = pci_ep_cfs_add_primary_group(epf_group); > if (IS_ERR(group)) { > - pr_err("failed to create 'primary' EPC interface\n"); > + dev_err(&epf_group->epf->dev, > + "failed to create 'primary' EPC interface: %d\n", > + (int)PTR_ERR(group));
using (int) not wrong but it is a bit unusual, in this case can we use "%pe" instead ? "failed to create 'primary' EPC interface: %pe\n", group)
> return; > }
Thanks, Alok
|  |