From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753728AbbLFQgU (ORCPT ); Sun, 6 Dec 2015 11:36:20 -0500 Received: from mail-lb0-f182.google.com ([209.85.217.182]:35183 "EHLO mail-lb0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753182AbbLFQgT (ORCPT ); Sun, 6 Dec 2015 11:36:19 -0500 Date: Sun, 6 Dec 2015 17:36:50 +0100 From: Johan Hovold To: Konstantin Shkolnyy Cc: johan@kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] USB: serial: cp210x: Cleaned up USB access functions. Message-ID: <20151206163650.GA32099@localhost> References: <1448923838-20633-1-git-send-email-konstantin.shkolnyy@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1448923838-20633-1-git-send-email-konstantin.shkolnyy@gmail.com> 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 Mon, Nov 30, 2015 at 04:50:38PM -0600, Konstantin Shkolnyy wrote: > cp210x_get_config and cp210x_set_config were hard to use. They required > the buffer as an array of 32-bit values even for smaller values, and did > endian conversions on per-32-bit value basis, which is wrong for some > cp210x data structures (although not for any that were actually used.) > This change introduces separate register accessor functions for single > 8, 16 and 32-bit values, with endian conversion, as well as "block" > access functions without conversion. > > Signed-off-by: Konstantin Shkolnyy > --- > drivers/usb/serial/cp210x.c | 314 ++++++++++++++++++++++++++------------------ > 1 file changed, 186 insertions(+), 128 deletions(-) There's a bit too much going on here at once. Please split this into multiple patches to facilitate review (e.g. separate get and set, and possibly also the three widths). Thanks, Johan