Skip to content

iio: light: ltr501: cleanups and modernizations

[email protected] linux-iio 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 4 repliesIn review
  2. v22 patches 4 repliesSuperseded

Changes in v3 from the cover letter

- Added patch to replace scnprintf() with sysfs_emit_at()
- PATCH 1: reformatted headers and minimized include redundancy, removed cleanup.h header
- PATCH 2: replaced some scoped_guard() instances with {} + guard(), included cleanup.h header

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3iio: light: ltr501: update header inclusionsdrivers/iio/light/ltr501.c+23 -61 reply
2/3iio: light: ltr501: use automatic cleanup of locksdrivers/iio/light/ltr501.c+59 -722 replies
3/3iio: light: ltr501: use `sysfs_emit_at()` for showing scalesdrivers/iio/light/ltr501.c+2 -31 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/3] iio: light: ltr501: cleanups and modernizations

From: "Rafael B. Sales" <[email protected]>

This series cleans up the iio/light/ltr501.c driver by sorting header includes according to the IWYU principles and simplifying locking using automatic cleanup helpers.

Also replaces instances of scnprintf() with sysfs_emit_at(), as the latter is PAGE_SIZE-aware.

Changes in v3:
- Added patch to replace scnprintf() with sysfs_emit_at()
- PATCH 1: reformatted headers and minimized include redundancy, removed cleanup.h header
- PATCH 2: replaced some scoped_guard() instances with {} + guard(), included cleanup.h header

Changes in v2:
- Added patch to sort header includes
- Fixed naming scheme for functions in commit message
- Reverted original lock boundaries
- Simplified returns

Rafael B. Sales (3):
iio: light: ltr501: update header inclusions
iio: light: ltr501: use automatic cleanup of locks
iio: light: ltr501: use sysfs_emit_at() for showing scales

 drivers/iio/light/ltr501.c | 163 +++++++++++++++++++------------------
 1 file changed, 83 insertions(+), 80 deletions(-)
Signature · 1 line
2.53.0