Skip to content

Improve handling of -ENOMEM in dev_err_probe()

Uwe Kleine-König lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 4 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2driver core: Make dev_err_probe() silent for -ENOMEMdrivers/base/core.c+14 -31 reply
2/2driver core: Don't allow passing a -ENOMEM to dev_err_probe()drivers/base/core.c include/linux/dev_printk.h+9 -33 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchGeert Uytterhoeven
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] Improve handling of -ENOMEM in dev_err_probe()

From: Uwe Kleine-König <[email protected]>

Hello,

the first patch is just a (trivial) forward port of
https://lore.kernel.org/lkml/[email protected]
to today's next.

In reply to the above mentioned patch submission Andy Shevchenko suggested to make passing -ENOMEM unconditionally to dev_err_probe() (i.e. handling the return value of a function that can only succeed or return -ENOMEM) a build error. I'm not convinced, but for the purpose to show good will and get the first patch in, I implemented that in the 2nd patch. See the comments in that mail for my concerns.

After some discussion about Andy's concern the (implicit) v1 thread died. To get the discussion going again here comes another patch submission for these ideas.

Best regards
Uwe

Uwe Kleine-König (2):
driver core: Make dev_err_probe() silent for -ENOMEM driver core: Don't allow passing a -ENOMEM to dev_err_probe()

 drivers/base/core.c        | 21 ++++++++++++++++-----
 include/linux/dev_printk.h |  8 +++++++-
 2 files changed, 23 insertions(+), 6 deletions(-)

base-commit: 6906a84c482f098d31486df8dc98cead21cce2d0

Signature · 1 line
2.43.0