* [brgl:gpio/for-next 8/12] drivers/gpio/gpio-imx-scu.c:106:32-33: WARNING: Use ARRAY_SIZE
@ 2022-09-04 22:37 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-09-04 22:37 UTC (permalink / raw)
To: Shenwei Wang; +Cc: kbuild-all, linux-gpio, Bartosz Golaszewski, Linus Walleij
tree: https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git gpio/for-next
head: 6ae8e1d0d5e5de922315830aea975c63e8c70b2f
commit: 0bd459ddf9e4f1af3ee3148eb319d1f8747f02ba [8/12] gpio: imx-scu: add imx-scu GPIO driver
config: openrisc-randconfig-c042-20220904 (https://download.01.org/0day-ci/archive/20220905/202209050648.jIBKO9lr-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 12.1.0
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
cocci warnings: (new ones prefixed by >>)
>> drivers/gpio/gpio-imx-scu.c:106:32-33: WARNING: Use ARRAY_SIZE
vim +106 drivers/gpio/gpio-imx-scu.c
84
85 static int imx_scu_gpio_probe(struct platform_device *pdev)
86 {
87 struct device *dev = &pdev->dev;
88 struct scu_gpio_priv *priv;
89 struct gpio_chip *gc;
90 int ret;
91
92 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
93 if (!priv)
94 return -ENOMEM;
95
96 ret = imx_scu_get_handle(&priv->handle);
97 if (ret)
98 return ret;
99
100 priv->dev = dev;
101 mutex_init(&priv->lock);
102
103 gc = &priv->chip;
104 gc->base = -1;
105 gc->parent = dev;
> 106 gc->ngpio = sizeof(scu_rsrc_arr)/sizeof(unsigned int);
107 gc->label = dev_name(dev);
108 gc->get = imx_scu_gpio_get;
109 gc->set = imx_scu_gpio_set;
110 gc->get_direction = imx_scu_gpio_get_direction;
111
112 platform_set_drvdata(pdev, priv);
113
114 return devm_gpiochip_add_data(dev, gc, priv);
115 }
116
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-09-04 22:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-04 22:37 [brgl:gpio/for-next 8/12] drivers/gpio/gpio-imx-scu.c:106:32-33: WARNING: Use ARRAY_SIZE kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).