* [leon-rdma:dmabuf-vfio 11/16] drivers/pci/p2pdma.c:977:28: warning: declaration of 'struct pci_Dev' will not be visible outside of this function
@ 2025-07-10 9:44 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-07-10 9:44 UTC (permalink / raw)
To: Leon Romanovsky; +Cc: oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git dmabuf-vfio
head: 76398694a39d0be3b1e8a107e4dd025cfd1448fd
commit: 07f78ef067ca643ea92cf0c95e25cd3c40420b03 [11/16] PCI/P2PDMA: Move to higher level PCI device pointer calculation
config: loongarch-allyesconfig (https://download.01.org/0day-ci/archive/20250710/202507101704.aThdDBSt-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project 01c97b4953e87ae455bd4c41e3de3f0f0f29c61c)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250710/202507101704.aThdDBSt-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202507101704.aThdDBSt-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/pci/p2pdma.c:977:28: warning: declaration of 'struct pci_Dev' will not be visible outside of this function [-Wvisibility]
977 | pci_p2pdma_map_type(struct pci_Dev *pdev, struct pci_dev *client)
| ^
drivers/pci/p2pdma.c:984:31: error: incomplete definition of type 'struct pci_Dev'
984 | p2pdma = rcu_dereference(pdev->p2pdma);
| ~~~~^
drivers/pci/p2pdma.c:977:28: note: forward declaration of 'struct pci_Dev'
977 | pci_p2pdma_map_type(struct pci_Dev *pdev, struct pci_dev *client)
| ^
drivers/pci/p2pdma.c:984:31: error: incomplete definition of type 'struct pci_Dev'
984 | p2pdma = rcu_dereference(pdev->p2pdma);
| ~~~~^
drivers/pci/p2pdma.c:977:28: note: forward declaration of 'struct pci_Dev'
977 | pci_p2pdma_map_type(struct pci_Dev *pdev, struct pci_dev *client)
| ^
drivers/pci/p2pdma.c:984:31: error: incomplete definition of type 'struct pci_Dev'
984 | p2pdma = rcu_dereference(pdev->p2pdma);
| ~~~~^
drivers/pci/p2pdma.c:977:28: note: forward declaration of 'struct pci_Dev'
977 | pci_p2pdma_map_type(struct pci_Dev *pdev, struct pci_dev *client)
| ^
drivers/pci/p2pdma.c:984:31: error: incomplete definition of type 'struct pci_Dev'
984 | p2pdma = rcu_dereference(pdev->p2pdma);
| ~~~~^
drivers/pci/p2pdma.c:977:28: note: forward declaration of 'struct pci_Dev'
977 | pci_p2pdma_map_type(struct pci_Dev *pdev, struct pci_dev *client)
| ^
drivers/pci/p2pdma.c:984:31: error: incomplete definition of type 'struct pci_Dev'
984 | p2pdma = rcu_dereference(pdev->p2pdma);
| ~~~~^
drivers/pci/p2pdma.c:977:28: note: forward declaration of 'struct pci_Dev'
977 | pci_p2pdma_map_type(struct pci_Dev *pdev, struct pci_dev *client)
| ^
drivers/pci/p2pdma.c:984:31: error: incomplete definition of type 'struct pci_Dev'
984 | p2pdma = rcu_dereference(pdev->p2pdma);
| ~~~~^
drivers/pci/p2pdma.c:977:28: note: forward declaration of 'struct pci_Dev'
977 | pci_p2pdma_map_type(struct pci_Dev *pdev, struct pci_dev *client)
| ^
drivers/pci/p2pdma.c:984:31: error: incomplete definition of type 'struct pci_Dev'
984 | p2pdma = rcu_dereference(pdev->p2pdma);
| ~~~~^
drivers/pci/p2pdma.c:977:28: note: forward declaration of 'struct pci_Dev'
977 | pci_p2pdma_map_type(struct pci_Dev *pdev, struct pci_dev *client)
| ^
drivers/pci/p2pdma.c:984:31: error: incomplete definition of type 'struct pci_Dev'
984 | p2pdma = rcu_dereference(pdev->p2pdma);
| ~~~~^
drivers/pci/p2pdma.c:977:28: note: forward declaration of 'struct pci_Dev'
977 | pci_p2pdma_map_type(struct pci_Dev *pdev, struct pci_dev *client)
| ^
drivers/pci/p2pdma.c:984:31: error: incomplete definition of type 'struct pci_Dev'
984 | p2pdma = rcu_dereference(pdev->p2pdma);
| ~~~~^
drivers/pci/p2pdma.c:977:28: note: forward declaration of 'struct pci_Dev'
977 | pci_p2pdma_map_type(struct pci_Dev *pdev, struct pci_dev *client)
| ^
drivers/pci/p2pdma.c:984:31: error: incomplete definition of type 'struct pci_Dev'
984 | p2pdma = rcu_dereference(pdev->p2pdma);
| ~~~~^
drivers/pci/p2pdma.c:977:28: note: forward declaration of 'struct pci_Dev'
977 | pci_p2pdma_map_type(struct pci_Dev *pdev, struct pci_dev *client)
| ^
drivers/pci/p2pdma.c:984:31: error: incomplete definition of type 'struct pci_Dev'
984 | p2pdma = rcu_dereference(pdev->p2pdma);
| ~~~~^
drivers/pci/p2pdma.c:977:28: note: forward declaration of 'struct pci_Dev'
977 | pci_p2pdma_map_type(struct pci_Dev *pdev, struct pci_dev *client)
| ^
drivers/pci/p2pdma.c:992:33: error: incompatible pointer types passing 'struct pci_Dev *' to parameter of type 'struct pci_dev *' [-Werror,-Wincompatible-pointer-types]
992 | return calc_map_type_and_dist(pdev, client, &dist, true);
| ^~~~
drivers/pci/p2pdma.c:584:40: note: passing argument to parameter 'provider' here
584 | calc_map_type_and_dist(struct pci_dev *provider, struct pci_dev *client,
| ^
drivers/pci/p2pdma.c:1002:18: error: redefinition of 'client'
1002 | struct pci_dev *client;
| ^
drivers/pci/p2pdma.c:998:27: note: previous definition is here
998 | struct pci_dev *client, struct page *page)
| ^
drivers/pci/p2pdma.c:1010:35: error: incompatible pointer types passing 'struct pci_dev *' to parameter of type 'struct pci_Dev *' [-Werror,-Wincompatible-pointer-types]
1010 | state->map = pci_p2pdma_map_type(pdev, client);
| ^~~~
drivers/pci/p2pdma.c:977:37: note: passing argument to parameter 'pdev' here
977 | pci_p2pdma_map_type(struct pci_Dev *pdev, struct pci_dev *client)
| ^
1 warning and 14 errors generated.
vim +977 drivers/pci/p2pdma.c
975
976 static enum pci_p2pdma_map_type
> 977 pci_p2pdma_map_type(struct pci_Dev *pdev, struct pci_dev *client)
978 {
979 enum pci_p2pdma_map_type type = PCI_P2PDMA_MAP_NOT_SUPPORTED;
980 struct pci_p2pdma *p2pdma;
981 int dist;
982
983 rcu_read_lock();
984 p2pdma = rcu_dereference(pdev->p2pdma);
985
986 if (p2pdma)
987 type = xa_to_value(xa_load(&p2pdma->map_types,
988 map_types_idx(client)));
989 rcu_read_unlock();
990
991 if (type == PCI_P2PDMA_MAP_UNKNOWN)
992 return calc_map_type_and_dist(pdev, client, &dist, true);
993
994 return type;
995 }
996
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-07-10 9:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-10 9:44 [leon-rdma:dmabuf-vfio 11/16] drivers/pci/p2pdma.c:977:28: warning: declaration of 'struct pci_Dev' will not be visible outside of this function 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.