From: kernel test robot <lkp@intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org
Subject: Re: [PATCH v1 1/1] serial: 8250_exar: derive nr_ports from ID for Acces I/O cards
Date: Thu, 23 Dec 2021 07:25:39 +0800 [thread overview]
Message-ID: <202112230724.7vFjZf3K-lkp@intel.com> (raw)
In-Reply-To: <20211222194413.75069-1-andriy.shevchenko@linux.intel.com>
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on tty/tty-testing]
[also build test ERROR on v5.16-rc6 next-20211222]
[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/Andy-Shevchenko/serial-8250_exar-derive-nr_ports-from-ID-for-Acces-I-O-cards/20211223-034500
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
config: riscv-randconfig-r042-20211222 (https://download.01.org/0day-ci/archive/20211223/202112230724.7vFjZf3K-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project de4e0195ae1c39f1c3b07834b8e32c113f4f20eb)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/533949cbef2191c3b9dd62584b56648987bc1e5b
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Andy-Shevchenko/serial-8250_exar-derive-nr_ports-from-ID-for-Acces-I-O-cards/20211223-034500
git checkout 533949cbef2191c3b9dd62584b56648987bc1e5b
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/tty/serial/8250/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/tty/serial/8250/8250_exar.c:627:3: error: use of undeclared identifier 'nr'
nr = BIT(((pcidev->device & 0x38) >> 3) - 1);
^
1 error generated.
vim +/nr +627 drivers/tty/serial/8250/8250_exar.c
606
607 static int
608 exar_pci_probe(struct pci_dev *pcidev, const struct pci_device_id *ent)
609 {
610 unsigned int nr_ports, i, bar = 0, maxnr;
611 struct exar8250_board *board;
612 struct uart_8250_port uart;
613 struct exar8250 *priv;
614 int rc;
615
616 board = (struct exar8250_board *)ent->driver_data;
617 if (!board)
618 return -EINVAL;
619
620 rc = pcim_enable_device(pcidev);
621 if (rc)
622 return rc;
623
624 maxnr = pci_resource_len(pcidev, bar) >> (board->reg_shift + 3);
625
626 if (pcidev->vendor == PCI_VENDOR_ID_ACCESSIO)
> 627 nr = BIT(((pcidev->device & 0x38) >> 3) - 1);
628 else if (board->num_ports)
629 nr_ports = board->num_ports;
630 else
631 nr_ports = pcidev->device & 0x0f;
632
633 priv = devm_kzalloc(&pcidev->dev, struct_size(priv, line, nr_ports), GFP_KERNEL);
634 if (!priv)
635 return -ENOMEM;
636
637 priv->board = board;
638 priv->virt = pcim_iomap(pcidev, bar, 0);
639 if (!priv->virt)
640 return -ENOMEM;
641
642 pci_set_master(pcidev);
643
644 rc = pci_alloc_irq_vectors(pcidev, 1, 1, PCI_IRQ_ALL_TYPES);
645 if (rc < 0)
646 return rc;
647
648 memset(&uart, 0, sizeof(uart));
649 uart.port.flags = UPF_SHARE_IRQ | UPF_EXAR_EFR | UPF_FIXED_TYPE | UPF_FIXED_PORT;
650 uart.port.irq = pci_irq_vector(pcidev, 0);
651 uart.port.dev = &pcidev->dev;
652
653 rc = devm_request_irq(&pcidev->dev, uart.port.irq, exar_misc_handler,
654 IRQF_SHARED, "exar_uart", priv);
655 if (rc)
656 return rc;
657
658 /* Clear interrupts */
659 exar_misc_clear(priv);
660
661 for (i = 0; i < nr_ports && i < maxnr; i++) {
662 rc = board->setup(priv, pcidev, &uart, i);
663 if (rc) {
664 dev_err(&pcidev->dev, "Failed to setup port %u\n", i);
665 break;
666 }
667
668 dev_dbg(&pcidev->dev, "Setup PCI port: port %lx, irq %d, type %d\n",
669 uart.port.iobase, uart.port.irq, uart.port.iotype);
670
671 priv->line[i] = serial8250_register_8250_port(&uart);
672 if (priv->line[i] < 0) {
673 dev_err(&pcidev->dev,
674 "Couldn't register serial port %lx, irq %d, type %d, error %d\n",
675 uart.port.iobase, uart.port.irq,
676 uart.port.iotype, priv->line[i]);
677 break;
678 }
679 }
680 priv->nr = i;
681 pci_set_drvdata(pcidev, priv);
682 return 0;
683 }
684
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v1 1/1] serial: 8250_exar: derive nr_ports from ID for Acces I/O cards
Date: Thu, 23 Dec 2021 07:25:39 +0800 [thread overview]
Message-ID: <202112230724.7vFjZf3K-lkp@intel.com> (raw)
In-Reply-To: <20211222194413.75069-1-andriy.shevchenko@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 4814 bytes --]
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on tty/tty-testing]
[also build test ERROR on v5.16-rc6 next-20211222]
[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/Andy-Shevchenko/serial-8250_exar-derive-nr_ports-from-ID-for-Acces-I-O-cards/20211223-034500
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
config: riscv-randconfig-r042-20211222 (https://download.01.org/0day-ci/archive/20211223/202112230724.7vFjZf3K-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project de4e0195ae1c39f1c3b07834b8e32c113f4f20eb)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/533949cbef2191c3b9dd62584b56648987bc1e5b
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Andy-Shevchenko/serial-8250_exar-derive-nr_ports-from-ID-for-Acces-I-O-cards/20211223-034500
git checkout 533949cbef2191c3b9dd62584b56648987bc1e5b
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/tty/serial/8250/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/tty/serial/8250/8250_exar.c:627:3: error: use of undeclared identifier 'nr'
nr = BIT(((pcidev->device & 0x38) >> 3) - 1);
^
1 error generated.
vim +/nr +627 drivers/tty/serial/8250/8250_exar.c
606
607 static int
608 exar_pci_probe(struct pci_dev *pcidev, const struct pci_device_id *ent)
609 {
610 unsigned int nr_ports, i, bar = 0, maxnr;
611 struct exar8250_board *board;
612 struct uart_8250_port uart;
613 struct exar8250 *priv;
614 int rc;
615
616 board = (struct exar8250_board *)ent->driver_data;
617 if (!board)
618 return -EINVAL;
619
620 rc = pcim_enable_device(pcidev);
621 if (rc)
622 return rc;
623
624 maxnr = pci_resource_len(pcidev, bar) >> (board->reg_shift + 3);
625
626 if (pcidev->vendor == PCI_VENDOR_ID_ACCESSIO)
> 627 nr = BIT(((pcidev->device & 0x38) >> 3) - 1);
628 else if (board->num_ports)
629 nr_ports = board->num_ports;
630 else
631 nr_ports = pcidev->device & 0x0f;
632
633 priv = devm_kzalloc(&pcidev->dev, struct_size(priv, line, nr_ports), GFP_KERNEL);
634 if (!priv)
635 return -ENOMEM;
636
637 priv->board = board;
638 priv->virt = pcim_iomap(pcidev, bar, 0);
639 if (!priv->virt)
640 return -ENOMEM;
641
642 pci_set_master(pcidev);
643
644 rc = pci_alloc_irq_vectors(pcidev, 1, 1, PCI_IRQ_ALL_TYPES);
645 if (rc < 0)
646 return rc;
647
648 memset(&uart, 0, sizeof(uart));
649 uart.port.flags = UPF_SHARE_IRQ | UPF_EXAR_EFR | UPF_FIXED_TYPE | UPF_FIXED_PORT;
650 uart.port.irq = pci_irq_vector(pcidev, 0);
651 uart.port.dev = &pcidev->dev;
652
653 rc = devm_request_irq(&pcidev->dev, uart.port.irq, exar_misc_handler,
654 IRQF_SHARED, "exar_uart", priv);
655 if (rc)
656 return rc;
657
658 /* Clear interrupts */
659 exar_misc_clear(priv);
660
661 for (i = 0; i < nr_ports && i < maxnr; i++) {
662 rc = board->setup(priv, pcidev, &uart, i);
663 if (rc) {
664 dev_err(&pcidev->dev, "Failed to setup port %u\n", i);
665 break;
666 }
667
668 dev_dbg(&pcidev->dev, "Setup PCI port: port %lx, irq %d, type %d\n",
669 uart.port.iobase, uart.port.irq, uart.port.iotype);
670
671 priv->line[i] = serial8250_register_8250_port(&uart);
672 if (priv->line[i] < 0) {
673 dev_err(&pcidev->dev,
674 "Couldn't register serial port %lx, irq %d, type %d, error %d\n",
675 uart.port.iobase, uart.port.irq,
676 uart.port.iotype, priv->line[i]);
677 break;
678 }
679 }
680 priv->nr = i;
681 pci_set_drvdata(pcidev, priv);
682 return 0;
683 }
684
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
next prev parent reply other threads:[~2021-12-22 23:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-22 19:44 [PATCH v1 1/1] serial: 8250_exar: derive nr_ports from ID for Acces I/O cards Andy Shevchenko
2021-12-22 23:25 ` kernel test robot [this message]
2021-12-22 23:25 ` kernel test robot
2021-12-23 10:05 ` Ilpo Järvinen
2021-12-23 10:18 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202112230724.7vFjZf3K-lkp@intel.com \
--to=lkp@intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=kbuild-all@lists.01.org \
--cc=llvm@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.