Re: [PATCH v5 8/8] can-dev: add len8_dlc support for various CAN USB adapters

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

 



On 10.11.20 08:46, Marc Kleine-Budde wrote:
On 11/10/20 7:55 AM, Oliver Hartkopp wrote:

I would suggest something like

u8 can_get_cc_len(const u32 ctrlmode, struct can_frame *cf, u8 dlc)

that still returns the 'len' element, so that we can replace
can_cc_dlc2len() with can_get_cc_len() for CAN drivers that add support
for len8_dlc.

The regex to replace can_cc_dlc2len() with can_get_cc_len() might be simpler,
but passing the cf by reference _and_ assigning the return value to a member of
cf looks strange.

This might be a "make the patch looking good" thing too :-D

The code is now implemented even simpler and easy to follow when we migrate the other CAN drivers too.

But take a look on yourself. v6 is sent out.

Thanks,
Oliver



[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