From: kernel test robot drivers/gpio/gpio-virtio.c:261:42-48: ERROR: application of sizeof to pointer sizeof when applied to a pointer typed expression gives the size of the pointer Generated by: scripts/coccinelle/misc/noderef.cocci CC: Viresh Kumar Reported-by: kernel test robot Signed-off-by: kernel test robot --- url: https://github.com/0day-ci/linux/commits/Viresh-Kumar/gpio-Add-virtio-gpio-driver/20210818-191612 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 614cb2751d3150850d459bee596c397f344a7936 :::::: branch date: 7 hours ago :::::: commit date: 7 hours ago gpio-virtio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpio/gpio-virtio.c +++ b/drivers/gpio/gpio-virtio.c @@ -258,7 +258,7 @@ static const char **virtio_gpio_get_name return NULL; } - names = devm_kcalloc(dev, config->ngpio, sizeof(names), GFP_KERNEL); + names = devm_kcalloc(dev, config->ngpio, sizeof(*names), GFP_KERNEL); if (!names) return NULL;