]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
chemical: bme680: Convert to static the const lookup table
authorVasileios Amoiridis <vassilisamir@gmail.com>
Thu, 25 Jul 2024 23:18:18 +0000 (01:18 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 3 Aug 2024 09:13:44 +0000 (10:13 +0100)
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>
Link: https://patch.msgid.link/20240725231818.615530-1-vassilisamir@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/chemical/bme680_core.c

index 74ac887d8d8e46df105cdfb7573b8aba5c8184a7..5d2e750ca2b9c739d760e25688933ecf54a98ded 100644 (file)
@@ -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,