drivers/net/ethernet/freescale/gianfar.c:580 gfar_parse_group() warn: 'grp->regs' not released on lines: 517.
by Dan Carpenter
Hi Rasmus,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f01c30de86f1047e9bae1b1b1417b0ce8dcd15b1
commit: 5a35435ef4e6e4bd2aabd6706b146b298a9cffe5 soc: fsl: qe: remove PPC32 dependency from CONFIG_QUICC_ENGINE
config: powerpc64-randconfig-m031-20201113 (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/net/ethernet/freescale/gianfar.c:580 gfar_parse_group() warn: 'grp->regs' not released on lines: 517.
vim +580 drivers/net/ethernet/freescale/gianfar.c
46ceb60ca80fa07 drivers/net/gianfar.c Sandeep Gopalpet 2009-11-02 491 static int gfar_parse_group(struct device_node *np,
46ceb60ca80fa07 drivers/net/gianfar.c Sandeep Gopalpet 2009-11-02 492 struct gfar_private *priv, const char *model)
46ceb60ca80fa07 drivers/net/gianfar.c Sandeep Gopalpet 2009-11-02 493 {
5fedcc14d40e355 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2013-01-29 494 struct gfar_priv_grp *grp = &priv->gfargrp[priv->num_grps];
ee873fda3bec7c6 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2013-01-29 495 int i;
ee873fda3bec7c6 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2013-01-29 496
ee873fda3bec7c6 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2013-01-29 497 for (i = 0; i < GFAR_NUM_IRQS; i++) {
ee873fda3bec7c6 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2013-01-29 498 grp->irqinfo[i] = kzalloc(sizeof(struct gfar_irqinfo),
ee873fda3bec7c6 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2013-01-29 499 GFP_KERNEL);
ee873fda3bec7c6 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2013-01-29 500 if (!grp->irqinfo[i])
ee873fda3bec7c6 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2013-01-29 501 return -ENOMEM;
ee873fda3bec7c6 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2013-01-29 502 }
46ceb60ca80fa07 drivers/net/gianfar.c Sandeep Gopalpet 2009-11-02 503
5fedcc14d40e355 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2013-01-29 504 grp->regs = of_iomap(np, 0);
^^^^^^^^^^^^^^^
5fedcc14d40e355 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2013-01-29 505 if (!grp->regs)
46ceb60ca80fa07 drivers/net/gianfar.c Sandeep Gopalpet 2009-11-02 506 return -ENOMEM;
46ceb60ca80fa07 drivers/net/gianfar.c Sandeep Gopalpet 2009-11-02 507
ee873fda3bec7c6 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2013-01-29 508 gfar_irq(grp, TX)->irq = irq_of_parse_and_map(np, 0);
46ceb60ca80fa07 drivers/net/gianfar.c Sandeep Gopalpet 2009-11-02 509
46ceb60ca80fa07 drivers/net/gianfar.c Sandeep Gopalpet 2009-11-02 510 /* If we aren't the FEC we have multiple interrupts */
46ceb60ca80fa07 drivers/net/gianfar.c Sandeep Gopalpet 2009-11-02 511 if (model && strcasecmp(model, "FEC")) {
ee873fda3bec7c6 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2013-01-29 512 gfar_irq(grp, RX)->irq = irq_of_parse_and_map(np, 1);
ee873fda3bec7c6 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2013-01-29 513 gfar_irq(grp, ER)->irq = irq_of_parse_and_map(np, 2);
fea0f6650979a4f drivers/net/ethernet/freescale/gianfar.c Mark Brown 2015-11-26 514 if (!gfar_irq(grp, TX)->irq ||
fea0f6650979a4f drivers/net/ethernet/freescale/gianfar.c Mark Brown 2015-11-26 515 !gfar_irq(grp, RX)->irq ||
fea0f6650979a4f drivers/net/ethernet/freescale/gianfar.c Mark Brown 2015-11-26 516 !gfar_irq(grp, ER)->irq)
46ceb60ca80fa07 drivers/net/gianfar.c Sandeep Gopalpet 2009-11-02 517 return -EINVAL;
This should unmap "grp->regs".
46ceb60ca80fa07 drivers/net/gianfar.c Sandeep Gopalpet 2009-11-02 518 }
46ceb60ca80fa07 drivers/net/gianfar.c Sandeep Gopalpet 2009-11-02 519
5fedcc14d40e355 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2013-01-29 520 grp->priv = priv;
5fedcc14d40e355 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2013-01-29 521 spin_lock_init(&grp->grplock);
46ceb60ca80fa07 drivers/net/gianfar.c Sandeep Gopalpet 2009-11-02 522 if (priv->mode == MQ_MG_MODE) {
559176415cc663f drivers/net/ethernet/freescale/gianfar.c Jingchang Lu 2015-03-13 523 u32 rxq_mask, txq_mask;
559176415cc663f drivers/net/ethernet/freescale/gianfar.c Jingchang Lu 2015-03-13 524 int ret;
71ff9e3df7e1c5d drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-03-07 525
71ff9e3df7e1c5d drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-03-07 526 grp->rx_bit_map = (DEFAULT_MAPPING >> priv->num_grps);
71ff9e3df7e1c5d drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-03-07 527 grp->tx_bit_map = (DEFAULT_MAPPING >> priv->num_grps);
559176415cc663f drivers/net/ethernet/freescale/gianfar.c Jingchang Lu 2015-03-13 528
559176415cc663f drivers/net/ethernet/freescale/gianfar.c Jingchang Lu 2015-03-13 529 ret = of_property_read_u32(np, "fsl,rx-bit-map", &rxq_mask);
559176415cc663f drivers/net/ethernet/freescale/gianfar.c Jingchang Lu 2015-03-13 530 if (!ret) {
71ff9e3df7e1c5d drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-03-07 531 grp->rx_bit_map = rxq_mask ?
559176415cc663f drivers/net/ethernet/freescale/gianfar.c Jingchang Lu 2015-03-13 532 rxq_mask : (DEFAULT_MAPPING >> priv->num_grps);
559176415cc663f drivers/net/ethernet/freescale/gianfar.c Jingchang Lu 2015-03-13 533 }
559176415cc663f drivers/net/ethernet/freescale/gianfar.c Jingchang Lu 2015-03-13 534
559176415cc663f drivers/net/ethernet/freescale/gianfar.c Jingchang Lu 2015-03-13 535 ret = of_property_read_u32(np, "fsl,tx-bit-map", &txq_mask);
559176415cc663f drivers/net/ethernet/freescale/gianfar.c Jingchang Lu 2015-03-13 536 if (!ret) {
71ff9e3df7e1c5d drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-03-07 537 grp->tx_bit_map = txq_mask ?
559176415cc663f drivers/net/ethernet/freescale/gianfar.c Jingchang Lu 2015-03-13 538 txq_mask : (DEFAULT_MAPPING >> priv->num_grps);
559176415cc663f drivers/net/ethernet/freescale/gianfar.c Jingchang Lu 2015-03-13 539 }
559176415cc663f drivers/net/ethernet/freescale/gianfar.c Jingchang Lu 2015-03-13 540
559176415cc663f drivers/net/ethernet/freescale/gianfar.c Jingchang Lu 2015-03-13 541 if (priv->poll_mode == GFAR_SQ_POLLING) {
559176415cc663f drivers/net/ethernet/freescale/gianfar.c Jingchang Lu 2015-03-13 542 /* One Q per interrupt group: Q0 to G0, Q1 to G1 */
559176415cc663f drivers/net/ethernet/freescale/gianfar.c Jingchang Lu 2015-03-13 543 grp->rx_bit_map = (DEFAULT_MAPPING >> priv->num_grps);
559176415cc663f drivers/net/ethernet/freescale/gianfar.c Jingchang Lu 2015-03-13 544 grp->tx_bit_map = (DEFAULT_MAPPING >> priv->num_grps);
71ff9e3df7e1c5d drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-03-07 545 }
46ceb60ca80fa07 drivers/net/gianfar.c Sandeep Gopalpet 2009-11-02 546 } else {
5fedcc14d40e355 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2013-01-29 547 grp->rx_bit_map = 0xFF;
5fedcc14d40e355 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2013-01-29 548 grp->tx_bit_map = 0xFF;
46ceb60ca80fa07 drivers/net/gianfar.c Sandeep Gopalpet 2009-11-02 549 }
208627883ecfaa1 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-02-17 550
208627883ecfaa1 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-02-17 551 /* bit_map's MSB is q0 (from q0 to q7) but, for_each_set_bit parses
208627883ecfaa1 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-02-17 552 * right to left, so we need to revert the 8 bits to get the q index
208627883ecfaa1 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-02-17 553 */
208627883ecfaa1 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-02-17 554 grp->rx_bit_map = bitrev8(grp->rx_bit_map);
208627883ecfaa1 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-02-17 555 grp->tx_bit_map = bitrev8(grp->tx_bit_map);
208627883ecfaa1 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-02-17 556
208627883ecfaa1 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-02-17 557 /* Calculate RSTAT, TSTAT, RQUEUE and TQUEUE values,
208627883ecfaa1 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-02-17 558 * also assign queues to groups
208627883ecfaa1 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-02-17 559 */
208627883ecfaa1 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-02-17 560 for_each_set_bit(i, &grp->rx_bit_map, priv->num_rx_queues) {
71ff9e3df7e1c5d drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-03-07 561 if (!grp->rx_queue)
71ff9e3df7e1c5d drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-03-07 562 grp->rx_queue = priv->rx_queue[i];
208627883ecfaa1 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-02-17 563 grp->num_rx_queues++;
208627883ecfaa1 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-02-17 564 grp->rstat |= (RSTAT_CLEAR_RHALT >> i);
208627883ecfaa1 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-02-17 565 priv->rqueue |= ((RQUEUE_EN0 | RQUEUE_EX0) >> i);
208627883ecfaa1 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-02-17 566 priv->rx_queue[i]->grp = grp;
208627883ecfaa1 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-02-17 567 }
208627883ecfaa1 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-02-17 568
208627883ecfaa1 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-02-17 569 for_each_set_bit(i, &grp->tx_bit_map, priv->num_tx_queues) {
71ff9e3df7e1c5d drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-03-07 570 if (!grp->tx_queue)
71ff9e3df7e1c5d drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-03-07 571 grp->tx_queue = priv->tx_queue[i];
208627883ecfaa1 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-02-17 572 grp->num_tx_queues++;
208627883ecfaa1 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-02-17 573 grp->tstat |= (TSTAT_CLEAR_THALT >> i);
208627883ecfaa1 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-02-17 574 priv->tqueue |= (TQUEUE_EN0 >> i);
208627883ecfaa1 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-02-17 575 priv->tx_queue[i]->grp = grp;
208627883ecfaa1 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-02-17 576 }
208627883ecfaa1 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil 2014-02-17 577
46ceb60ca80fa07 drivers/net/gianfar.c Sandeep Gopalpet 2009-11-02 578 priv->num_grps++;
46ceb60ca80fa07 drivers/net/gianfar.c Sandeep Gopalpet 2009-11-02 579
46ceb60ca80fa07 drivers/net/gianfar.c Sandeep Gopalpet 2009-11-02 @580 return 0;
46ceb60ca80fa07 drivers/net/gianfar.c Sandeep Gopalpet 2009-11-02 581 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
[gpio:gpio-descriptors-spi 2/2] drivers/spi/spi-mpc512x-psc.c:469:39: warning: ISO C90 forbids mixed declarations and code
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git gpio-descriptors-spi
head: a40edbe3d2bf76cbc1a7c30b50de679811427aaf
commit: a40edbe3d2bf76cbc1a7c30b50de679811427aaf [2/2] spi: mpc512x-psc: Convert to use GPIO descriptors
config: powerpc-mpc512x_defconfig (attached as .config)
compiler: powerpc-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://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git/com...
git remote add gpio https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git
git fetch --no-tags gpio gpio-descriptors-spi
git checkout a40edbe3d2bf76cbc1a7c30b50de679811427aaf
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/spi/spi-mpc512x-psc.c: In function 'mpc512x_psc_spi_setup':
drivers/spi/spi-mpc512x-psc.c:350:6: warning: unused variable 'ret' [-Wunused-variable]
350 | int ret;
| ^~~
drivers/spi/spi-mpc512x-psc.c: In function 'mpc512x_psc_spi_do_probe':
drivers/spi/spi-mpc512x-psc.c:469:39: error: unknown type name 'x'
469 | mps->cs_control = pdata->cs_control;x
| ^
drivers/spi/spi-mpc512x-psc.c:470:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
470 | master->bus_num = pdata->bus_num;
| ^~
>> drivers/spi/spi-mpc512x-psc.c:469:39: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
469 | mps->cs_control = pdata->cs_control;x
| ^
vim +469 drivers/spi/spi-mpc512x-psc.c
448
449 static int mpc512x_psc_spi_do_probe(struct device *dev, u32 regaddr,
450 u32 size, unsigned int irq)
451 {
452 struct fsl_spi_platform_data *pdata = dev_get_platdata(dev);
453 struct mpc512x_psc_spi *mps;
454 struct spi_master *master;
455 int ret;
456 void *tempp;
457 struct clk *clk;
458
459 master = spi_alloc_master(dev, sizeof *mps);
460 if (master == NULL)
461 return -ENOMEM;
462
463 dev_set_drvdata(dev, master);
464 mps = spi_master_get_devdata(master);
465 mps->type = (int)of_device_get_match_data(dev);
466 mps->irq = irq;
467
468 if (pdata) {
> 469 mps->cs_control = pdata->cs_control;x
470 master->bus_num = pdata->bus_num;
471 master->num_chipselect = pdata->max_chipselect;
472 }
473
474 master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_LSB_FIRST;
475 master->setup = mpc512x_psc_spi_setup;
476 master->prepare_transfer_hardware = mpc512x_psc_spi_prep_xfer_hw;
477 master->transfer_one_message = mpc512x_psc_spi_msg_xfer;
478 master->unprepare_transfer_hardware = mpc512x_psc_spi_unprep_xfer_hw;
479 master->set_cs = mpc512x_psc_spi_set_cs;
480 /* This makes sure our custom .set_cs() is always called */
481 master->flags = SPI_MASTER_GPIO_SS;
482 master->use_gpio_descriptors = true;
483 master->cleanup = mpc512x_psc_spi_cleanup;
484 master->dev.of_node = dev->of_node;
485
486 tempp = devm_ioremap(dev, regaddr, size);
487 if (!tempp) {
488 dev_err(dev, "could not ioremap I/O port range\n");
489 ret = -EFAULT;
490 goto free_master;
491 }
492 mps->psc = tempp;
493 mps->fifo =
494 (struct mpc512x_psc_fifo *)(tempp + sizeof(struct mpc52xx_psc));
495 ret = devm_request_irq(dev, mps->irq, mpc512x_psc_spi_isr, IRQF_SHARED,
496 "mpc512x-psc-spi", mps);
497 if (ret)
498 goto free_master;
499 init_completion(&mps->txisrdone);
500
501 clk = devm_clk_get(dev, "mclk");
502 if (IS_ERR(clk)) {
503 ret = PTR_ERR(clk);
504 goto free_master;
505 }
506 ret = clk_prepare_enable(clk);
507 if (ret)
508 goto free_master;
509 mps->clk_mclk = clk;
510 mps->mclk_rate = clk_get_rate(clk);
511
512 clk = devm_clk_get(dev, "ipg");
513 if (IS_ERR(clk)) {
514 ret = PTR_ERR(clk);
515 goto free_mclk_clock;
516 }
517 ret = clk_prepare_enable(clk);
518 if (ret)
519 goto free_mclk_clock;
520 mps->clk_ipg = clk;
521
522 ret = mpc512x_psc_spi_port_config(master, mps);
523 if (ret < 0)
524 goto free_ipg_clock;
525
526 ret = devm_spi_register_master(dev, master);
527 if (ret < 0)
528 goto free_ipg_clock;
529
530 return ret;
531
532 free_ipg_clock:
533 clk_disable_unprepare(mps->clk_ipg);
534 free_mclk_clock:
535 clk_disable_unprepare(mps->clk_mclk);
536 free_master:
537 spi_master_put(master);
538
539 return ret;
540 }
541
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
Re: [PATCH net-next] net: DSCP in IPv4 routing
by kernel test robot
Hi Russell,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on net-next/master]
url: https://github.com/0day-ci/linux/commits/Russell-Strong/Re-PATCH-net-next...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 9e6cad531c9de1ba39334fca535af0da5fdf8770
config: x86_64-randconfig-r014-20201116 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c044709b8fbea2a9a375e4173a6bd735f6866c0c)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/f5e2676aa421caddeef6d412be65f35d9...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Russell-Strong/Re-PATCH-net-next-net-DSCP-in-IPv4-routing/20201115-071518
git checkout f5e2676aa421caddeef6d412be65f35d9e4d3b85
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from net/core/filter.c:33:
In file included from include/net/ip.h:29:
include/net/route.h:337:10: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
RT_CONN_FLAGS(sk), fl4->daddr,
^
include/net/route.h:43:30: note: expanded from macro 'RT_CONN_FLAGS'
#define RT_CONN_FLAGS(sk) (rt_tos(sock_net(sk), inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
include/net/route.h:337:10: note: did you mean 'rt_task'?
include/net/route.h:43:30: note: expanded from macro 'RT_CONN_FLAGS'
#define RT_CONN_FLAGS(sk) (rt_tos(sock_net(sk), inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
include/linux/sched/rt.h:16:19: note: 'rt_task' declared here
static inline int rt_task(struct task_struct *p)
^
In file included from net/core/filter.c:33:
include/net/ip.h:245:28: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
return (ipc->tos != -1) ? rt_tos(net, ipc->tos) : rt_tos(net, inet->tos);
^
include/net/ip.h:250:28: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
return (ipc->tos != -1) ? RT_CONN_FLAGS_TOS(sk, ipc->tos) : RT_CONN_FLAGS(sk);
^
include/net/route.h:44:38: note: expanded from macro 'RT_CONN_FLAGS_TOS'
#define RT_CONN_FLAGS_TOS(sk,tos) (rt_tos(sock_net(sk), tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
>> net/core/filter.c:2348:20: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
.flowi4_tos = rt_tos(net, ip4h->tos),
^
>> net/core/filter.c:5312:33: error: implicit declaration of function 'iptos_rt_mask' [-Werror,-Wimplicit-function-declaration]
fl4.flowi4_tos = params->tos & iptos_rt_mask(net);
^
5 errors generated.
--
In file included from net/ipv4/route.c:90:
In file included from include/net/dst_metadata.h:6:
In file included from include/net/ip_tunnels.h:18:
In file included from include/net/lwtunnel.h:9:
include/net/route.h:337:10: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
RT_CONN_FLAGS(sk), fl4->daddr,
^
include/net/route.h:43:30: note: expanded from macro 'RT_CONN_FLAGS'
#define RT_CONN_FLAGS(sk) (rt_tos(sock_net(sk), inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
include/net/route.h:337:10: note: did you mean 'rt_task'?
include/net/route.h:43:30: note: expanded from macro 'RT_CONN_FLAGS'
#define RT_CONN_FLAGS(sk) (rt_tos(sock_net(sk), inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
include/linux/sched/rt.h:16:19: note: 'rt_task' declared here
static inline int rt_task(struct task_struct *p)
^
In file included from net/ipv4/route.c:93:
include/net/ip.h:245:28: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
return (ipc->tos != -1) ? rt_tos(net, ipc->tos) : rt_tos(net, inet->tos);
^
include/net/ip.h:250:28: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
return (ipc->tos != -1) ? RT_CONN_FLAGS_TOS(sk, ipc->tos) : RT_CONN_FLAGS(sk);
^
include/net/route.h:44:38: note: expanded from macro 'RT_CONN_FLAGS_TOS'
#define RT_CONN_FLAGS_TOS(sk,tos) (rt_tos(sock_net(sk), tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
>> net/ipv4/route.c:533:9: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
tos = RT_CONN_FLAGS(sk);
^
include/net/route.h:43:30: note: expanded from macro 'RT_CONN_FLAGS'
#define RT_CONN_FLAGS(sk) (rt_tos(sock_net(sk), inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
net/ipv4/route.c:549:11: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
u8 tos = rt_tos(net, iph->tos);
^
net/ipv4/route.c:567:7: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
RT_CONN_FLAGS(sk), RT_SCOPE_UNIVERSE,
^
include/net/route.h:43:30: note: expanded from macro 'RT_CONN_FLAGS'
#define RT_CONN_FLAGS(sk) (rt_tos(sock_net(sk), inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
net/ipv4/route.c:825:11: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
u8 tos = rt_tos(net, iph->tos);
^
net/ipv4/route.c:1073:5: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
rt_tos(net, iph->tos), protocol, mark, 0);
^
net/ipv4/route.c:1162:5: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
rt_tos(net, iph->tos), protocol, 0, 0);
^
net/ipv4/route.c:1284:20: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
fl4.flowi4_tos = rt_tos(net, iph->tos);
^
>> net/ipv4/route.c:2060:9: error: implicit declaration of function 'iptos_rt_mask' [-Werror,-Wimplicit-function-declaration]
tos &= iptos_rt_mask(net);
^
net/ipv4/route.c:2304:9: error: implicit declaration of function 'iptos_rt_mask' [-Werror,-Wimplicit-function-declaration]
tos &= iptos_rt_mask(net);
^
net/ipv4/route.c:2495:32: error: implicit declaration of function 'iptos_rt_mask' [-Werror,-Wimplicit-function-declaration]
__u8 tos = fl4->flowi4_tos & (iptos_rt_mask(net) | RTO_ONLINK);
^
net/ipv4/route.c:2815:19: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
fl4.flowi4_tos = rt_tos(net, tos);
^
14 errors generated.
--
In file included from net/ipv4/ip_output.c:67:
In file included from include/net/ip.h:29:
include/net/route.h:337:10: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
RT_CONN_FLAGS(sk), fl4->daddr,
^
include/net/route.h:43:30: note: expanded from macro 'RT_CONN_FLAGS'
#define RT_CONN_FLAGS(sk) (rt_tos(sock_net(sk), inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
include/net/route.h:337:10: note: did you mean 'rt_task'?
include/net/route.h:43:30: note: expanded from macro 'RT_CONN_FLAGS'
#define RT_CONN_FLAGS(sk) (rt_tos(sock_net(sk), inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
include/linux/sched/rt.h:16:19: note: 'rt_task' declared here
static inline int rt_task(struct task_struct *p)
^
In file included from net/ipv4/ip_output.c:67:
include/net/ip.h:245:28: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
return (ipc->tos != -1) ? rt_tos(net, ipc->tos) : rt_tos(net, inet->tos);
^
include/net/ip.h:250:28: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
return (ipc->tos != -1) ? RT_CONN_FLAGS_TOS(sk, ipc->tos) : RT_CONN_FLAGS(sk);
^
include/net/route.h:44:38: note: expanded from macro 'RT_CONN_FLAGS_TOS'
#define RT_CONN_FLAGS_TOS(sk,tos) (rt_tos(sock_net(sk), tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
>> net/ipv4/ip_output.c:493:9: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
RT_CONN_FLAGS_TOS(sk, tos),
^
include/net/route.h:44:38: note: expanded from macro 'RT_CONN_FLAGS_TOS'
#define RT_CONN_FLAGS_TOS(sk,tos) (rt_tos(sock_net(sk), tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
net/ipv4/ip_output.c:1697:7: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
rt_tos(net, arg->tos),
^
5 errors generated.
--
In file included from net/ipv4/inet_connection_sock.c:16:
In file included from include/net/inet_hashtables.h:27:
include/net/route.h:337:10: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
RT_CONN_FLAGS(sk), fl4->daddr,
^
include/net/route.h:43:30: note: expanded from macro 'RT_CONN_FLAGS'
#define RT_CONN_FLAGS(sk) (rt_tos(sock_net(sk), inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
include/net/route.h:337:10: note: did you mean 'rt_task'?
include/net/route.h:43:30: note: expanded from macro 'RT_CONN_FLAGS'
#define RT_CONN_FLAGS(sk) (rt_tos(sock_net(sk), inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
include/linux/sched/rt.h:16:19: note: 'rt_task' declared here
static inline int rt_task(struct task_struct *p)
^
In file included from net/ipv4/inet_connection_sock.c:18:
include/net/ip.h:245:28: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
return (ipc->tos != -1) ? rt_tos(net, ipc->tos) : rt_tos(net, inet->tos);
^
include/net/ip.h:250:28: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
return (ipc->tos != -1) ? RT_CONN_FLAGS_TOS(sk, ipc->tos) : RT_CONN_FLAGS(sk);
^
include/net/route.h:44:38: note: expanded from macro 'RT_CONN_FLAGS_TOS'
#define RT_CONN_FLAGS_TOS(sk,tos) (rt_tos(sock_net(sk), tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
>> net/ipv4/inet_connection_sock.c:600:7: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
RT_CONN_FLAGS(sk), RT_SCOPE_UNIVERSE,
^
include/net/route.h:43:30: note: expanded from macro 'RT_CONN_FLAGS'
#define RT_CONN_FLAGS(sk) (rt_tos(sock_net(sk), inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
net/ipv4/inet_connection_sock.c:638:7: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
RT_CONN_FLAGS(sk), RT_SCOPE_UNIVERSE,
^
include/net/route.h:43:30: note: expanded from macro 'RT_CONN_FLAGS'
#define RT_CONN_FLAGS(sk) (rt_tos(sock_net(sk), inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
net/ipv4/inet_connection_sock.c:1085:8: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
RT_CONN_FLAGS(sk), sk->sk_bound_dev_if);
^
include/net/route.h:43:30: note: expanded from macro 'RT_CONN_FLAGS'
#define RT_CONN_FLAGS(sk) (rt_tos(sock_net(sk), inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
6 errors generated.
--
In file included from net/ipv4/tcp_ipv4.c:62:
In file included from include/net/icmp.h:21:
In file included from include/net/ip.h:29:
include/net/route.h:337:10: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
RT_CONN_FLAGS(sk), fl4->daddr,
^
include/net/route.h:43:30: note: expanded from macro 'RT_CONN_FLAGS'
#define RT_CONN_FLAGS(sk) (rt_tos(sock_net(sk), inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
include/net/route.h:337:10: note: did you mean 'rt_task'?
include/net/route.h:43:30: note: expanded from macro 'RT_CONN_FLAGS'
#define RT_CONN_FLAGS(sk) (rt_tos(sock_net(sk), inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
include/linux/sched/rt.h:16:19: note: 'rt_task' declared here
static inline int rt_task(struct task_struct *p)
^
In file included from net/ipv4/tcp_ipv4.c:62:
In file included from include/net/icmp.h:21:
include/net/ip.h:245:28: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
return (ipc->tos != -1) ? rt_tos(net, ipc->tos) : rt_tos(net, inet->tos);
^
include/net/ip.h:250:28: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
return (ipc->tos != -1) ? RT_CONN_FLAGS_TOS(sk, ipc->tos) : RT_CONN_FLAGS(sk);
^
include/net/route.h:44:38: note: expanded from macro 'RT_CONN_FLAGS_TOS'
#define RT_CONN_FLAGS_TOS(sk,tos) (rt_tos(sock_net(sk), tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
>> net/ipv4/tcp_ipv4.c:230:10: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
RT_CONN_FLAGS(sk), sk->sk_bound_dev_if,
^
include/net/route.h:43:30: note: expanded from macro 'RT_CONN_FLAGS'
#define RT_CONN_FLAGS(sk) (rt_tos(sock_net(sk), inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
4 errors generated.
--
In file included from net/ipv4/datagram.c:14:
In file included from include/net/ip.h:29:
include/net/route.h:337:10: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
RT_CONN_FLAGS(sk), fl4->daddr,
^
include/net/route.h:43:30: note: expanded from macro 'RT_CONN_FLAGS'
#define RT_CONN_FLAGS(sk) (rt_tos(sock_net(sk), inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
include/net/route.h:337:10: note: did you mean 'rt_task'?
include/net/route.h:43:30: note: expanded from macro 'RT_CONN_FLAGS'
#define RT_CONN_FLAGS(sk) (rt_tos(sock_net(sk), inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
include/linux/sched/rt.h:16:19: note: 'rt_task' declared here
static inline int rt_task(struct task_struct *p)
^
In file included from net/ipv4/datagram.c:14:
include/net/ip.h:245:28: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
return (ipc->tos != -1) ? rt_tos(net, ipc->tos) : rt_tos(net, inet->tos);
^
include/net/ip.h:250:28: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
return (ipc->tos != -1) ? RT_CONN_FLAGS_TOS(sk, ipc->tos) : RT_CONN_FLAGS(sk);
^
include/net/route.h:44:38: note: expanded from macro 'RT_CONN_FLAGS_TOS'
#define RT_CONN_FLAGS_TOS(sk,tos) (rt_tos(sock_net(sk), tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
>> net/ipv4/datagram.c:49:10: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
RT_CONN_FLAGS(sk), oif,
^
include/net/route.h:43:30: note: expanded from macro 'RT_CONN_FLAGS'
#define RT_CONN_FLAGS(sk) (rt_tos(sock_net(sk), inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
net/ipv4/datagram.c:122:8: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
RT_CONN_FLAGS(sk), sk->sk_bound_dev_if);
^
include/net/route.h:43:30: note: expanded from macro 'RT_CONN_FLAGS'
#define RT_CONN_FLAGS(sk) (rt_tos(sock_net(sk), inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
5 errors generated.
--
In file included from net/ipv4/icmp.c:76:
In file included from include/net/ip.h:29:
include/net/route.h:337:10: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
RT_CONN_FLAGS(sk), fl4->daddr,
^
include/net/route.h:43:30: note: expanded from macro 'RT_CONN_FLAGS'
#define RT_CONN_FLAGS(sk) (rt_tos(sock_net(sk), inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
include/net/route.h:337:10: note: did you mean 'rt_task'?
include/net/route.h:43:30: note: expanded from macro 'RT_CONN_FLAGS'
#define RT_CONN_FLAGS(sk) (rt_tos(sock_net(sk), inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
include/linux/sched/rt.h:16:19: note: 'rt_task' declared here
static inline int rt_task(struct task_struct *p)
^
In file included from net/ipv4/icmp.c:76:
include/net/ip.h:245:28: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
return (ipc->tos != -1) ? rt_tos(net, ipc->tos) : rt_tos(net, inet->tos);
^
include/net/ip.h:250:28: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
return (ipc->tos != -1) ? RT_CONN_FLAGS_TOS(sk, ipc->tos) : RT_CONN_FLAGS(sk);
^
include/net/route.h:44:38: note: expanded from macro 'RT_CONN_FLAGS_TOS'
#define RT_CONN_FLAGS_TOS(sk,tos) (rt_tos(sock_net(sk), tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
>> net/ipv4/icmp.c:447:19: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
fl4.flowi4_tos = rt_tos(net, ip_hdr(skb)->tos);
^
net/ipv4/icmp.c:499:20: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
fl4->flowi4_tos = rt_tos(net, tos);
^
net/ipv4/icmp.c:715:37: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
tos = icmp_pointers[type].error ? (rt_tos(net, iph->tos) |
^
6 errors generated.
--
In file included from net/ipv4/af_inet.c:96:
In file included from include/net/ip.h:29:
include/net/route.h:337:10: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
RT_CONN_FLAGS(sk), fl4->daddr,
^
include/net/route.h:43:30: note: expanded from macro 'RT_CONN_FLAGS'
#define RT_CONN_FLAGS(sk) (rt_tos(sock_net(sk), inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
include/net/route.h:337:10: note: did you mean 'rt_task'?
include/net/route.h:43:30: note: expanded from macro 'RT_CONN_FLAGS'
#define RT_CONN_FLAGS(sk) (rt_tos(sock_net(sk), inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
include/linux/sched/rt.h:16:19: note: 'rt_task' declared here
static inline int rt_task(struct task_struct *p)
^
In file included from net/ipv4/af_inet.c:96:
include/net/ip.h:245:28: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
return (ipc->tos != -1) ? rt_tos(net, ipc->tos) : rt_tos(net, inet->tos);
^
include/net/ip.h:250:28: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
return (ipc->tos != -1) ? RT_CONN_FLAGS_TOS(sk, ipc->tos) : RT_CONN_FLAGS(sk);
^
include/net/route.h:44:38: note: expanded from macro 'RT_CONN_FLAGS_TOS'
#define RT_CONN_FLAGS_TOS(sk,tos) (rt_tos(sock_net(sk), tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
>> net/ipv4/af_inet.c:1235:39: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
rt = ip_route_connect(fl4, daddr, 0, RT_CONN_FLAGS(sk),
^
include/net/route.h:43:30: note: expanded from macro 'RT_CONN_FLAGS'
#define RT_CONN_FLAGS(sk) (rt_tos(sock_net(sk), inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
net/ipv4/af_inet.c:1289:25: error: implicit declaration of function 'rt_tos' [-Werror,-Wimplicit-function-declaration]
sk->sk_protocol, RT_CONN_FLAGS(sk),
^
include/net/route.h:43:30: note: expanded from macro 'RT_CONN_FLAGS'
#define RT_CONN_FLAGS(sk) (rt_tos(sock_net(sk), inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE))
^
5 errors generated.
..
vim +/rt_tos +2348 net/core/filter.c
2336
2337 static int __bpf_redirect_neigh_v4(struct sk_buff *skb, struct net_device *dev,
2338 struct bpf_nh_params *nh)
2339 {
2340 const struct iphdr *ip4h = ip_hdr(skb);
2341 struct net *net = dev_net(dev);
2342 int err, ret = NET_XMIT_DROP;
2343
2344 if (!nh) {
2345 struct flowi4 fl4 = {
2346 .flowi4_flags = FLOWI_FLAG_ANYSRC,
2347 .flowi4_mark = skb->mark,
> 2348 .flowi4_tos = rt_tos(net, ip4h->tos),
2349 .flowi4_oif = dev->ifindex,
2350 .flowi4_proto = ip4h->protocol,
2351 .daddr = ip4h->daddr,
2352 .saddr = ip4h->saddr,
2353 };
2354 struct rtable *rt;
2355
2356 rt = ip_route_output_flow(net, &fl4, NULL);
2357 if (IS_ERR(rt))
2358 goto out_drop;
2359 if (rt->rt_type != RTN_UNICAST && rt->rt_type != RTN_LOCAL) {
2360 ip_rt_put(rt);
2361 goto out_drop;
2362 }
2363
2364 skb_dst_set(skb, &rt->dst);
2365 }
2366
2367 err = bpf_out_neigh_v4(net, skb, dev, nh);
2368 if (unlikely(net_xmit_eval(err)))
2369 dev->stats.tx_errors++;
2370 else
2371 ret = NET_XMIT_SUCCESS;
2372 goto out_xmit;
2373 out_drop:
2374 dev->stats.tx_errors++;
2375 kfree_skb(skb);
2376 out_xmit:
2377 return ret;
2378 }
2379 #else
2380 static int __bpf_redirect_neigh_v4(struct sk_buff *skb, struct net_device *dev,
2381 struct bpf_nh_params *nh)
2382 {
2383 kfree_skb(skb);
2384 return NET_XMIT_DROP;
2385 }
2386 #endif /* CONFIG_INET */
2387
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
[linux-stable-rc:linux-5.4.y 342/3218] drivers/tty/serial/mxs-auart.c:1753:24: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
head: a3e34830d91255b6038c86c49a880c59a1aba945
commit: 2cd065b916811dc197b0d0069cec2f64f7203af0 [342/3218] serial: mxs-auart: add missed iounmap() in probe failure and remove
config: openrisc-randconfig-s031-20201116 (attached as .config)
compiler: or1k-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-107-gaf3512a6-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gi...
git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git fetch --no-tags linux-stable-rc linux-5.4.y
git checkout 2cd065b916811dc197b0d0069cec2f64f7203af0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=openrisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> drivers/tty/serial/mxs-auart.c:1753:24: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *addr @@ got unsigned char [noderef] <asn:2> *membase @@
drivers/tty/serial/mxs-auart.c:1753:24: sparse: expected void *addr
>> drivers/tty/serial/mxs-auart.c:1753:24: sparse: got unsigned char [noderef] <asn:2> *membase
drivers/tty/serial/mxs-auart.c:1770:24: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *addr @@ got unsigned char [noderef] <asn:2> *membase @@
drivers/tty/serial/mxs-auart.c:1770:24: sparse: expected void *addr
drivers/tty/serial/mxs-auart.c:1770:24: sparse: got unsigned char [noderef] <asn:2> *membase
drivers/tty/serial/mxs-auart.c: note: in included file (through arch/openrisc/include/asm/io.h, include/linux/io.h, include/linux/irq.h, ...):
include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype]
vim +1753 drivers/tty/serial/mxs-auart.c
1643
1644 static int mxs_auart_probe(struct platform_device *pdev)
1645 {
1646 const struct of_device_id *of_id =
1647 of_match_device(mxs_auart_dt_ids, &pdev->dev);
1648 struct mxs_auart_port *s;
1649 u32 version;
1650 int ret, irq;
1651 struct resource *r;
1652
1653 s = devm_kzalloc(&pdev->dev, sizeof(*s), GFP_KERNEL);
1654 if (!s)
1655 return -ENOMEM;
1656
1657 s->port.dev = &pdev->dev;
1658 s->dev = &pdev->dev;
1659
1660 ret = serial_mxs_probe_dt(s, pdev);
1661 if (ret > 0)
1662 s->port.line = pdev->id < 0 ? 0 : pdev->id;
1663 else if (ret < 0)
1664 return ret;
1665 if (s->port.line >= ARRAY_SIZE(auart_port)) {
1666 dev_err(&pdev->dev, "serial%d out of range\n", s->port.line);
1667 return -EINVAL;
1668 }
1669
1670 if (of_id) {
1671 pdev->id_entry = of_id->data;
1672 s->devtype = pdev->id_entry->driver_data;
1673 }
1674
1675 ret = mxs_get_clks(s, pdev);
1676 if (ret)
1677 return ret;
1678
1679 r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1680 if (!r) {
1681 ret = -ENXIO;
1682 goto out_disable_clks;
1683 }
1684
1685 s->port.mapbase = r->start;
1686 s->port.membase = ioremap(r->start, resource_size(r));
1687 if (!s->port.membase) {
1688 ret = -ENOMEM;
1689 goto out_disable_clks;
1690 }
1691 s->port.ops = &mxs_auart_ops;
1692 s->port.iotype = UPIO_MEM;
1693 s->port.fifosize = MXS_AUART_FIFO_SIZE;
1694 s->port.uartclk = clk_get_rate(s->clk);
1695 s->port.type = PORT_IMX;
1696
1697 mxs_init_regs(s);
1698
1699 s->mctrl_prev = 0;
1700
1701 irq = platform_get_irq(pdev, 0);
1702 if (irq < 0) {
1703 ret = irq;
1704 goto out_iounmap;
1705 }
1706
1707 s->port.irq = irq;
1708 ret = devm_request_irq(&pdev->dev, irq, mxs_auart_irq_handle, 0,
1709 dev_name(&pdev->dev), s);
1710 if (ret)
1711 goto out_iounmap;
1712
1713 platform_set_drvdata(pdev, s);
1714
1715 ret = mxs_auart_init_gpios(s, &pdev->dev);
1716 if (ret) {
1717 dev_err(&pdev->dev, "Failed to initialize GPIOs.\n");
1718 goto out_iounmap;
1719 }
1720
1721 /*
1722 * Get the GPIO lines IRQ
1723 */
1724 ret = mxs_auart_request_gpio_irq(s);
1725 if (ret)
1726 goto out_iounmap;
1727
1728 auart_port[s->port.line] = s;
1729
1730 mxs_auart_reset_deassert(s);
1731
1732 ret = uart_add_one_port(&auart_driver, &s->port);
1733 if (ret)
1734 goto out_free_qpio_irq;
1735
1736 /* ASM9260 don't have version reg */
1737 if (is_asm9260_auart(s)) {
1738 dev_info(&pdev->dev, "Found APPUART ASM9260\n");
1739 } else {
1740 version = mxs_read(s, REG_VERSION);
1741 dev_info(&pdev->dev, "Found APPUART %d.%d.%d\n",
1742 (version >> 24) & 0xff,
1743 (version >> 16) & 0xff, version & 0xffff);
1744 }
1745
1746 return 0;
1747
1748 out_free_qpio_irq:
1749 mxs_auart_free_gpio_irq(s);
1750 auart_port[pdev->id] = NULL;
1751
1752 out_iounmap:
> 1753 iounmap(s->port.membase);
1754
1755 out_disable_clks:
1756 if (is_asm9260_auart(s)) {
1757 clk_disable_unprepare(s->clk);
1758 clk_disable_unprepare(s->clk_ahb);
1759 }
1760 return ret;
1761 }
1762
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
Re: Error: invalid switch -me200
by Alan Modra
On Fri, Nov 13, 2020 at 06:50:15PM -0600, Segher Boessenkool wrote:
> On Fri, Nov 13, 2020 at 04:37:38PM -0800, Fāng-ruì Sòng wrote:
> > On Fri, Nov 13, 2020 at 4:23 PM Segher Boessenkool
> > <segher(a)kernel.crashing.org> wrote:
> > > On Fri, Nov 13, 2020 at 12:14:18PM -0800, Nick Desaulniers wrote:
> > > > > > > Error: invalid switch -me200
> > > > > > > Error: unrecognized option -me200
> > > > > >
> > > > > > 251 cpu-as-$(CONFIG_E200) += -Wa,-me200
> > > > > >
> > > > > > Are those all broken configs, or is Kconfig messed up such that
> > > > > > randconfig can select these when it should not?
> > > > >
> > > > > Hmmm, looks like this flag does not exist in mainline binutils? There is
> > > > > a thread in 2010 about this that Segher commented on:
> > > > >
> > > > > https://lore.kernel.org/linuxppc-dev/9859E645-954D-4D07-8003-FFCD2391AB6E...
> > > > >
> > > > > Guess this config should be eliminated?
> > >
> > > The help text for this config options says that e200 is used in 55xx,
> > > and there *is* an -me5500 GAS flag (which probably does this same
> > > thing, too). But is any of this tested, or useful, or wanted?
> > >
> > > Maybe Christophe knows, cc:ed.
> >
> > CC Alan Modra, a binutils global maintainer.
> >
> > Alan, can the few -Wa,-m* options deleted from arch/powerpc/Makefile ?
>
> All the others work fine (and are needed afaics), it is only -me200 that
> doesn't exist (in mainline binutils).
Right, and a quick check says it never existed. There is e200z4,
added to binutils with dfdaec14b0d, 2016-08-01, but the kernel -me200
was added in 2005. I suspect the toolchain support only existed
inside Freescale and pushing it upstream was too difficult.
--
Alan Modra
Australia Development Lab, IBM
1 year, 10 months
Re: [PATCH] Fix warning for static const char * array in audio_manager_module.c
by kernel test robot
Hi Emmanouil,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on staging/staging-testing]
[also build test ERROR on v5.10-rc4 next-20201116]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Emmanouil-Perselis/Fix-warning-f...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 0d79a48440f559ac939d1be2089757c5e4ab16c7
config: microblaze-randconfig-r011-20201116 (attached as .config)
compiler: microblaze-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/0day-ci/linux/commit/69022592162daaee87b29588cd562da44...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Emmanouil-Perselis/Fix-warning-for-static-const-char-array-in-audio_manager_module-c/20201117-044852
git checkout 69022592162daaee87b29588cd562da4439f0517
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=microblaze
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/staging/greybus/audio_manager_module.c: In function 'send_add_uevent':
>> drivers/staging/greybus/audio_manager_module.c:162:3: error: initializer element is not constant
162 | name_string,
| ^~~~~~~~~~~
drivers/staging/greybus/audio_manager_module.c:162:3: note: (near initialization for 'envp[0]')
drivers/staging/greybus/audio_manager_module.c:163:3: error: initializer element is not constant
163 | vid_string,
| ^~~~~~~~~~
drivers/staging/greybus/audio_manager_module.c:163:3: note: (near initialization for 'envp[1]')
drivers/staging/greybus/audio_manager_module.c:164:3: error: initializer element is not constant
164 | pid_string,
| ^~~~~~~~~~
drivers/staging/greybus/audio_manager_module.c:164:3: note: (near initialization for 'envp[2]')
drivers/staging/greybus/audio_manager_module.c:165:3: error: initializer element is not constant
165 | intf_id_string,
| ^~~~~~~~~~~~~~
drivers/staging/greybus/audio_manager_module.c:165:3: note: (near initialization for 'envp[3]')
drivers/staging/greybus/audio_manager_module.c:166:3: error: initializer element is not constant
166 | ip_devices_string,
| ^~~~~~~~~~~~~~~~~
drivers/staging/greybus/audio_manager_module.c:166:3: note: (near initialization for 'envp[4]')
drivers/staging/greybus/audio_manager_module.c:167:3: error: initializer element is not constant
167 | op_devices_string,
| ^~~~~~~~~~~~~~~~~
drivers/staging/greybus/audio_manager_module.c:167:3: note: (near initialization for 'envp[5]')
>> drivers/staging/greybus/audio_manager_module.c:180:46: error: passing argument 3 of 'kobject_uevent_env' from incompatible pointer type [-Werror=incompatible-pointer-types]
180 | kobject_uevent_env(&module->kobj, KOBJ_ADD, envp);
| ^~~~
| |
| const char * const*
In file included from drivers/staging/greybus/audio_manager.h:11,
from drivers/staging/greybus/audio_manager_module.c:10:
include/linux/kobject.h:241:10: note: expected 'char **' but argument is of type 'const char * const*'
241 | char *envp[]);
| ~~~~~~^~~~~~
cc1: some warnings being treated as errors
vim +162 drivers/staging/greybus/audio_manager_module.c
8db00736d365b75 Svetlin Ankov 2016-01-13 151
8db00736d365b75 Svetlin Ankov 2016-01-13 152 static void send_add_uevent(struct gb_audio_manager_module *module)
8db00736d365b75 Svetlin Ankov 2016-01-13 153 {
8db00736d365b75 Svetlin Ankov 2016-01-13 154 char name_string[128];
8db00736d365b75 Svetlin Ankov 2016-01-13 155 char vid_string[64];
8db00736d365b75 Svetlin Ankov 2016-01-13 156 char pid_string[64];
d0af1bd5f6f4497 Pankaj Bharadiya 2016-10-16 157 char intf_id_string[64];
a9234bfd6cec442 Vaibhav Agarwal 2016-03-30 158 char ip_devices_string[64];
a9234bfd6cec442 Vaibhav Agarwal 2016-03-30 159 char op_devices_string[64];
8db00736d365b75 Svetlin Ankov 2016-01-13 160
69022592162daae Emmanouil Perselis 2020-11-16 161 static const char * const envp[] = {
8db00736d365b75 Svetlin Ankov 2016-01-13 @162 name_string,
8db00736d365b75 Svetlin Ankov 2016-01-13 163 vid_string,
8db00736d365b75 Svetlin Ankov 2016-01-13 164 pid_string,
d0af1bd5f6f4497 Pankaj Bharadiya 2016-10-16 @165 intf_id_string,
a9234bfd6cec442 Vaibhav Agarwal 2016-03-30 166 ip_devices_string,
a9234bfd6cec442 Vaibhav Agarwal 2016-03-30 167 op_devices_string,
8db00736d365b75 Svetlin Ankov 2016-01-13 168 NULL
8db00736d365b75 Svetlin Ankov 2016-01-13 169 };
8db00736d365b75 Svetlin Ankov 2016-01-13 170
8db00736d365b75 Svetlin Ankov 2016-01-13 171 snprintf(name_string, 128, "NAME=%s", module->desc.name);
8db00736d365b75 Svetlin Ankov 2016-01-13 172 snprintf(vid_string, 64, "VID=%d", module->desc.vid);
8db00736d365b75 Svetlin Ankov 2016-01-13 173 snprintf(pid_string, 64, "PID=%d", module->desc.pid);
d0af1bd5f6f4497 Pankaj Bharadiya 2016-10-16 174 snprintf(intf_id_string, 64, "INTF_ID=%d", module->desc.intf_id);
a9234bfd6cec442 Vaibhav Agarwal 2016-03-30 175 snprintf(ip_devices_string, 64, "I/P DEVICES=0x%X",
a9234bfd6cec442 Vaibhav Agarwal 2016-03-30 176 module->desc.ip_devices);
a9234bfd6cec442 Vaibhav Agarwal 2016-03-30 177 snprintf(op_devices_string, 64, "O/P DEVICES=0x%X",
a9234bfd6cec442 Vaibhav Agarwal 2016-03-30 178 module->desc.op_devices);
8db00736d365b75 Svetlin Ankov 2016-01-13 179
8db00736d365b75 Svetlin Ankov 2016-01-13 @180 kobject_uevent_env(&module->kobj, KOBJ_ADD, envp);
8db00736d365b75 Svetlin Ankov 2016-01-13 181 }
8db00736d365b75 Svetlin Ankov 2016-01-13 182
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
Re: [PATCH v2] gpio: mxc: Remove unused .id_table support
by kernel test robot
Hi Fabio,
I love your patch! Perhaps something to improve:
[auto build test WARNING on gpio/for-next]
[also build test WARNING on v5.10-rc4 next-20201116]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Fabio-Estevam/gpio-mxc-Remove-un...
base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git for-next
config: powerpc-randconfig-r015-20201116 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c044709b8fbea2a9a375e4173a6bd735f6866c0c)
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
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://github.com/0day-ci/linux/commit/a6943017beed6fb9b48fc297c02ac3f0f...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Fabio-Estevam/gpio-mxc-Remove-unused-id_table-support/20201117-015424
git checkout a6943017beed6fb9b48fc297c02ac3f0f4e680cb
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/gpio/gpio-mxc.c:361:32: warning: cast to smaller integer type 'enum mxc_gpio_hwtype' from 'const void *' [-Wvoid-pointer-to-enum-cast]
enum mxc_gpio_hwtype hwtype = (enum mxc_gpio_hwtype)of_id->data;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +361 drivers/gpio/gpio-mxc.c
356
357 static void mxc_gpio_get_hw(struct platform_device *pdev)
358 {
359 const struct of_device_id *of_id =
360 of_match_device(mxc_gpio_dt_ids, &pdev->dev);
> 361 enum mxc_gpio_hwtype hwtype = (enum mxc_gpio_hwtype)of_id->data;
362
363 if (mxc_gpio_hwtype) {
364 /*
365 * The driver works with a reasonable presupposition,
366 * that is all gpio ports must be the same type when
367 * running on one soc.
368 */
369 BUG_ON(mxc_gpio_hwtype != hwtype);
370 return;
371 }
372
373 if (hwtype == IMX35_GPIO)
374 mxc_gpio_hwdata = &imx35_gpio_hwdata;
375 else if (hwtype == IMX31_GPIO)
376 mxc_gpio_hwdata = &imx31_gpio_hwdata;
377 else
378 mxc_gpio_hwdata = &imx1_imx21_gpio_hwdata;
379
380 mxc_gpio_hwtype = hwtype;
381 }
382
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
Re: Error: invalid switch -me200
by Scott Wood
On Fri, 2020-11-13 at 18:50 -0600, Segher Boessenkool wrote:
> On Fri, Nov 13, 2020 at 04:37:38PM -0800, Fāng-ruì Sòng wrote:
> > On Fri, Nov 13, 2020 at 4:23 PM Segher Boessenkool
> > <segher(a)kernel.crashing.org> wrote:
> > > On Fri, Nov 13, 2020 at 12:14:18PM -0800, Nick Desaulniers wrote:
> > > > > > > Error: invalid switch -me200
> > > > > > > Error: unrecognized option -me200
> > > > > >
> > > > > > 251 cpu-as-$(CONFIG_E200) += -Wa,-me200
> > > > > >
> > > > > > Are those all broken configs, or is Kconfig messed up such that
> > > > > > randconfig can select these when it should not?
> > > > >
> > > > > Hmmm, looks like this flag does not exist in mainline binutils?
> > > > > There is
> > > > > a thread in 2010 about this that Segher commented on:
> > > > >
> > > > >
https://lore.kernel.org/linuxppc-dev/9859E645-954D-4D07-8003-FFCD2391AB6E...
> > > > >
> > > > > Guess this config should be eliminated?
> > >
> > > The help text for this config options says that e200 is used in 55xx,
> > > and there *is* an -me5500 GAS flag (which probably does this same
> > > thing, too). But is any of this tested, or useful, or wanted?
> > >
> > > Maybe Christophe knows, cc:ed.
> >
> > CC Alan Modra, a binutils global maintainer.
> >
> > Alan, can the few -Wa,-m* options deleted from arch/powerpc/Makefile ?
>
> All the others work fine (and are needed afaics), it is only -me200 that
> doesn't exist (in mainline binutils). Perhaps -me5500 will work for it
> instead.
According to Wikipedia e200 is from mpc55xx (for which I don't see any
platform support having ever been added). e5500 is completely different (64-
bit version of e500mc).
-Scott
1 year, 10 months
Re: [RFC][PATCH v2 19/21] x86/pti: Defer CR3 switch to C code for IST entries
by kernel test robot
Hi Alexandre,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on tip/x86/mm]
[also build test WARNING on v5.10-rc4]
[cannot apply to tip/x86/core tip/x86/asm next-20201116]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Alexandre-Chartre/x86-pti-Defer-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 1fcd009102ee02e217f2e7635ab65517d785da8e
config: i386-randconfig-a012-20201115 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/8fa40c99f8d79767c2e49a4899ccf6bd1...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Alexandre-Chartre/x86-pti-Defer-CR3-switch-to-C-code/20201116-225620
git checkout 8fa40c99f8d79767c2e49a4899ccf6bd11f65532
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/x86/include/asm/cpufeature.h:5,
from arch/x86/include/asm/thread_info.h:53,
from include/linux/thread_info.h:38,
from arch/x86/include/asm/preempt.h:7,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/context_tracking.h:5,
from arch/x86/kernel/traps.c:15:
arch/x86/include/asm/idtentry.h: In function 'pti_kernel_stack':
arch/x86/include/asm/processor.h:773:53: error: 'KERNEL_STACK_SIZE' undeclared (first use in this function); did you mean 'KERNEL_IMAGE_SIZE'?
773 | ((void *)(((unsigned long)task_stack_page(task)) + KERNEL_STACK_SIZE))
| ^~~~~~~~~~~~~~~~~
arch/x86/include/asm/idtentry.h:52:26: note: in expansion of macro 'task_top_of_kernel_stack'
52 | stack = (unsigned long)task_top_of_kernel_stack(current);
| ^~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/processor.h:773:53: note: each undeclared identifier is reported only once for each function it appears in
773 | ((void *)(((unsigned long)task_stack_page(task)) + KERNEL_STACK_SIZE))
| ^~~~~~~~~~~~~~~~~
arch/x86/include/asm/idtentry.h:52:26: note: in expansion of macro 'task_top_of_kernel_stack'
52 | stack = (unsigned long)task_top_of_kernel_stack(current);
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/x86/include/asm/traps.h:9,
from arch/x86/kernel/traps.c:49:
arch/x86/include/asm/idtentry.h: In function 'run_idt':
arch/x86/include/asm/idtentry.h:24:3: error: implicit declaration of function 'asm_call_on_stack_1' [-Werror=implicit-function-declaration]
24 | asm_call_on_stack_1(stack, \
| ^~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/idtentry.h:66:2: note: in expansion of macro 'CALL_ON_STACK_1'
66 | CALL_ON_STACK_1(pti_kernel_stack(regs), func, regs);
| ^~~~~~~~~~~~~~~
arch/x86/include/asm/idtentry.h: In function 'run_idt_errcode':
arch/x86/include/asm/idtentry.h:30:3: error: implicit declaration of function 'asm_call_on_stack_2' [-Werror=implicit-function-declaration]
30 | asm_call_on_stack_2(stack, \
| ^~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/idtentry.h:73:2: note: in expansion of macro 'CALL_ON_STACK_2'
73 | CALL_ON_STACK_2(pti_kernel_stack(regs), func, regs, error_code);
| ^~~~~~~~~~~~~~~
arch/x86/include/asm/idtentry.h: In function 'run_idt_pagefault':
arch/x86/include/asm/idtentry.h:36:3: error: implicit declaration of function 'asm_call_on_stack_3' [-Werror=implicit-function-declaration]
36 | asm_call_on_stack_3(stack, \
| ^~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/idtentry.h:82:2: note: in expansion of macro 'CALL_ON_STACK_3'
82 | CALL_ON_STACK_3(pti_kernel_stack(regs),
| ^~~~~~~~~~~~~~~
arch/x86/kernel/traps.c: In function 'exc_double_fault':
>> arch/x86/kernel/traps.c:348:16: warning: variable 'saved_cr3' set but not used [-Wunused-but-set-variable]
348 | unsigned long saved_cr3;
| ^~~~~~~~~
cc1: some warnings being treated as errors
vim +/saved_cr3 +348 arch/x86/kernel/traps.c
324
325 /*
326 * Runs on an IST stack for x86_64 and on a special task stack for x86_32.
327 *
328 * On x86_64, this is more or less a normal kernel entry. Notwithstanding the
329 * SDM's warnings about double faults being unrecoverable, returning works as
330 * expected. Presumably what the SDM actually means is that the CPU may get
331 * the register state wrong on entry, so returning could be a bad idea.
332 *
333 * Various CPU engineers have promised that double faults due to an IRET fault
334 * while the stack is read-only are, in fact, recoverable.
335 *
336 * On x86_32, this is entered through a task gate, and regs are synthesized
337 * from the TSS. Returning is, in principle, okay, but changes to regs will
338 * be lost. If, for some reason, we need to return to a context with modified
339 * regs, the shim code could be adjusted to synchronize the registers.
340 *
341 * The 32bit #DF shim provides CR2 already as an argument. On 64bit it needs
342 * to be read before doing anything else.
343 */
344 DEFINE_IDTENTRY_DF(exc_double_fault)
345 {
346 static const char str[] = "double fault";
347 struct task_struct *tsk;
> 348 unsigned long saved_cr3;
349 #ifdef CONFIG_VMAP_STACK
350 unsigned long address;
351 #endif
352
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months