Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1444181
| From | Johan Hovold <johan@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 05/36] usb: serial: ti_usb_3410_5052: Remove unused data structures |
| Date | 2016-07-15 13:00 +0200 |
| Message-ID | <rV90B-5RX-9@gated-at.bofh.it> (permalink) |
| References | <rxUDo-21y-3@gated-at.bofh.it> <rxUN5-2vc-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
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
csiph-web