On Sun, 5 Jul 2020 15:05:49 +0300 Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote: > 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. > Good point. Dropped for now. Will revisit. Thanks, Jonathan