On Sun, Jun 7, 2020 at 6:57 PM Jonathan Cameron <jic23@xxxxxxxxxx> wrote: ... > + /* Ensure timestamp is naturally aligned */ > + struct { > + u8 chan; > + s64 ts __aligned(8); > + } scan; > }; ... > - err = regmap_read(hw->regmap, ST_UVIS25_REG_OUT_ADDR, (int *)buffer); > + err = regmap_read(hw->regmap, ST_UVIS25_REG_OUT_ADDR, > + (unsigned int *)&hw->scan.chan); Despite knowing that this is okay, from a language perspective this casting is not good. Potential mine for all kinds of static analyzers. I think it should use a temporary unsigned int (or what regmap API wants) variable. -- With Best Regards, Andy Shevchenko