Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1444181 > unrolled thread

Re: [PATCH 05/36] usb: serial: ti_usb_3410_5052: Remove unused data structures

Started byJohan Hovold <johan@kernel.org>
First post2016-07-15 13:00 +0200
Last post2016-07-15 13:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 05/36] usb: serial: ti_usb_3410_5052: Remove unused data  structures Johan Hovold <johan@kernel.org> - 2016-07-15 13:00 +0200

#1444181 — Re: [PATCH 05/36] usb: serial: ti_usb_3410_5052: Remove unused data structures

FromJohan Hovold <johan@kernel.org>
Date2016-07-15 13:00 +0200
SubjectRe: [PATCH 05/36] usb: serial: ti_usb_3410_5052: Remove unused data structures
Message-ID<rV90B-5RX-9@gated-at.bofh.it>
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@gmail.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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web