Linux IIO development
 help / color / mirror / Atom feed
From: rafasales@usp.br
To: andy@kernel.org, dlechner@baylibre.com, jic23@kernel.org,
	nuno.sa@analog.com
Cc: "Rafael B. Sales" <rafasales@usp.br>, linux-iio@vger.kernel.org
Subject: [PATCH v3 0/3] iio: light: ltr501: cleanups and modernizations
Date: Wed, 22 Apr 2026 20:12:54 -0300	[thread overview]
Message-ID: <20260422231305.677778-1-rafasales@usp.br> (raw)

From: "Rafael B. Sales" <rafasales@usp.br>

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(-)

-- 
2.53.0


             reply	other threads:[~2026-04-22 23:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-22 23:12 rafasales [this message]
2026-04-22 23:12 ` [PATCH v3 1/3] iio: light: ltr501: update header inclusions rafasales
2026-04-24  9:27   ` Andy Shevchenko
2026-04-22 23:12 ` [PATCH v3 2/3] iio: light: ltr501: use automatic cleanup of locks rafasales
2026-04-24  9:33   ` Andy Shevchenko
2026-04-24 11:32   ` Jonathan Cameron
2026-04-22 23:12 ` [PATCH v3 3/3] iio: light: ltr501: use `sysfs_emit_at()` for showing scales rafasales
2026-04-24  9:34   ` Andy Shevchenko

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=20260422231305.677778-1-rafasales@usp.br \
    --to=rafasales@usp.br \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    /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