Hi all, Today's linux-next merge of the hwmon-staging tree got a conflict in: drivers/hwmon/sht4x.c between commit: 61406e9cac695 ("hwmon: (sht4x) Fix jiffies wraparound in heater-ready check") from the hwmon-fixes tree and commit: 3a4bf85531c55 ("hwmon: (sht4x) Add support for Sensirion STS4x temperature sensors") from the hwmon-staging tree. I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts. diff --cc drivers/hwmon/sht4x.c index da2b6130fca7e,fd1f950448f06..0000000000000 --- a/drivers/hwmon/sht4x.c +++ b/drivers/hwmon/sht4x.c @@@ -67,7 -74,8 +74,8 @@@ enum sht4x_chips */ struct sht4x_data { struct i2c_client *client; + enum sht4x_chips chip_id; - unsigned long heating_complete; /* in jiffies */ + u64 heating_complete; /* in jiffies */ bool data_pending; u32 heater_power; /* in milli-watts */ u32 heater_time; /* in milli-seconds */ @@@ -92,14 -100,18 +100,19 @@@ static int sht4x_read_values(struct sht u8 crc; u8 cmd[SHT4X_CMD_LEN] = {SHT4X_CMD_MEASURE_HPM}; u8 raw_data[SHT4X_RESPONSE_LENGTH]; + size_t response_length = data->chip_id == sts4x ? + STS4X_RESPONSE_LENGTH : SHT4X_RESPONSE_LENGTH; - unsigned long curr_jiffies; + u64 curr_jiffies; - curr_jiffies = get_jiffies_64(); - if (time_before64(curr_jiffies, data->heating_complete)) - msleep(jiffies_to_msecs(data->heating_complete - curr_jiffies)); + if (data->chip_id != sts4x) { - curr_jiffies = jiffies; - if (time_before(curr_jiffies, data->heating_complete)) ++ curr_jiffies = get_jiffies_64(); ++ if (time_before64(curr_jiffies, data->heating_complete)) { + msleep(jiffies_to_msecs(data->heating_complete - curr_jiffies)); ++ } + } if (data->data_pending && - time_before(jiffies, data->heating_complete + data->update_interval)) { + time_before64(get_jiffies_64(), data->heating_complete + data->update_interval)) { data->data_pending = false; } else { next_update = data->last_updated + @@@ -406,11 -428,15 +429,15 @@@ static int sht4x_probe(struct i2c_clien if (!data) return -ENOMEM; + data->chip_id = (uintptr_t)i2c_get_match_data(client); data->update_interval = SHT4X_MIN_POLL_INTERVAL; data->client = client; - data->heater_power = 200; - data->heater_time = 1000; - data->heating_complete = jiffies; + data->heating_complete = get_jiffies_64(); + if (data->chip_id != sts4x) { + data->heater_power = 200; + data->heater_time = 1000; + groups = sht4x_groups; + } crc8_populate_msb(sht4x_crc8_table, SHT4X_CRC8_POLYNOMIAL);