* [PATCH 1/2] PCI: endpoint: Print the EPF name in the error log of pci_epf_make()
@ 2026-03-05 7:12 Manivannan Sadhasivam
2026-03-05 7:12 ` [PATCH 2/2] PCI: endpoint: Improve error messages Manivannan Sadhasivam
2026-03-26 17:04 ` [PATCH 1/2] PCI: endpoint: Print the EPF name in the error log of pci_epf_make() Manivannan Sadhasivam
0 siblings, 2 replies; 5+ messages in thread
From: Manivannan Sadhasivam @ 2026-03-05 7:12 UTC (permalink / raw)
To: mani, kwilczynski
Cc: kishon, bhelgaas, linux-pci, linux-kernel, Manivannan Sadhasivam,
Bjorn Helgaas
From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Merely printing the error log without the actual EPF name will not give
much clue to the users about the failure. Hence, print the EPF name also.
Suggested-by: Bjorn Helgaas <helgaas@kernel.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
drivers/pci/endpoint/pci-ep-cfs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/endpoint/pci-ep-cfs.c b/drivers/pci/endpoint/pci-ep-cfs.c
index 076d115db02b..a19db22b7991 100644
--- a/drivers/pci/endpoint/pci-ep-cfs.c
+++ b/drivers/pci/endpoint/pci-ep-cfs.c
@@ -625,7 +625,8 @@ static struct config_group *pci_epf_make(struct config_group *group,
epf = pci_epf_create(epf_name);
if (IS_ERR(epf)) {
err = PTR_ERR(epf);
- pr_err("failed to create endpoint function device: %d\n", err);
+ pr_err("failed to create endpoint function device (%s): %d\n",
+ epf_name, err);
goto free_name;
}
--
2.51.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] PCI: endpoint: Improve error messages
2026-03-05 7:12 [PATCH 1/2] PCI: endpoint: Print the EPF name in the error log of pci_epf_make() Manivannan Sadhasivam
@ 2026-03-05 7:12 ` Manivannan Sadhasivam
2026-03-06 11:55 ` ALOK TIWARI
2026-03-26 17:04 ` [PATCH 1/2] PCI: endpoint: Print the EPF name in the error log of pci_epf_make() Manivannan Sadhasivam
1 sibling, 1 reply; 5+ messages in thread
From: Manivannan Sadhasivam @ 2026-03-05 7:12 UTC (permalink / raw)
To: mani, kwilczynski
Cc: kishon, bhelgaas, linux-pci, linux-kernel, Manivannan Sadhasivam
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));
return;
}
group = pci_ep_cfs_add_secondary_group(epf_group);
if (IS_ERR(group)) {
- pr_err("failed to create 'secondary' EPC interface\n");
+ dev_err(&epf_group->epf->dev,
+ "failed to create 'secondary' EPC interface: %d\n",
+ (int)PTR_ERR(group));
return;
}
@@ -675,8 +680,8 @@ struct config_group *pci_ep_cfs_add_epf_group(const char *name)
group = configfs_register_default_group(functions_group, name,
&pci_epf_group_type);
if (IS_ERR(group))
- pr_err("failed to register configfs group for %s function\n",
- name);
+ pr_err("failed to register configfs group for %s function: %d\n",
+ name, (int)PTR_ERR(group));
return group;
}
--
2.51.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] PCI: endpoint: Improve error messages
2026-03-05 7:12 ` [PATCH 2/2] PCI: endpoint: Improve error messages Manivannan Sadhasivam
@ 2026-03-06 11:55 ` ALOK TIWARI
2026-03-26 17:08 ` Manivannan Sadhasivam
0 siblings, 1 reply; 5+ messages in thread
From: ALOK TIWARI @ 2026-03-06 11:55 UTC (permalink / raw)
To: Manivannan Sadhasivam, mani, kwilczynski
Cc: kishon, bhelgaas, linux-pci, linux-kernel
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] PCI: endpoint: Print the EPF name in the error log of pci_epf_make()
2026-03-05 7:12 [PATCH 1/2] PCI: endpoint: Print the EPF name in the error log of pci_epf_make() Manivannan Sadhasivam
2026-03-05 7:12 ` [PATCH 2/2] PCI: endpoint: Improve error messages Manivannan Sadhasivam
@ 2026-03-26 17:04 ` Manivannan Sadhasivam
1 sibling, 0 replies; 5+ messages in thread
From: Manivannan Sadhasivam @ 2026-03-26 17:04 UTC (permalink / raw)
To: kwilczynski, Manivannan Sadhasivam
Cc: kishon, bhelgaas, linux-pci, linux-kernel, Bjorn Helgaas
On Thu, 05 Mar 2026 12:42:34 +0530, Manivannan Sadhasivam wrote:
> Merely printing the error log without the actual EPF name will not give
> much clue to the users about the failure. Hence, print the EPF name also.
Applied, thanks!
[1/2] PCI: endpoint: Print the EPF name in the error log of pci_epf_make()
commit: ff5387d4f0798cf1d1a4f548427bd9142cf35b66
[2/2] PCI: endpoint: Improve error messages
commit: 396d44dcaf8d367ed15ecec30e2f69c62f93306c
Best regards,
--
Manivannan Sadhasivam <mani@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] PCI: endpoint: Improve error messages
2026-03-06 11:55 ` ALOK TIWARI
@ 2026-03-26 17:08 ` Manivannan Sadhasivam
0 siblings, 0 replies; 5+ messages in thread
From: Manivannan Sadhasivam @ 2026-03-26 17:08 UTC (permalink / raw)
To: ALOK TIWARI
Cc: Manivannan Sadhasivam, kwilczynski, kishon, bhelgaas, linux-pci,
linux-kernel
On Fri, Mar 06, 2026 at 05:25:49PM +0530, ALOK TIWARI wrote:
>
>
> 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)
>
Agree. Amended this change while applying, thanks!
- Mani
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-03-26 17:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-05 7:12 [PATCH 1/2] PCI: endpoint: Print the EPF name in the error log of pci_epf_make() Manivannan Sadhasivam
2026-03-05 7:12 ` [PATCH 2/2] PCI: endpoint: Improve error messages Manivannan Sadhasivam
2026-03-06 11:55 ` ALOK TIWARI
2026-03-26 17:08 ` Manivannan Sadhasivam
2026-03-26 17:04 ` [PATCH 1/2] PCI: endpoint: Print the EPF name in the error log of pci_epf_make() Manivannan Sadhasivam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox