From: Yalagada Pavan Kumar <pavankumaryalagada@gmail.com>
To: Johan Hovold <johan@kernel.org>
Cc: gregkh@linuxfoundation.org, outreachy@lists.linux.dev,
elder@kernel.org, dtwlin@gmail.com, vireshk@kernel.org,
greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org, Alex Elder <elder@riscstar.com>
Subject: Re: [PATCH v5] staging: greybus: use %pe in error messages
Date: Mon, 19 Oct 2026 14:46:52 +0530 [thread overview]
Message-ID: <atXgBFNsXG6w30EQ@user> (raw)
In-Reply-To: <atXDvg_u1hQAZiYX@hovoldconsulting.com>
On Mon, Oct 19, 2026 at 09:16:14AM +0200, Johan Hovold wrote:
> On Sun, Oct 18, 2026 at 02:19:25PM +0530, pavankumaryalagada@gmail.com wrote:
> > From: Yalagada Pavan Kumar <pavankumaryalagada@gmail.com>
> >
> > Use %pe to print the error pointer directly and display its
> > error name.
> >
> > Keep PTR_ERR() calls when the numeric error value is needed
> > for returning the error code.
> >
> > Signed-off-by: Yalagada Pavan Kumar <pavankumaryalagada@gmail.com>
> > Reviewed-by: Alex Elder <elder@riscstar.com>
> > ---
> > v5:
> > - Drop arche-apb-ctrl.c and arche-platform.c changes because the
> > files were removed.
> > - keep only the uart.c change, as the fw-core.c changes are already
> > present in staging/staging-next.
>
> The commit summary (Subject) is a bit misleading now.
>
> > diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c
> > index d47f00751e7a..74c9898c0eed 100644
> > --- a/drivers/staging/greybus/uart.c
> > +++ b/drivers/staging/greybus/uart.c
> > @@ -956,7 +956,7 @@ static int gb_tty_init(void)
> > gb_tty_driver = tty_alloc_driver(GB_NUM_MINORS, TTY_DRIVER_REAL_RAW |
> > TTY_DRIVER_DYNAMIC_DEV);
> > if (IS_ERR(gb_tty_driver)) {
> > - pr_err("Can not allocate tty driver\n");
> > + pr_err("Can not allocate tty driver: %pe\n", gb_tty_driver);
>
> There's really no need to print the errno here as it will always be
> -ENOMEM if we ever hit it. You could even remove the error message
> completely.
Since the error message is no longer needed, I will remove it in a separate
patch rather than in this revision.
Thanks,
Pavan
>
> > retval = PTR_ERR(gb_tty_driver);
> > goto fail_unregister_dev;
> > }
>
> Johan
next prev parent reply other threads:[~2026-10-19 9:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-18 8:49 [PATCH v5] staging: greybus: use %pe in error messages pavankumaryalagada
2026-10-19 7:16 ` Johan Hovold
2026-10-19 9:16 ` Yalagada Pavan Kumar [this message]
2026-10-19 12:09 ` Alex Elder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=atXgBFNsXG6w30EQ@user \
--to=pavankumaryalagada@gmail.com \
--cc=dtwlin@gmail.com \
--cc=elder@kernel.org \
--cc=elder@riscstar.com \
--cc=gregkh@linuxfoundation.org \
--cc=greybus-dev@lists.linaro.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=outreachy@lists.linux.dev \
--cc=vireshk@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox