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: [PATCH v3 0/5] Add dev_warn_probe() and improve error handling in Rockchip SPI drivers
Date: Sun, 29 Sep 2024 11:21:12 +0200 [thread overview]
Message-ID: <cover.1727601608.git.dsimic@manjaro.org> (raw)
This is a small series that introduces dev_warn_probe() function, which
produces warnings on failed resource acquisitions, and improves error
handling in the probe paths of Rockchip SPI drivers, by using functions
dev_err_probe() and dev_warn_probe() properly in multiple places.
This series also performs a bunch of small, rather trivial code cleanups,
to make the code neater and a bit easier to read.
Changes in v3:
- Fixed a couple of rather embarrassing issues in patch 4/5 pointed
out by the kernel test robot, [7] one of them using the va_copy()
workaround approach already established in the commit 3fbcf75bb41a
("efi/printf: Factor out width/precision parsing"), but all this
really made me think how didn't I notice those issues myself before
sending the patches, which perhaps slipped by because I didn't take
the specifics of x86_64 into account :/
- Added a somewhat lengthy comment to patch 4/5, to explain the newly
introduced va_copy() workaround, partially reusing the comment found
in the above-mentioned commit 3fbcf75bb41a
- Added underscores to the name of the "worker" function in patch 4/5,
to additionally emphasize its internal nature
- Adjusted some of the variable names in patch 4/5 a bit to use what
are seemingly more commonly used names
Changes in v2:
- Collected three Reviewed-by tags from Heiko [1][2][3]
- Dropped patch 3/5, [4] as suggested by Mark, [5] improved the check
to use dev_err_probe() and folded that into new patch 5/5
- Added new patch 4/5 that introduces function dev_warn_probe() that
produces warnings in probe paths, to avoid the promotion of logged
messages from warnings to errors, as noted by Heiko [6]
- Adjusted the description of the series and of the individual patches
a bit to reflect the changes, where appropriate
Link to v2: https://lore.kernel.org/linux-rockchip/cover.1727496560.git.dsimic@manjaro.org/T/#u
Link to v1: https://lore.kernel.org/linux-rockchip/cover.1727337732.git.dsimic@manjaro.org/T/#u
[1] https://lore.kernel.org/linux-rockchip/6085918.31tnzDBltd@phil/
[2] https://lore.kernel.org/linux-rockchip/2285557.3ZeAukHxDK@phil/
[3] https://lore.kernel.org/linux-rockchip/10409403.0AQdONaE2F@phil/
[4] https://lore.kernel.org/linux-rockchip/ce2e7f90e62b15adc2bed1f53122ad39c3a9b5ac.1727337732.git.dsimic@manjaro.org/
[5] https://lore.kernel.org/linux-rockchip/ZvUmk48R4hZYlO71@finisterre.sirena.org.uk/
[6] https://lore.kernel.org/linux-rockchip/6673004.tM3a2QDmDi@phil/
[7] https://lore.kernel.org/linux-rockchip/202409290910.55WdSCMH-lkp@intel.com/
Dragan Simic (5):
spi: rockchip: Perform trivial code cleanups
spi: rockchip-sfc: Perform trivial code cleanups
spi: rockchip-sfc: Use dev_err_probe() in the probe path
driver core: Add device probe log helper dev_warn_probe()
spi: rockchip: Use dev_{err,warn}_probe() in the probe path
drivers/base/core.c | 129 ++++++++++++++++++++++++++-------
drivers/spi/spi-rockchip-sfc.c | 21 ++----
drivers/spi/spi-rockchip.c | 55 +++++++-------
include/linux/dev_printk.h | 1 +
4 files changed, 135 insertions(+), 71 deletions(-)
next reply other threads:[~2024-09-29 9:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-29 9:21 Dragan Simic [this message]
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
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=cover.1727601608.git.dsimic@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;
as well as URLs for NNTP newsgroup(s).