* [linux-next:master 11398/13550] samples/vfio-mdev/mtty.c:742 mtty_probe() warn: '&mdev_state->next' not removed from list
@ 2021-06-27 13:48 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-06-27 13:48 UTC (permalink / raw
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 4309 bytes --]
CC: kbuild-all(a)lists.01.org
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: Jason Gunthorpe <jgg@nvidia.com>
CC: Alex Williamson <alex.williamson@redhat.com>
CC: Christoph Hellwig <hch@lst.de>
CC: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
CC: Kirti Wankhede <kwankhede@nvidia.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 8702f95941c215501826ea8743a8b64b83479209
commit: 09177ac9192198bec24a81c822ebeef4197c3c8b [11398/13550] vfio/mtty: Convert to use vfio_register_group_dev()
:::::: branch date: 2 days ago
:::::: commit date: 6 days ago
config: i386-randconfig-m021-20210627 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
samples/vfio-mdev/mtty.c:742 mtty_probe() warn: '&mdev_state->next' not removed from list
vim +742 samples/vfio-mdev/mtty.c
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 706
09177ac9192198 Jason Gunthorpe 2021-06-17 707 static int mtty_probe(struct mdev_device *mdev)
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 708 {
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 709 struct mdev_state *mdev_state;
c594b26ff78e2c Jason Gunthorpe 2021-04-06 710 int nr_ports = mdev_get_type_group_id(mdev) + 1;
09177ac9192198 Jason Gunthorpe 2021-06-17 711 int ret;
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 712
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 713 mdev_state = kzalloc(sizeof(struct mdev_state), GFP_KERNEL);
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 714 if (mdev_state == NULL)
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 715 return -ENOMEM;
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 716
09177ac9192198 Jason Gunthorpe 2021-06-17 717 vfio_init_group_dev(&mdev_state->vdev, &mdev->dev, &mtty_dev_ops);
09177ac9192198 Jason Gunthorpe 2021-06-17 718
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 719 mdev_state->nr_ports = nr_ports;
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 720 mdev_state->irq_index = -1;
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 721 mdev_state->s[0].max_fifo_size = MAX_FIFO_SIZE;
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 722 mdev_state->s[1].max_fifo_size = MAX_FIFO_SIZE;
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 723 mutex_init(&mdev_state->rxtx_lock);
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 724 mdev_state->vconfig = kzalloc(MTTY_CONFIG_SPACE_SIZE, GFP_KERNEL);
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 725
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 726 if (mdev_state->vconfig == NULL) {
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 727 kfree(mdev_state);
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 728 return -ENOMEM;
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 729 }
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 730
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 731 mutex_init(&mdev_state->ops_lock);
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 732 mdev_state->mdev = mdev;
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 733
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 734 mtty_create_config_space(mdev_state);
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 735
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 736 mutex_lock(&mdev_list_lock);
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 737 list_add(&mdev_state->next, &mdev_devices_list);
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 738 mutex_unlock(&mdev_list_lock);
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 739
09177ac9192198 Jason Gunthorpe 2021-06-17 740 ret = vfio_register_group_dev(&mdev_state->vdev);
09177ac9192198 Jason Gunthorpe 2021-06-17 741 if (ret) {
09177ac9192198 Jason Gunthorpe 2021-06-17 @742 kfree(mdev_state);
09177ac9192198 Jason Gunthorpe 2021-06-17 743 return ret;
09177ac9192198 Jason Gunthorpe 2021-06-17 744 }
09177ac9192198 Jason Gunthorpe 2021-06-17 745 dev_set_drvdata(&mdev->dev, mdev_state);
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 746 return 0;
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 747 }
9d1a546c53b4c1 Kirti Wankhede 2016-11-17 748
---
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: 38516 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-27 13:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-27 13:48 [linux-next:master 11398/13550] samples/vfio-mdev/mtty.c:742 mtty_probe() warn: '&mdev_state->next' not removed from list 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.