From: kernel test robot <lkp@intel.com>
To: Leon Romanovsky <leonro@nvidia.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [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
Date: Thu, 10 Jul 2025 17:44:29 +0800 [thread overview]
Message-ID: <202507101704.aThdDBSt-lkp@intel.com> (raw)
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
reply other threads:[~2025-07-10 9:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202507101704.aThdDBSt-lkp@intel.com \
--to=lkp@intel.com \
--cc=leonro@nvidia.com \
--cc=oe-kbuild-all@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.