* [PATCH] vdpa/pds: use %pe for ERR_PTR() in event handler registration
@ 2025-10-18 17:46 Alok Tiwari
2025-10-23 22:24 ` Brett Creeley
0 siblings, 1 reply; 2+ messages in thread
From: Alok Tiwari @ 2025-10-18 17:46 UTC (permalink / raw)
To: shannon.nelson, brett.creeley, eperezma, mst, jasowang, xuanzhuo,
virtualization, alok.a.tiwari
Cc: alok.a.tiwarilinux, linux-kernel
Use %pe instead of %ps when printing ERR_PTR() values. %ps is intended
for string pointers, while %pe correctly prints symbolic error names
for error pointers returned via ERR_PTR().
This shows the returned error value more clearly.
Fixes: 67f27b8b3a34 ("pds_vdpa: subscribe to the pds_core events")
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
---
drivers/vdpa/pds/vdpa_dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/vdpa/pds/vdpa_dev.c b/drivers/vdpa/pds/vdpa_dev.c
index 36f61cc96e21..43426bd971ac 100644
--- a/drivers/vdpa/pds/vdpa_dev.c
+++ b/drivers/vdpa/pds/vdpa_dev.c
@@ -51,7 +51,7 @@ static int pds_vdpa_register_event_handler(struct pds_vdpa_device *pdsv)
err = pdsc_register_notify(nb);
if (err) {
nb->notifier_call = NULL;
- dev_err(dev, "failed to register pds event handler: %ps\n",
+ dev_err(dev, "failed to register pds event handler: %pe\n",
ERR_PTR(err));
return -EINVAL;
}
--
2.50.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] vdpa/pds: use %pe for ERR_PTR() in event handler registration
2025-10-18 17:46 [PATCH] vdpa/pds: use %pe for ERR_PTR() in event handler registration Alok Tiwari
@ 2025-10-23 22:24 ` Brett Creeley
0 siblings, 0 replies; 2+ messages in thread
From: Brett Creeley @ 2025-10-23 22:24 UTC (permalink / raw)
To: Alok Tiwari, shannon.nelson, brett.creeley, eperezma, mst,
jasowang, xuanzhuo, virtualization
Cc: alok.a.tiwarilinux, linux-kernel
On 10/18/2025 10:46 AM, Alok Tiwari wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
>
>
> Use %pe instead of %ps when printing ERR_PTR() values. %ps is intended
> for string pointers, while %pe correctly prints symbolic error names
> for error pointers returned via ERR_PTR().
> This shows the returned error value more clearly.
>
> Fixes: 67f27b8b3a34 ("pds_vdpa: subscribe to the pds_core events")
> Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
> ---
> drivers/vdpa/pds/vdpa_dev.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
LGTM. Thanks.
Reviewed-by: Brett Creeley <brett.creeley@amd.com>
>
> diff --git a/drivers/vdpa/pds/vdpa_dev.c b/drivers/vdpa/pds/vdpa_dev.c
> index 36f61cc96e21..43426bd971ac 100644
> --- a/drivers/vdpa/pds/vdpa_dev.c
> +++ b/drivers/vdpa/pds/vdpa_dev.c
> @@ -51,7 +51,7 @@ static int pds_vdpa_register_event_handler(struct pds_vdpa_device *pdsv)
> err = pdsc_register_notify(nb);
> if (err) {
> nb->notifier_call = NULL;
> - dev_err(dev, "failed to register pds event handler: %ps\n",
> + dev_err(dev, "failed to register pds event handler: %pe\n" > ERR_PTR(err));
> return -EINVAL;
> }
> --
> 2.50.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-23 22:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-18 17:46 [PATCH] vdpa/pds: use %pe for ERR_PTR() in event handler registration Alok Tiwari
2025-10-23 22:24 ` Brett Creeley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®