Wolfgang Grandegger wrote: > Oliver Hartkopp wrote: >> Marc Kleine-Budde wrote:
>>> okay, then the at91_can does it alright :) \o/ >> Congrats :-) >> >> Indeed your >> >> cf->can_dlc = min_t(__u8, (reg_msr >> 16) & 0xf, 8); >> >> looks nice. > > min() is fine if the type does already match. > >> Wolfgang, should i update the drivers in the SVN and send a patch to netdev? > > Yes, of course. Hi all, i updated the SVN and introduced a new GET_CAN_DLC() macro, that casts the data length code information to __u8 and ensures the dlc not to be > 8 . Especially the SJA1000 driver was happy to get this clean-up :-) See at: http://svn.berlios.de/wsvn/socketcan/?op=comp&compare[]=...@1092&compare[]=...@1093 I compile checked all drivers but mscan and at91_can which is not possible on x86. Please check the changes. If it's ok, i'll send a patch to netdev when the current merge window is nearly closed. > Please also check for useless "dlc > 8" checks in the > start_xmit function. I thought about that and i'm not really sure about it: What if anyone uses PF_PACKET with CAN netdevices, which is a possible use-case? Regards, Oliver _______________________________________________ Socketcan-core mailing list [email protected] https://lists.berlios.de/mailman/listinfo/socketcan-core
