mbox series

[v7,0/3] locking/mutex: Mark devm_mutex_init() as __must_check

Message ID 20250617-must_check-devm_mutex_init-v7-0-d9e449f4d224@weissschuh.net
Headers show
Series locking/mutex: Mark devm_mutex_init() as __must_check | expand

Message

Thomas Weißschuh June 17, 2025, 5:08 p.m. UTC
devm_mutex_init() can fail. Make sure everybody checks the return value.
All patches should go through the mutex tree together.

It would be great if this could go in through a single tree at once.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
Changes in v7:
- Pick up Ack from Andrew
- Reword commit messages
- Link to v6: https://lore.kernel.org/r/20250609-must_check-devm_mutex_init-v6-0-9540d5df9704@weissschuh.net

Changes in v6:
- Rebase on v6.16-rc1
- Pick up review tag from Bartosz
- Fix up spi-nxp-fspi
- Fix up leds-lp8860
- Link to v5: https://lore.kernel.org/r/20250505-must_check-devm_mutex_init-v5-1-92fa4b793c6e@weissschuh.net

Changes in v5:
- Pick up review tag from Andy
- Link to v4: https://lore.kernel.org/r/20250407-must_check-devm_mutex_init-v4-1-587bacc9f6b3@weissschuh.net

Changes in v4:
- Drop already applied leds-1202 driver patch
- Rebase on v6.15-rc1
- Link to v3: https://lore.kernel.org/r/20250208-must_check-devm_mutex_init-v3-0-245e417dcc9e@weissschuh.net

Changes in v3:
- Introduce and use helper macro __mutex_init_ret()
- Link to v2: https://lore.kernel.org/r/20250204-must_check-devm_mutex_init-v2-0-7b6271c4b7e6@weissschuh.net

Changes in v2:
- Rebase on 6.14-rc1
- Fix up leds-1202 driver
- Link to v1: https://lore.kernel.org/r/20241202-must_check-devm_mutex_init-v1-1-e60eb97b8c72@weissschuh.net

---
Thomas Weißschuh (3):
      spi: spi-nxp-fspi: check return value of devm_mutex_init()
      leds: lp8860: Check return value of devm_mutex_init()
      locking/mutex: Mark devm_mutex_init() as __must_check

 drivers/leds/leds-lp8860.c |  4 +++-
 drivers/spi/spi-nxp-fspi.c |  4 +++-
 include/linux/mutex.h      | 11 +++++++----
 3 files changed, 13 insertions(+), 6 deletions(-)
---
base-commit: 19272b37aa4f83ca52bdf9c16d5d81bdd1354494
change-id: 20241031-must_check-devm_mutex_init-cac583bda8fe

Best regards,