Re: [PATCH 23/23] staging: ks7010: replace cast type in assignment in hostif_sme_set_pmksa

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

 



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
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux