cpu_to_le16() already has a cast to u16 built in, so the cast is never
required.

Generally, the reason that you would cast something to a type smaller
than int is when you want to truncate away the high bits.  But if you're
dealing with sizes and you truncate away bits, that's pretty dangerous.
Really the casts are just for playing pretend, but it looks like we're
doing something a bit scary with knives.

regards,
dan carpenter

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to