Hi, Thank you for the reviews! On 11/24/22 21:09, Andy Shevchenko wrote: > On Thu, Nov 24, 2022 at 10:00 PM Hans de Goede <hdegoede@xxxxxxxxxx> wrote: >> >> Make the GPIO to sensor mapping more generic and fold the >> INT3472_GPIO_TYPE_RESET and INT3472_GPIO_TYPE_POWERDOWN cases into >> a single generic case. >> >> This is a preparation patch for further GPIO mapping changes. > > ... > >> +static const char *int3472_dsm_type_to_func(u8 type) >> +{ >> + switch (type) { >> + case INT3472_GPIO_TYPE_RESET: >> + return "reset"; >> + case INT3472_GPIO_TYPE_POWERDOWN: >> + return "powerdown"; >> + case INT3472_GPIO_TYPE_CLK_ENABLE: >> + return "clken"; >> + case INT3472_GPIO_TYPE_PRIVACY_LED: >> + return "pled"; >> + case INT3472_GPIO_TYPE_POWER_ENABLE: >> + return "power-enable"; > > default: > return "unknown"; > > ? > >> + } >> + >> + return "unknown"; >> +} > In the passed some compiler versions complained about the non-void function not ending with a return statement. I guess I can give your variant a try (I agree it is more readable) and of we get compiler warnings we can switch back. I'll fix this up in the next version or when merging this, depending on further feedback on the series. Regards, Hans