[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160715105357.GD8809@localhost>
Date: Fri, 15 Jul 2016 12:53:57 +0200
From: Johan Hovold <johan@...nel.org>
To: Mathieu OTHACEHE <m.othacehe@...il.com>
Cc: johan@...nel.org, gregkh@...uxfoundation.org,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 05/36] usb: serial: ti_usb_3410_5052: Remove unused data
structures
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 <m.othacehe@...il.com>
> ---
> 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
Powered by blists - more mailing lists