From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753940AbbJPMju (ORCPT ); Fri, 16 Oct 2015 08:39:50 -0400 Received: from mail-lb0-f172.google.com ([209.85.217.172]:36820 "EHLO mail-lb0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751510AbbJPMjs (ORCPT ); Fri, 16 Oct 2015 08:39:48 -0400 Date: Fri, 16 Oct 2015 14:39:48 +0200 From: Johan Hovold To: Konstantin Shkolnyy Cc: Sergei Shtylyov , johan@kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] USB: serial: cp210x: Adding tx_empty() to avoid cp2108 failure Message-ID: <20151016123948.GB30216@localhost> References: <1444946828-18182-1-git-send-email-konstantin.shkolnyy@gmail.com> <5620DD5D.9080602@cogentembedded.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 16, 2015 at 07:35:02AM -0500, Konstantin Shkolnyy wrote: > Hello, > > On Fri, Oct 16, 2015 at 6:19 AM, Sergei Shtylyov > wrote: > [...] > >> > >> @@ -249,6 +251,16 @@ static struct usb_serial_driver * const > >> serial_drivers[] = { > >> #define CP210X_GET_CHARS 0x0E > >> #define CP210X_GET_PROPS 0x0F > >> #define CP210X_GET_COMM_STATUS 0x10 > >> +/* Data returned by CP210X_GET_COMM_STATUS -- h/w doc says it's 0x13 > >> bytes */ > >> +struct cp210x_comm_status { > >> + u32 errors; > >> + u32 hold_reasons; > >> + u32 amount_in_in_queue; > >> + u32 amount_in_out_queue; > >> + u8 eof_received; > >> + u8 wait_for_immediate; > >> + u8 reserved; > >> +}; > > > > > > Please don't declare structures amidst of the command #define's. > > > [...] > > I agree with all suggestions except this one. I find it very > convenient, when reading code, to have the command code and its data > declared in the same place. No, I agree with Sergei on this. Please place the struct after the request defines (just like the various request values after are defined after the request list). I'll try to provide some more feedback on your patches shortly. Sorry for the delay. Johan