* [microchip-ung-linux-upstream:v5.12-rc2.net-next.sparx5_switchdev 25/41] drivers/uio/uio_fireant_irqmux.c:264:3: warning: 'strncpy' specified bound 16 equals destination size
@ 2021-03-15 17:01 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-03-15 17:01 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3306 bytes --]
tree: https://github.com/microchip-ung/linux-upstream.git v5.12-rc2.net-next.sparx5_switchdev
head: c647e473e6ff8532c02ea3bd816aa477df3687f2
commit: 5c575d7626ed53e4ccf148d834dde04b91c29b77 [25/41] sparx5: Add IRQ muxing UIO driver [LOCAL]
config: nds32-allyesconfig (attached as .config)
compiler: nds32le-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/5c575d7626ed53e4ccf148d834dde04b91c29b77
git remote add microchip-ung-linux-upstream https://github.com/microchip-ung/linux-upstream.git
git fetch --no-tags microchip-ung-linux-upstream v5.12-rc2.net-next.sparx5_switchdev
git checkout 5c575d7626ed53e4ccf148d834dde04b91c29b77
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32
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_fireant_irqmux_request_irqs',
inlined from 'uio_fireant_irqmux_probe' at drivers/uio/uio_fireant_irqmux.c:304:8:
>> drivers/uio/uio_fireant_irqmux.c:264:3: warning: 'strncpy' specified bound 16 equals destination size [-Wstringop-truncation]
264 | strncpy(priv->sirq[num].name, r->name, MAXNAMELEN);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/strncpy +264 drivers/uio/uio_fireant_irqmux.c
241
242 static int uio_fireant_irqmux_request_irqs(struct irqmux_platdata *priv)
243 {
244 struct platform_device *pdev = priv->pdev;
245 int irq, num, max;
246
247 priv->n_sirq = platform_irq_count(pdev);
248 priv->sirq = devm_kzalloc(&pdev->dev,
249 sizeof(struct slave_irq)*priv->n_sirq,
250 GFP_KERNEL);
251 if (!priv->sirq)
252 return -ENOMEM;
253
254 for (num = 0, max = priv->n_sirq; num < max; num++) {
255 struct resource *r;
256
257 r = platform_get_resource(pdev, IORESOURCE_IRQ, num);
258 if (!r)
259 return -ENXIO;
260 irq = platform_get_irq(pdev, num);
261 priv->sirq[num].index = num;
262 priv->sirq[num].irq = irq;
263 priv->sirq[num].priv = priv;
> 264 strncpy(priv->sirq[num].name, r->name, MAXNAMELEN);
265 if (irq <= 0) {
266 dev_err(&pdev->dev, "failed to get IRQ %d\n", num);
267 return irq;
268 }
269 if (num == 0) {
270 priv->info.irq = irq;
271 if (strcmp(r->name, "master")) {
272 dev_err(&pdev->dev,
273 "First irq must be 'master'\n");
274 return -ENXIO;
275 }
276 } else {
277 int ret = request_irq(irq, slave_irq, 0, r->name,
278 (void *) &priv->sirq[num]);
279 if (ret < 0) {
280 dev_err(&pdev->dev, "can not get IRQ %d\n",
281 irq);
282 return -ENXIO;
283 }
284 }
285 }
286
287 return 0;
288 }
289
---
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: 59992 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-15 17:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-15 17:01 [microchip-ung-linux-upstream:v5.12-rc2.net-next.sparx5_switchdev 25/41] drivers/uio/uio_fireant_irqmux.c:264: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.