Browse Source

gpio: pca_series: fix shift overflow and use 3ULL instead of 0b11

Replaces binary literal with 3ULL to avoid shift overflow and align
with Zephyr coding style.

Fixes: #81963
Fixes: CID 434591

Signed-off-by: sudarsan N <sudarsansamy2002@gmail.com>
pull/82801/merge
sudarsan N 2 weeks ago committed by Dan Kalowsky
parent
commit
c9be1972b2
  1. 2
      drivers/gpio/gpio_pca_series.c

2
drivers/gpio/gpio_pca_series.c

@ -1359,7 +1359,7 @@ static int gpio_pca_series_pin_interrupt_configure_extended( @@ -1359,7 +1359,7 @@ static int gpio_pca_series_pin_interrupt_configure_extended(
uint32_t int_mask, input_latch;
int ret = 0;
uint32_t edge_cfg_shift = pin << 1U;
uint64_t edge_cfg_mask = 0b11 << edge_cfg_shift;
uint64_t edge_cfg_mask = 3ULL << edge_cfg_shift;
if (cfg->gpio_int.port == NULL) {
return -ENOTSUP;

Loading…
Cancel
Save