Re: [PATCH v2] can: usb: IXXAT USB-to-CAN adapters drivers

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

 



Hello Wolfgang,

On Wed, 27 Jun 2018, Wolfgang Grandegger wrote:

> ... but there is still duplicated code. The following functions in
> ixxat_usb_cl1.c and ixxat_usb_cl2.c are identical:
> 
>   ixxat_usb_handle_status()
>   ixxat_usb_handle_error()
> 
> And almost identical are:
> 
>   ixxat_usb_handle_canmsg()
>   ixxat_usb_decode_buf()
>   ixxat_usb_encode_msg()
> 
> Could you move the netif and skb handling to the main part, at least...
> Looking at:
> 
>   $ meld ixxat_usb_cl1.c ixxat_usb_cl2.c
> 
> I really wonder if you are not just done with a few
> 
>  if (priv->adapter == XYZ)
> 
> Wolfgang.
> 

CL1 and CL2 have different can message formats.
This is why the message handling was implemented in the adapters.

I moved the can message handling functions to the main part now.
The adapter type is now checked to select the proper message format.
(See the following patch.)


Kind regards,
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-can" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux