From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752544AbbKKVJA (ORCPT ); Wed, 11 Nov 2015 16:09:00 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:56242 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752046AbbKKVI6 (ORCPT ); Wed, 11 Nov 2015 16:08:58 -0500 Date: Wed, 11 Nov 2015 13:08:57 -0800 From: Greg Kroah-Hartman To: Andy Shevchenko Cc: Dave Penkler , peter.chen@freescale.com, teuniz@gmail.com, USB , "linux-kernel@vger.kernel.org" , dpenkler@gmail.org Subject: Re: [PATCH v3 1/5] Implement an ioctl to support the USMTMC-USB488 READ_STATUS_BYTE operation. Message-ID: <20151111210857.GA22920@kroah.com> References: <20151111110827.GA1785@slacky> <20151111111609.GA1875@slacky> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 11, 2015 at 09:03:14PM +0200, Andy Shevchenko wrote: > On Wed, Nov 11, 2015 at 1:16 PM, Dave Penkler wrote: > > Background: > > When performing a read on an instrument that is executing a function > > that runs longer than the USB timeout the instrument may hang and require > > a device reset to recover. The READ_STATUS_BYTE operation always returns > > even when the instrument is busy permitting to poll for the appropriate > > condition. This capability is refered to in instrument application notes > > on synchronizing acquisitions for other platforms. > > > > Won't comment precisely by line, but common nitpicks about style: > - added empty lines where no need > - redundant parens > - pieces of code takes whole line when they are quite fit tail of previous one. > > And why malloc for 8 bytes? That's a requirement of the USB stack, any data you send on it has to be malloced.