From: Dragan Simic <dsimic@manjaro.org>
To: linux-spi@vger.kernel.org, linux-rockchip@lists.infradead.org
Cc: broonie@kernel.org, heiko@sntech.de, gregkh@linuxfoundation.org,
rafael@kernel.org, oss@helene.moe,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 4/5] driver core: Add device probe log helper dev_warn_probe()
Date: Tue, 08 Oct 2024 18:18:46 +0200 [thread overview]
Message-ID: <e8cbbf877cc0e6838afd2d6de3b7bfa1@manjaro.org> (raw)
In-Reply-To: <2be0a28538bb2a3d1bcc91e2ca1f2d0dc09146d9.1727601608.git.dsimic@manjaro.org>
Hello Mark,
I just spotted a couple of small typos, noted below, and I hope you
won't
mind to apply the fixes by hand before applying this patch, please?
On 2024-09-29 11:21, Dragan Simic wrote:
> Some drivers can still provide their functionality to a certain extent
> even
s/extent even/extent when/
> some of their resource acquisitions eventually fail. In such cases,
> emitting
> errors isn't the desired action, but warnings should be emitted
> instead.
>
> To solve this, introduce dev_warn_probe() as a new device probe log
> helper,
> which behaves identically as the already existing dev_err_probe(),
> while it
> produces warnings instead of errors. The intended use is with the
> resources
> that are actually optional for a particular driver.
>
> While there, copyedit the kerneldoc for dev_err_probe() a bit, to
> simplify
> its wording a bit, and reuse it as the kerneldoc for dev_warn_probe(),
> with
> the necessary wording adjustments, of course.
>
> Signed-off-by: Dragan Simic <dsimic@manjaro.org>
> ---
> drivers/base/core.c | 129 +++++++++++++++++++++++++++++--------
> include/linux/dev_printk.h | 1 +
> 2 files changed, 102 insertions(+), 28 deletions(-)
>
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index 8c0733d3aad8..f2e41db0c09f 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -4982,71 +4982,144 @@ define_dev_printk_level(_dev_info, KERN_INFO);
>
> #endif
>
> +static void __dev_probe_failed(const struct device *dev, int err, bool
> fatal,
> + const char *fmt, va_list vargsp)
> +{
> + struct va_format vaf;
> + va_list vargs;
> +
> + /*
> + * On x86_64 and possibly on other architectures, va_list is actually
> a
> + * size-1 array containing a structure. As a result, function
> parameter
> + * vargps decays from T[1] to T*, and &vargsp has type T** rather
> than
s/vargps decays/vargsp decays/
> + * T(*)[1], which is expected by its assignment to vaf.va below.
> + *
> + * One standard way to solve this mess is by creating a copy in a
> local
> + * variable of type va_list and then using a pointer to that local
> copy
> + * instead, which is the approach employed here.
> + */
> + va_copy(vargs, vargsp);
> +
> + vaf.fmt = fmt;
> + vaf.va = &vargs;
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
next prev parent reply other threads:[~2024-10-08 16:20 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-29 9:21 [PATCH v3 0/5] Add dev_warn_probe() and improve error handling in Rockchip SPI drivers Dragan Simic
2024-09-29 9:21 ` [PATCH v3 1/5] spi: rockchip: Perform trivial code cleanups Dragan Simic
2024-09-29 9:21 ` [PATCH v3 2/5] spi: rockchip-sfc: " Dragan Simic
2024-09-29 9:21 ` [PATCH v3 3/5] spi: rockchip-sfc: Use dev_err_probe() in the probe path Dragan Simic
2024-09-29 9:21 ` [PATCH v3 4/5] driver core: Add device probe log helper dev_warn_probe() Dragan Simic
2024-10-01 9:02 ` Hélène Vulquin
2024-10-07 14:25 ` Mark Brown
2024-10-08 13:22 ` Greg KH
2024-10-08 13:22 ` Greg KH
2024-10-08 16:18 ` Dragan Simic [this message]
2024-10-08 17:00 ` Mark Brown
2024-10-08 17:32 ` Dragan Simic
2024-10-08 17:37 ` Mark Brown
2024-10-08 17:39 ` Dragan Simic
2024-09-29 9:21 ` [PATCH v3 5/5] spi: rockchip: Use dev_{err,warn}_probe() in the probe path Dragan Simic
2024-10-01 9:06 ` Hélène Vulquin
2024-10-10 11:14 ` [PATCH v3 0/5] Add dev_warn_probe() and improve error handling in Rockchip SPI drivers Mark Brown
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=e8cbbf877cc0e6838afd2d6de3b7bfa1@manjaro.org \
--to=dsimic@manjaro.org \
--cc=broonie@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=heiko@sntech.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=oss@helene.moe \
--cc=rafael@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