Felipe Ferreri Tonello wrote: > On 02/03/16 21:09, Clemens Ladisch wrote: >> Felipe F. Tonello wrote: >>> This refactor results in a cleaner state machine code >> >> It increases the number of states, and now juggles two state variables. >> I cannot agree to it being cleaner. > > Yes, it increases the number of states. That was done in order to > actually implement a proper finite state machine with one state at a > time and a transition state.
I know, "clean" is subjective. But in what way was the old state machine not "proper"? And how is handling two states (port->state and next_state) cleaner? As far as I can tell, the requirement for a separate variable comes not from any inherent complexity of the state machine itself, but only because the transmit_packet function was inlined. Regards, Clemens -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html