Re: [PATCH] iio: chemical: bme680: remove unused BME680_NUM_CHANNELS macro

David Lechner
2026-04-07T14:28:57Z

On 4/7/26 4:03 AM, Nikhil Gautam wrote:
> The BME680_NUM_CHANNELS macro is not used anywhere in the driver.
> Remove it to avoid keeping dead code and to improve readability.
>
> No functional change intended.
>
> Signed-off-by: Nikhil Gautam <nikhilgtr@gmail.com>
> ---
> drivers/iio/chemical/bme680.h | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/iio/chemical/bme680.h b/drivers/iio/chemical/bme680.h
> index 7d86ed8b02e6..e10d3aaaca23 100644
> --- a/drivers/iio/chemical/bme680.h
> +++ b/drivers/iio/chemical/bme680.h
> @@ -68,7 +68,6 @@
> /* Datasheet Section 1.1, Table 1 */
> #define BME680_STARTUP_TIME_US 2000
>
> -#define BME680_NUM_CHANNELS 4
> #define BME680_NUM_BULK_READ_REGS 15
>
> /* Calibration Parameters */

It looks like it was intended to be used in drivers/iio/chemical/bme680_core.c:

struct bme680_data {
struct regmap *regmap;
struct bme680_calib bme680;
struct mutex lock; /* Protect multiple serial R/W ops to device. */
u8 oversampling_temp;
u8 oversampling_press;
u8 oversampling_humid;
u8 preheat_curr_mA;
u16 heater_dur;
u16 heater_temp;

struct {
s32 chan[4];
aligned_s64 ts;
} scan;