mbox series

[v3,0/5] Add dev_warn_probe() and improve error handling in Rockchip SPI drivers

Message ID cover.1727601608.git.dsimic@manjaro.org (mailing list archive)
Headers show
Series Add dev_warn_probe() and improve error handling in Rockchip SPI drivers | expand

Message

Dragan Simic Sept. 29, 2024, 9:21 a.m. UTC
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(-)

Comments

Mark Brown Oct. 10, 2024, 11:14 a.m. UTC | #1
On Sun, 29 Sep 2024 11:21:12 +0200, Dragan Simic wrote:
> 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.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/5] spi: rockchip: Perform trivial code cleanups
      commit: f7bc15211fc6946203dd7e57c123f1e387d7225b
[2/5] spi: rockchip-sfc: Perform trivial code cleanups
      commit: cb91287b3b6d42e66f948fbc304f771792c2852f
[3/5] spi: rockchip-sfc: Use dev_err_probe() in the probe path
      commit: 7d46b8d8d78338a2ad986eec0790ddb22fad23a8
[4/5] driver core: Add device probe log helper dev_warn_probe()
      commit: 36e69b160705b65bf136c2fb6a1194447eeb8478
[5/5] spi: rockchip: Use dev_{err,warn}_probe() in the probe path
      commit: e2fc05873905f2ee96b38a116ae86f45fe7d8e49

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark