On 12/13/23 16:24, Andy Shevchenko wrote: > On Tue, Dec 12, 2023 at 12:44:36PM +0200, Dumitru Ceclan wrote: > ... > >> + if (chan->type == IIO_TEMP) { >> + temp = ((u32)AD7173_VOLTAGE_INT_REF_uV) * MILLI; > > Hmm... Is the casting mandatory here? > Yep, not really needed as MILLI is already declared as unsigned and it will promote the _INT_REF as well. On signed32 it would have overflowed. Are there any cases where this would not be alright?