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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> ---
>  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
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux