all: Add 'U' suffix when using unsigned variables

Add a 'U' suffix to values when computing and comparing against
unsigned variables.

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
This commit is contained in:
Patrik Flykt 2019-03-26 19:57:45 -06:00 committed by Kumar Gala
commit 24d71431e9
559 changed files with 2331 additions and 2328 deletions

View file

@ -83,10 +83,10 @@ int bmg160_slope_config(struct device *dev, enum sensor_attribute attr,
any_th_dps = sensor_rad_to_degrees(val);
range_dps = BMG160_SCALE_TO_RANGE(bmg160->scale);
any_th_reg_val = any_th_dps * 2000 / range_dps;
any_th_reg_val = any_th_dps * 2000U / range_dps;
/* the maximum slope depends on selected range */
if (any_th_dps > range_dps / 16) {
if (any_th_dps > range_dps / 16U) {
return -ENOTSUP;
}