On Wed, Nov 27, 2024 at 10:02 PM David Lechner <dlechner@xxxxxxxxxxxx> wrote: > > Use two separate static const struct ad_sigma_delta_info instances > instead of making a copy for each driver instance. > > Typically in the IIO subsystem, we use multiple static const instances > of the same struct when there are different variants of the same family > of devices as opposed to making a copy for each driver instance and > modifying it. ... > Whether this patch is an improvement or not is debatable. It makes > things a bit more verbose, but to me it seems more consistent with > how such cases are handled in the IIO subsystem. So take this one or > leave it. Constifications are always an improvement. This makes the related pieces of data to be moved to rodata sections and hence have proper page flag settings at runtime avoiding any modifications of the data which might be used for ROP gadgets or something like that in some cases. -- With Best Regards, Andy Shevchenko