>> + return sprintf(buf, "%s\n", >> + (unsigned)ctrl->state < ARRAY_SIZE(state_name) ? >> + state_name[ctrl->state] : "???"); > > I'd use an if here instead of the ? : and print unknown instead of the ??? I can change that...