Skip to content

Commit 03c557b

Browse files
ct-ltkartben
authored andcommitted
drivers: gpio: pca-series: Cast pointer to void * in logging statements
This silences warnings created at runtime, as the %p format specifier expects a void pointer. Signed-off-by: Lars Thiemann <thiemann@cognid.de>
1 parent 13fe09c commit 03c557b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/gpio/gpio_pca_series.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ static inline int gpio_pca_series_reg_cache_read(const struct device *dev,
521521
#endif /* GPIO_NXP_PCA_SERIES_DEBUG */
522522

523523
src = ((uint8_t *)data->cache) + offset;
524-
LOG_DBG("cache read type %d len %d mem addr 0x%p", reg_type, size, src);
524+
LOG_DBG("cache read type %d len %d mem addr 0x%p", reg_type, size, (void *)src);
525525
memcpy(buf, src, size);
526526
return ret;
527527
}
@@ -560,7 +560,7 @@ static inline int gpio_pca_series_reg_cache_update(const struct device *dev,
560560
(buf ? "buffer" : "device"));
561561

562562
dst = ((uint8_t *)data->cache) + offset;
563-
LOG_DBG("cache write mem addr 0x%p len %d", dst, size);
563+
LOG_DBG("cache write mem addr 0x%p len %d", (void *)dst, size);
564564

565565
/** update cache from buf */
566566
memcpy(dst, buf, size);
@@ -587,7 +587,7 @@ static inline struct gpio_pca_series_reg_cache_mini *gpio_pca_series_reg_cache_m
587587
struct gpio_pca_series_data *data = dev->data;
588588
struct gpio_pca_series_reg_cache_mini *cache =
589589
(struct gpio_pca_series_reg_cache_mini *)(&data->cache);
590-
LOG_DBG("mini cache addr 0x%p", cache);
590+
LOG_DBG("mini cache addr 0x%p", (void *)cache);
591591
return cache;
592592
}
593593

@@ -725,10 +725,10 @@ void gpio_pca_series_debug_dump(const struct device *dev)
725725
LOG_WRN("**** debug dump ****");
726726
LOG_WRN("device: %s", dev->name);
727727
#ifdef CONFIG_GPIO_PCA_SERIES_CACHE_ALL
728-
LOG_WRN("cache base addr: 0x%p size: 0x%2.2x",
729-
data->cache, cfg->part_cfg->cache_size);
728+
LOG_WRN("cache base addr: 0x%p size: 0x%2.2x", (void *)data->cache,
729+
cfg->part_cfg->cache_size);
730730
#else
731-
LOG_WRN("cache base addr: 0x%p", data->cache);
731+
LOG_WRN("cache base addr: 0x%p", (void *)data->cache);
732732
#endif /* CONFIG_GPIO_PCA_SERIES_CACHE_ALL */
733733

734734
LOG_WRN("register profile:");

0 commit comments

Comments
 (0)