From: Jonathan Cameron <jic23@kernel.org>
To: Vasileios Amoiridis <vassilisamir@gmail.com>
Cc: lars@metafoo.de, himanshujha199640@gmail.com,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] chemical: bme680: Convert to static the const lookup table
Date: Sat, 27 Jul 2024 16:08:44 +0100 [thread overview]
Message-ID: <20240727160844.28875c92@jic23-huawei> (raw)
In-Reply-To: <20240725231818.615530-1-vassilisamir@gmail.com>
On Fri, 26 Jul 2024 01:18:18 +0200
Vasileios Amoiridis <vassilisamir@gmail.com> wrote:
> By converting it to static, we ensure that this will be placed by the
> compiler in the read-only area.
>
> Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com>
Applied.
> ---
> drivers/iio/chemical/bme680_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/chemical/bme680_core.c b/drivers/iio/chemical/bme680_core.c
> index 74ac887d8d8e..5d2e750ca2b9 100644
> --- a/drivers/iio/chemical/bme680_core.c
> +++ b/drivers/iio/chemical/bme680_core.c
> @@ -438,7 +438,7 @@ static u32 bme680_compensate_gas(struct bme680_data *data, u16 gas_res_adc,
> u32 calc_gas_res;
>
> /* Look up table for the possible gas range values */
> - const u32 lookupTable[16] = {2147483647u, 2147483647u,
> + static const u32 lookupTable[16] = {2147483647u, 2147483647u,
> 2147483647u, 2147483647u, 2147483647u,
> 2126008810u, 2147483647u, 2130303777u,
> 2147483647u, 2147483647u, 2143188679u,
prev parent reply other threads:[~2024-07-27 15:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-25 23:18 [PATCH] chemical: bme680: Convert to static the const lookup table Vasileios Amoiridis
2024-07-27 15:08 ` 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=20240727160844.28875c92@jic23-huawei \
--to=jic23@kernel.org \
--cc=himanshujha199640@gmail.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vassilisamir@gmail.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