* [microchip-ung-linux-upstream:v5.10-webstax 65/88] drivers/uio/uio_sparx5_irqmux.c:247:3: warning: 'strncpy' specified bound 16 equals destination size
@ 2020-12-14 13:27 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-12-14 13:27 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3308 bytes --]
tree: https://github.com/microchip-ung/linux-upstream.git v5.10-webstax
head: 0c603c93d534e71ceee9485bfe1b0b75561efb0e
commit: b3739b5edd2763486c9791e8f25ba40b1f8b3423 [65/88] uio: vcoreiii: Add MSCC vcoreiii UIO drivers
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/microchip-ung/linux-upstream/commit/b3739b5edd2763486c9791e8f25ba40b1f8b3423
git remote add microchip-ung-linux-upstream https://github.com/microchip-ung/linux-upstream.git
git fetch --no-tags microchip-ung-linux-upstream v5.10-webstax
git checkout b3739b5edd2763486c9791e8f25ba40b1f8b3423
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In function 'uio_sparx5_irqmux_request_irqs',
inlined from 'uio_sparx5_irqmux_probe' at drivers/uio/uio_sparx5_irqmux.c:293:8:
>> drivers/uio/uio_sparx5_irqmux.c:247:3: warning: 'strncpy' specified bound 16 equals destination size [-Wstringop-truncation]
247 | strncpy(priv->sirq[num].name, r->name, MAXNAMELEN);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/strncpy +247 drivers/uio/uio_sparx5_irqmux.c
223
224 static int uio_sparx5_irqmux_request_irqs(struct irqmux_platdata *priv)
225 {
226 struct platform_device *pdev = priv->pdev;
227 struct device *dev = &pdev->dev;
228 int irq, num, max;
229
230 priv->n_sirq = platform_irq_count(pdev);
231 priv->sirq = devm_kzalloc(dev,
232 sizeof(struct slave_irq_data)*priv->n_sirq,
233 GFP_KERNEL);
234 if (!priv->sirq)
235 return -ENOMEM;
236
237 for (num = 0, max = priv->n_sirq; num < max; num++) {
238 struct resource *r;
239
240 r = platform_get_resource(pdev, IORESOURCE_IRQ, num);
241 if (!r)
242 return -ENXIO;
243 irq = platform_get_irq(pdev, num);
244 priv->sirq[num].index = num;
245 priv->sirq[num].irq = irq;
246 priv->sirq[num].priv = priv;
> 247 strncpy(priv->sirq[num].name, r->name, MAXNAMELEN);
248 if (irq <= 0) {
249 dev_err(dev, "failed to get IRQ %d\n", num);
250 return irq;
251 }
252 if (num == 0) {
253 priv->info.irq = irq;
254 if (strcmp(r->name, "master")) {
255 dev_err(dev, "First irq must be 'master'\n");
256 return -ENXIO;
257 }
258 } else {
259 int ret = request_irq(irq, slave_irq, 0, r->name,
260 (void *) &priv->sirq[num]);
261 if (ret < 0) {
262 dev_err(dev, "can not get IRQ %d\n", irq);
263 return -ENXIO;
264 }
265 }
266 }
267
268 dev_info(dev, "Mapped %d irqs\n", priv->n_sirq);
269 return 0;
270 }
271
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 67760 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-14 13:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-14 13:27 [microchip-ung-linux-upstream:v5.10-webstax 65/88] drivers/uio/uio_sparx5_irqmux.c:247:3: warning: 'strncpy' specified bound 16 equals destination size kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.