Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759972AbcCDSnr (ORCPT ); Fri, 4 Mar 2016 13:43:47 -0500 Received: from dehamd003.servertools24.de ([31.47.254.18]:39740 "EHLO dehamd003.servertools24.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758357AbcCDSnq (ORCPT ); Fri, 4 Mar 2016 13:43:46 -0500 Subject: Re: [PATCH 1/5] usb: gadget: f_midi: refactor state machine To: Felipe Ferreri Tonello , linux-usb@vger.kernel.org References: <1456947640-20673-1-git-send-email-eu@felipetonello.com> <1456947640-20673-2-git-send-email-eu@felipetonello.com> <56D7567A.40402@ladisch.de> <56D7FC6B.7040709@felipetonello.com> <56D82237.2080705@ladisch.de> <56D866A1.5060303@felipetonello.com> <56D9424C.201@ladisch.de> <25A6D99D-E187-40AB-AB2B-0FE2CDFF922B@felipetonello.com> Cc: linux-kernel@vger.kernel.org, Felipe Balbi , Michal Nazarewicz From: Clemens Ladisch Message-ID: <56D9D74E.5050004@ladisch.de> Date: Fri, 4 Mar 2016 19:43:26 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <25A6D99D-E187-40AB-AB2B-0FE2CDFF922B@felipetonello.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-PPP-Message-ID: <20160304184341.789178.72524@dehamd003.servertools24.de> X-PPP-Vhost: ladisch.de Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 732 Lines: 20 Felipe Ferreri Tonello wrote: > On March 4, 2016 8:07:40 AM GMT+00:00, Clemens Ladisch wrote: >> Felipe Ferreri Tonello wrote: >>> On 03/03/16 11:38, Clemens Ladisch wrote: >>>> But in what way was the old state machine not "proper"? >>> >>> Because it didn't reflect all the correct and possible MIDI states >> >> The whole point of the one-byte real-time messages is that they do not >> affect the parsing of the surrounding MIDI stream. So not making them >> part of the state machine is the proper way of handling them. (Also >> see the flowchart in appendix A of the spec.) > > I really don't get your point. So why do we have a state machine at all? To parse all the other messages. Regards, Clemens