linux-4.4-rc8/drivers/hwmon/lm93.c:398: possible int/long mixup ?

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

 



Hello there,

[linux-4.4-rc8/drivers/hwmon/lm93.c:398]: (style) int result is assigned to long variable. If the variable is long to avoid loss of information, then you have loss of information.

Source code is

    const long uv_vid = vid * 1000;

Suggest new code

    const long uv_vid = vid * 1000L;

to make sure that integer overflow will not occur.

Regards

David Binderman

 		 	   		  
_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors




[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux