Hello Mika Westerberg,

The patch 473ed7be0da0: "gpio / ACPI: Add support for ACPI GPIO
operation regions" from Mar 14, 2014, leads to the following static
checker warning:

        drivers/gpio/gpiolib-acpi.c:454 acpi_gpio_adr_space_handler()
        warn: should 'gpiod_get_raw_value(desc) << i' be a 64 bit type?

drivers/gpio/gpiolib-acpi.c
   451                  if (function == ACPI_WRITE)
   452                          gpiod_set_raw_value(desc, !!((1 << i) & 
*value));
   453                  else
   454                          *value |= gpiod_get_raw_value(desc) << i;
   455          }

"value" is u64 pointer but gpiod_get_raw_value() is an int so this could
lead to wrapping bugs.

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to