[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 3 Mar 2016 08:57:15 +0000
From: Felipe Ferreri Tonello <eu@...ipetonello.com>
To: Clemens Ladisch <clemens@...isch.de>, linux-usb@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, Felipe Balbi <balbi@...nel.org>,
Michal Nazarewicz <mina86@...a86.com>
Subject: Re: [PATCH 1/5] usb: gadget: f_midi: refactor state machine
Hi Clemens,
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. The result is a much cleaner MIDI parser
that is easy to maintain and read.
I recommend you to apply the patch yourself (it's on top of Balbi's next
branch) because the patch can be confusing to understand the end result.
>
>> and as a result fixed a bug when packaging a USB-MIDI packet right after
>> a non-conformant MIDI byte stream.
>
> I have been unable to determine where exactly the new code behaves
> differently. Can you show an example?
Sorry, I forgot to remove this comment since your last revision. There
is no bug I could reproduce with the previous parser.
--
Felipe
Download attachment "0x92698E6A.asc" of type "application/pgp-keys" (7196 bytes)
Powered by blists - more mailing lists