On Mon, Nov 16, 2020 at 8:07 PM Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote: > On Mon, Nov 16, 2020 at 7:53 PM Fabio Estevam <festevam@xxxxxxxxx> wrote: > Another (and I think better variant) is to switch .data to be a > pointer to the corresponding struct, then you may drop enum and hwtype > completely. In this case you also don't need explicit ugly casting for .data. -- With Best Regards, Andy Shevchenko