iio: chemical: bme680: remove unused BME680_NUM_CHANNELS macro
PATCH 1/1 iio: chemical: bme680: remove unused BME680_NUM_CHANNELS macro
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.
--- drivers/iio/chemical/bme680.h | 1 - 1 file changed, 1 deletion(-)
drivers/iio/chemical/bme680.h +0 -1
@@ -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 */
Signature · 1 line
2.43.0
David Lechner
reviewerQuoted 15 lines · Nikhil Gautam
The
BME680_NUM_CHANNELSmacro 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 <[email protected]>--- drivers/iio/chemical/bme680.h | 1 - 1 file changed, 1 deletion(-)drivers/iio/chemical/bme680.h +0
-0
drivers/iio/chemical/bme680.h line 73
Quoted 7 lines
drivers/iio/chemical/bme680.h +0
-1@@ -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;Jonathan Cameron
maintainerQuoted 19 lines · On Tue, 7 Apr 2026 09:28:54 -0500 David Lechner <[email protected]> wrote:
Quoted 18 lines · Nikhil Gautam
The
BME680_NUM_CHANNELSmacro 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 <[email protected]>--- drivers/iio/chemical/bme680.h | 1 - 1 file changed, 1 deletion(-)drivers/iio/chemical/bme680.h +0
-0@@ -68,7 +68,6 @@/* Datasheet Section 1.1, Table 1 */ #define BME680_STARTUP_TIME_US 2000
Quoted 6 lines
drivers/iio/chemical/bme680.h line 73
Quoted 4 lines
drivers/iio/chemical/bme680.h +0
-1-#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:
Agreed. I think probably better to use it than remove it?
Quoted 17 lines
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;