* [PATCH] staging: greybus: replace PTR_ERR() with %pe in error messages
@ 2026-10-12 17:00 pavankumaryalagada
2026-10-12 17:57 ` Jeremy Clifton
0 siblings, 1 reply; 3+ messages in thread
From: pavankumaryalagada @ 2026-10-12 17:00 UTC (permalink / raw)
To: johan, gregkh
Cc: vireshk, elder, greybus-dev, linux-staging, linux-kernel,
outreachy, Yalagada Pavan Kumar
From: Yalagada Pavan Kumar <pavankumaryalagada@gmail.com>
Use %pe to print error pointers directly and display their
error names.
Keep the other PTR_ERR() call because its return value is
needed for ret.
Signed-off-by: Yalagada Pavan Kumar <pavankumaryalagada@gmail.com>
---
drivers/staging/greybus/fw-core.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/greybus/fw-core.c b/drivers/staging/greybus/fw-core.c
index 2016a74f137f..7053afa9ab3e 100644
--- a/drivers/staging/greybus/fw-core.c
+++ b/drivers/staging/greybus/fw-core.c
@@ -112,8 +112,8 @@ static int gb_fw_core_probe(struct gb_bundle *bundle,
connection = gb_connection_create(bundle, cport_id,
gb_fw_download_request_handler);
if (IS_ERR(connection)) {
- dev_err(&bundle->dev, "failed to create download connection (%ld)\n",
- PTR_ERR(connection));
+ dev_err(&bundle->dev, "failed to create download connection (%pe)\n",
+ connection);
} else {
fw_core->download_connection = connection;
}
@@ -131,8 +131,8 @@ static int gb_fw_core_probe(struct gb_bundle *bundle,
connection = gb_connection_create(bundle, cport_id,
NULL);
if (IS_ERR(connection)) {
- dev_err(&bundle->dev, "failed to create SPI connection (%ld)\n",
- PTR_ERR(connection));
+ dev_err(&bundle->dev, "failed to create SPI connection (%pe)\n",
+ connection);
} else {
fw_core->spi_connection = connection;
}
@@ -149,8 +149,8 @@ static int gb_fw_core_probe(struct gb_bundle *bundle,
connection = gb_connection_create(bundle, cport_id,
NULL);
if (IS_ERR(connection)) {
- dev_err(&bundle->dev, "failed to create Authentication connection (%ld)\n",
- PTR_ERR(connection));
+ dev_err(&bundle->dev, "failed to create Authentication connection (%pe)\n",
+ connection);
} else {
fw_core->cap_connection = connection;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] staging: greybus: replace PTR_ERR() with %pe in error messages
2026-10-12 17:00 [PATCH] staging: greybus: replace PTR_ERR() with %pe in error messages pavankumaryalagada
@ 2026-10-12 17:57 ` Jeremy Clifton
2026-10-12 18:31 ` Yalagada Pavan Kumar
0 siblings, 1 reply; 3+ messages in thread
From: Jeremy Clifton @ 2026-10-12 17:57 UTC (permalink / raw)
To: pavankumaryalagada
Cc: johan, gregkh, vireshk, elder, greybus-dev, linux-staging,
linux-kernel, outreachy
For this patch I have only one immediate suggestion.
The firmware management case (case GREYBUS_PROTOCOL_FW_MANAGEMENT:)
should match the other cases. Found around line 96.
You've changed the pointer variable to display and this seems correct.
For consistency, each should match.
On Mon, Oct 12, 2026 at 11:00 AM <pavankumaryalagada@gmail.com> wrote:
>
> From: Yalagada Pavan Kumar <pavankumaryalagada@gmail.com>
>
> Use %pe to print error pointers directly and display their
> error names.
>
> Keep the other PTR_ERR() call because its return value is
> needed for ret.
>
> Signed-off-by: Yalagada Pavan Kumar <pavankumaryalagada@gmail.com>
> ---
> drivers/staging/greybus/fw-core.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/greybus/fw-core.c b/drivers/staging/greybus/fw-core.c
> index 2016a74f137f..7053afa9ab3e 100644
> --- a/drivers/staging/greybus/fw-core.c
> +++ b/drivers/staging/greybus/fw-core.c
> @@ -112,8 +112,8 @@ static int gb_fw_core_probe(struct gb_bundle *bundle,
> connection = gb_connection_create(bundle, cport_id,
> gb_fw_download_request_handler);
> if (IS_ERR(connection)) {
> - dev_err(&bundle->dev, "failed to create download connection (%ld)\n",
> - PTR_ERR(connection));
> + dev_err(&bundle->dev, "failed to create download connection (%pe)\n",
> + connection);
> } else {
> fw_core->download_connection = connection;
> }
> @@ -131,8 +131,8 @@ static int gb_fw_core_probe(struct gb_bundle *bundle,
> connection = gb_connection_create(bundle, cport_id,
> NULL);
> if (IS_ERR(connection)) {
> - dev_err(&bundle->dev, "failed to create SPI connection (%ld)\n",
> - PTR_ERR(connection));
> + dev_err(&bundle->dev, "failed to create SPI connection (%pe)\n",
> + connection);
> } else {
> fw_core->spi_connection = connection;
> }
> @@ -149,8 +149,8 @@ static int gb_fw_core_probe(struct gb_bundle *bundle,
> connection = gb_connection_create(bundle, cport_id,
> NULL);
> if (IS_ERR(connection)) {
> - dev_err(&bundle->dev, "failed to create Authentication connection (%ld)\n",
> - PTR_ERR(connection));
> + dev_err(&bundle->dev, "failed to create Authentication connection (%pe)\n",
> + connection);
> } else {
> fw_core->cap_connection = connection;
> }
> --
> 2.43.0
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] staging: greybus: replace PTR_ERR() with %pe in error messages
2026-10-12 17:57 ` Jeremy Clifton
@ 2026-10-12 18:31 ` Yalagada Pavan Kumar
0 siblings, 0 replies; 3+ messages in thread
From: Yalagada Pavan Kumar @ 2026-10-12 18:31 UTC (permalink / raw)
To: Jeremy Clifton
Cc: johan, gregkh, vireshk, elder, greybus-dev, linux-staging,
linux-kernel, outreachy
On Mon, Oct 12, 2026 at 11:57:26AM -0600, Jeremy Clifton wrote:
> For this patch I have only one immediate suggestion.
>
> The firmware management case (case GREYBUS_PROTOCOL_FW_MANAGEMENT:)
> should match the other cases. Found around line 96.
Thanks for the review. I'll update the firmware management case to use %pe
for consistency and send a revised patch.
Thanks,
Pavan
>
> You've changed the pointer variable to display and this seems correct.
>
> For consistency, each should match.
>
> On Mon, Oct 12, 2026 at 11:00 AM <pavankumaryalagada@gmail.com> wrote:
> >
> > From: Yalagada Pavan Kumar <pavankumaryalagada@gmail.com>
> >
> > Use %pe to print error pointers directly and display their
> > error names.
> >
> > Keep the other PTR_ERR() call because its return value is
> > needed for ret.
> >
> > Signed-off-by: Yalagada Pavan Kumar <pavankumaryalagada@gmail.com>
> > ---
> > drivers/staging/greybus/fw-core.c | 12 ++++++------
> > 1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/staging/greybus/fw-core.c b/drivers/staging/greybus/fw-core.c
> > index 2016a74f137f..7053afa9ab3e 100644
> > --- a/drivers/staging/greybus/fw-core.c
> > +++ b/drivers/staging/greybus/fw-core.c
> > @@ -112,8 +112,8 @@ static int gb_fw_core_probe(struct gb_bundle *bundle,
> > connection = gb_connection_create(bundle, cport_id,
> > gb_fw_download_request_handler);
> > if (IS_ERR(connection)) {
> > - dev_err(&bundle->dev, "failed to create download connection (%ld)\n",
> > - PTR_ERR(connection));
> > + dev_err(&bundle->dev, "failed to create download connection (%pe)\n",
> > + connection);
> > } else {
> > fw_core->download_connection = connection;
> > }
> > @@ -131,8 +131,8 @@ static int gb_fw_core_probe(struct gb_bundle *bundle,
> > connection = gb_connection_create(bundle, cport_id,
> > NULL);
> > if (IS_ERR(connection)) {
> > - dev_err(&bundle->dev, "failed to create SPI connection (%ld)\n",
> > - PTR_ERR(connection));
> > + dev_err(&bundle->dev, "failed to create SPI connection (%pe)\n",
> > + connection);
> > } else {
> > fw_core->spi_connection = connection;
> > }
> > @@ -149,8 +149,8 @@ static int gb_fw_core_probe(struct gb_bundle *bundle,
> > connection = gb_connection_create(bundle, cport_id,
> > NULL);
> > if (IS_ERR(connection)) {
> > - dev_err(&bundle->dev, "failed to create Authentication connection (%ld)\n",
> > - PTR_ERR(connection));
> > + dev_err(&bundle->dev, "failed to create Authentication connection (%pe)\n",
> > + connection);
> > } else {
> > fw_core->cap_connection = connection;
> > }
> > --
> > 2.43.0
> >
> >
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-10-12 18:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-12 17:00 [PATCH] staging: greybus: replace PTR_ERR() with %pe in error messages pavankumaryalagada
2026-10-12 17:57 ` Jeremy Clifton
2026-10-12 18:31 ` Yalagada Pavan Kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox