On Mon, Aug 8, 2022 at 1:07 AM Jakob Hauser <jahau@xxxxxxxxxxxxxx> wrote: > > This commit introduces the "chip_info" structure approach for better variant > handling. Read "Submitting Patches" in the chapter which mentions "This patch" pattern and fix the above accordingly. > The variant to be used is now chosen by the Device Tree (enum "chip_ids"), > not by the chip ID in the register. However, there is a check to make sure > they match (using integer "id_check"). ... > +enum chip_ids { > + yas530, > + yas532, > + yas533, > +}; So, it's an error from Clang... Workaround can be simply to use set of #define:s instead. ... > + if (id_check != yas5xx->chip_info->devid) { > + switch (yas5xx->chip_info->devid) { You can make these kind of lines shorter by introducing a temporary variable: struct ... *ci = yaas5xx->chip_info; -- With Best Regards, Andy Shevchenko