Re: [PATCH 3/4] iio: dac: rohm-bd79703: Avoid copying chip-data
From: Andy Shevchenko
Date: Thu Dec 03 2026 - 12:10:37 EST
On Wed, Dec 02, 2026 at 03:39:08PM +0200, Matti Vaittinen wrote:
>
> The bd79703 driver data has been divided into a static, chip specific
> data, and to an instance specific data, which can be modified at run-time.
>
> At the moment, only the instance-specific data is usable after probe,
> and only chip-type dependent constant 'num_vfs_chan', is copied to
> instance-specific struct.
>
> Upcoming support for bd7971x family of chips will introduce a need to
> use a few more chip-specific static values at runtime. Copying them to
> dynamic private data struct would get wasteful.
>
> Save some bytes and minimize data copying by storing a pointer to the
> constant, chip-type specific data, instead of copying all the values into
> the instance specific data.
Despite our discussion about SI unit suffices, this looks good.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
--
With Best Regards,
Andy Shevchenko