From: Jonathan Cameron <jic23@kernel.org>
To: Giorgi Tchankvetadze <giorgitchankvetadze1997@gmail.com>
Cc: antoniu.miclaus@analog.com, lars@metafoo.de,
Michael.Hennerich@analog.com, dlechner@baylibre.com,
nuno.sa@analog.com, andy@kernel.org, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: chemical: scd30: make command lookup table const
Date: Mon, 11 May 2026 12:28:57 +0100 [thread overview]
Message-ID: <20260511122857.72300647@jic23-huawei> (raw)
In-Reply-To: <20260508133915.22042-3-giorgitchankvetadze1997@gmail.com>
On Fri, 8 May 2026 17:39:17 +0400
Giorgi Tchankvetadze <giorgitchankvetadze1997@gmail.com> wrote:
> scd30_i2c_cmd_lookup_tbl contains fixed opcodes and is
> only read by scd30_i2c_command(). Make it const to document that it's immutable
> and allow it to be placed in read-only memory.
>
> Signed-off-by: Giorgi Tchankvetadze <giorgitchankvetadze1997@gmail.com>
Applied to the testing branch of iio.git. Thanks,
Jonathan
> ---
> drivers/iio/chemical/scd30_i2c.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/chemical/scd30_i2c.c b/drivers/iio/chemical/scd30_i2c.c
> index 436df9c61a71..bf465cc71be7 100644
> --- a/drivers/iio/chemical/scd30_i2c.c
> +++ b/drivers/iio/chemical/scd30_i2c.c
> @@ -20,7 +20,7 @@
> #define SCD30_I2C_MAX_BUF_SIZE 18
> #define SCD30_I2C_CRC8_POLYNOMIAL 0x31
>
> -static u16 scd30_i2c_cmd_lookup_tbl[] = {
> +static const u16 scd30_i2c_cmd_lookup_tbl[] = {
> [CMD_START_MEAS] = 0x0010,
> [CMD_STOP_MEAS] = 0x0104,
> [CMD_MEAS_INTERVAL] = 0x4600,
prev parent reply other threads:[~2026-05-11 11:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-08 13:39 [PATCH] iio: chemical: scd30: make command lookup table const Giorgi Tchankvetadze
2026-05-08 15:07 ` Maxwell Doose
2026-05-09 11:16 ` [PATCH 3/3] " Stepan Ionichev
2026-05-10 0:31 ` Stepan Ionichev
2026-05-10 0:42 ` Stepan Ionichev
2026-05-10 1:05 ` Stepan Ionichev
2026-05-10 8:04 ` Maxwell Doose
2026-05-10 9:08 ` Andy Shevchenko
2026-05-10 7:52 ` Maxwell Doose
2026-05-10 7:21 ` Andy Shevchenko
2026-05-11 11:28 ` Jonathan Cameron [this message]
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=20260511122857.72300647@jic23-huawei \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=antoniu.miclaus@analog.com \
--cc=dlechner@baylibre.com \
--cc=giorgitchankvetadze1997@gmail.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@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