Hi Andy, On 29.07.22 18:13, Andy Shevchenko wrote: > On Fri, Jul 29, 2022 at 1:06 AM Jakob Hauser <jahau@xxxxxxxxxxxxxx> wrote: > > .. > > Just a couple of remarks. > >> Indeed, to my own surprise I found a solution with the 2D array: >> >> static const char * const yas5xx_product_name[] = { >> "YAS530 MS-3E", >> "YAS532 MS-3R", >> "YAS533 MS-3F", >> }; >> >> static const char * const yas5xx_version_name[][2] = { > > yas5xx_version_names (note S at the end) As I understand you, it's to be applied on "yas5xx_version_names" only. In the chip_info table, it would then look like: .product_name = yas5xx_product_name[yas530], .version_name = yas5xx_version_names[yas530], ^ S > >> [yas530] = { "A", "B" }, >> [yas532] = { "AB", "AC" }, >> [yas533] = { "AB", "AC" }, >> }; >> >> ... >> >> struct yas5xx_chip_info { >> ... >> const char *product_name; >> const char * const *version_name; >> ... >> }; >> >> static const struct yas5xx_chip_info yas5xx_chip_info_tbl[] = { >> [yas530] = { >> ... >> .product_name = yas5xx_product_name[0], >> .version_name = yas5xx_version_name[0], > > Also 0 --> yas530 (use enum:ed indices) OK > >> }, >> }; >> > Kind regards, Jakob