From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932716AbcGOKx4 (ORCPT ); Fri, 15 Jul 2016 06:53:56 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:36618 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932187AbcGOKxy (ORCPT ); Fri, 15 Jul 2016 06:53:54 -0400 Date: Fri, 15 Jul 2016 12:53:57 +0200 From: Johan Hovold To: Mathieu OTHACEHE Cc: johan@kernel.org, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 05/36] usb: serial: ti_usb_3410_5052: Remove unused data structures Message-ID: <20160715105357.GD8809@localhost> References: <1463042948-12205-1-git-send-email-m.othacehe@gmail.com> <1463042948-12205-6-git-send-email-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1463042948-12205-6-git-send-email-m.othacehe@gmail.com> 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 Thu, May 12, 2016 at 10:48:37AM +0200, Mathieu OTHACEHE wrote: > ti_read_data_request, ti_read_data_bytes and ti_interrupt are unused. > > Signed-off-by: Mathieu OTHACEHE > --- > drivers/usb/serial/ti_usb_3410_5052.c | 21 --------------------- > 1 file changed, 21 deletions(-) > > diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c > index 2fc3ea1..af4e145 100644 > --- a/drivers/usb/serial/ti_usb_3410_5052.c > +++ b/drivers/usb/serial/ti_usb_3410_5052.c > @@ -226,27 +226,6 @@ struct ti_write_data_bytes { > __u8 bData[0]; > } __packed; > > -struct ti_read_data_request { > - __u8 bAddrType; > - __u8 bDataType; > - __u8 bDataCounter; > - __be16 wBaseAddrHi; > - __be16 wBaseAddrLo; > -} __packed; > - > -struct ti_read_data_bytes { > - __u8 bCmdCode; > - __u8 bModuleId; > - __u8 bErrorCode; > - __u8 bData[0]; > -} __packed; > - > -/* Interrupt struct */ > -struct ti_interrupt { > - __u8 bICode; > - __u8 bIInfo; > -} __packed; I'm not sure this is a good idea as we lose protocol information this way. The ti_interrupt message is in fact used in the interrupt completion callback by accessing bICode through data[0] for example. Why not put the structs to use instead? Thanks, Johan