From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753132AbdK1XeJ (ORCPT ); Tue, 28 Nov 2017 18:34:09 -0500 Received: from mga05.intel.com ([192.55.52.43]:53599 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752086AbdK1XeH (ORCPT ); Tue, 28 Nov 2017 18:34:07 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,468,1505804400"; d="scan'208";a="8218058" Subject: Re: [PATCH 1/1] usb: gadget: u_serial: Use kfifo instead of homemade circular buffer To: Felipe Balbi , Greg Kroah-Hartman References: <1511844388-18037-1-git-send-email-baolu.lu@linux.intel.com> <87o9nmzv48.fsf@linux.intel.com> Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org From: Lu Baolu Message-ID: <5A1DF26E.6040306@linux.intel.com> Date: Wed, 29 Nov 2017 07:34:06 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <87o9nmzv48.fsf@linux.intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Felipe, On 11/28/2017 04:05 PM, Felipe Balbi wrote: > Hi, > > Lu Baolu writes: >> The kernel FIFO implementation, kfifo, provides interfaces to manipulate >> a first-in-first-out circular buffer. Use kfifo instead of the homemade >> one to make the code more concise and readable. >> >> Signed-off-by: Lu Baolu > Thanks :-) Can you give a little description of how you tested this? > I tested it on an Intel Skylake box. On the gadget side, I loaded a serial device (#modprobe g_serial). And then, connected it with a host. On the gadget side, I run below scripts: #!/bin/bash for j in `seq 1 200`; do for i in `seq 1 50000`; do echo $i.$j > /dev/ttyGS0 done done And, on the host side, #cat /dev/ttyACM0 Best regards, Lu Baolu