mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stepan Ionichev <sozdayvek@gmail.com>
To: m32285159@gmail.com
Cc: jic23@kernel.org, tomasz.duszynski@octakon.com,
	dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Stepan Ionichev <sozdayvek@gmail.com>
Subject: Re: [PATCH v2] iio: chemical: scd30: Replace manual locking with RAII locking
Date: Wed, 20 May 2026 17:19:39 +0500	[thread overview]
Message-ID: <20260520121939.15266-1-sozdayvek@gmail.com> (raw)
In-Reply-To: <20260519131944.25174-1-m32285159@gmail.com>

The "_locked" suffix in scd30_trigger_handler_helper_locked() reads as
"caller holds the lock" by the usual kernel convention, but the helper
takes state->lock itself via guard(mutex). Dropping the suffix (or
renaming to e.g. scd30_read_meas_data()) would match the actual
ownership.

Also, the int arr_size argument is forwarded straight to memcpy()
so it is really a byte count, not an array length -- size_t bytes
would describe it more accurately and avoid a future caller passing
ARRAY_SIZE().

Stepan

  parent reply	other threads:[~2026-05-20 12:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-19 13:19 Maxwell Doose
2026-05-19 13:41 ` Joshua Crofts
2026-05-19 21:51   ` Maxwell Doose
2026-05-20 12:19 ` Stepan Ionichev [this message]
2026-05-20 12:28 ` Jonathan Cameron
2026-05-20 16:52   ` Maxwell Doose
2026-06-01 18:50 ` 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=20260520121939.15266-1-sozdayvek@gmail.com \
    --to=sozdayvek@gmail.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m32285159@gmail.com \
    --cc=nuno.sa@analog.com \
    --cc=tomasz.duszynski@octakon.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

all inboxes | Powered by JetHome®