Re: [PATCH v1 1/1] regmap-irq: Consistently use memset32() in regmap_irq_thread()

From: Andy Shevchenko
Date: Wed Sep 25 2024 - 05:02:41 EST


On Wed, Sep 25, 2024 at 11:55:51AM +0300, Matti Vaittinen wrote:
> On 9/25/24 11:27, Andy Shevchenko wrote:

...

> > memset32(data->status_buf, GENMASK(31, 0), chip->num_regs);

> > - memset(data->status_buf, 0, size);
> > + memset32(data->status_buf, 0, chip->num_regs);

> Can we guarantee the sizeof(unsigned int) == sizeof(uint32_t) on all
> supported architectures? (The status_buf is unsigned int, right?). If yes,
> then this looks nice to me.

Yes as long as we (Linux kernel) support only 32-bit and higher architectures.

--
With Best Regards,
Andy Shevchenko