All of lore.kernel.org
 help / color / mirror / Atom feed
* [p2pmem:p2pdma_map_ops_v2+user 14/27] include/linux/pci-p2pdma.h:122:40: warning: 'pci_p2pdma_map_segment' used but never defined
@ 2021-05-08  1:09 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-05-08  1:09 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 11705 bytes --]

tree:   https://github.com/sbates130272/linux-p2pmem.git p2pdma_map_ops_v2+user
head:   a75ce0c517e52d783d8e9f8a71cf154e0b6dbc8c
commit: 9a0ee6b46315065601c9a05d30ca36cec2d54a44 [14/27] dma-direct: Support PCI P2PDMA pages in dma-direct map_sg
config: nios2-randconfig-s031-20210508 (attached as .config)
compiler: nios2-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-341-g8af24329-dirty
        # https://github.com/sbates130272/linux-p2pmem/commit/9a0ee6b46315065601c9a05d30ca36cec2d54a44
        git remote add p2pmem https://github.com/sbates130272/linux-p2pmem.git
        git fetch --no-tags p2pmem p2pdma_map_ops_v2+user
        git checkout 9a0ee6b46315065601c9a05d30ca36cec2d54a44
        # 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__' W=1 ARCH=nios2 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from kernel/dma/direct.c:16:
   include/linux/pci-p2pdma.h:125:1: error: expected identifier or '(' before '{' token
     125 | {
         | ^
>> include/linux/pci-p2pdma.h:122:40: warning: 'pci_p2pdma_map_segment' used but never defined
     122 | static inline enum pci_p2pdma_map_type pci_p2pdma_map_segment(
         |                                        ^~~~~~~~~~~~~~~~~~~~~~

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for SERIAL_CORE_CONSOLE
   Depends on TTY && HAS_IOMEM
   Selected by
   - EARLY_PRINTK


vim +/pci_p2pdma_map_segment +122 include/linux/pci-p2pdma.h

892769aeb9761e Logan Gunthorpe 2021-03-17   31  
52916982af48d9 Logan Gunthorpe 2018-10-04   32  #ifdef CONFIG_PCI_P2PDMA
52916982af48d9 Logan Gunthorpe 2018-10-04   33  int pci_p2pdma_add_resource(struct pci_dev *pdev, int bar, size_t size,
52916982af48d9 Logan Gunthorpe 2018-10-04   34  		u64 offset);
52916982af48d9 Logan Gunthorpe 2018-10-04   35  int pci_p2pdma_distance_many(struct pci_dev *provider, struct device **clients,
52916982af48d9 Logan Gunthorpe 2018-10-04   36  			     int num_clients, bool verbose);
52916982af48d9 Logan Gunthorpe 2018-10-04   37  bool pci_has_p2pmem(struct pci_dev *pdev);
52916982af48d9 Logan Gunthorpe 2018-10-04   38  struct pci_dev *pci_p2pmem_find_many(struct device **clients, int num_clients);
52916982af48d9 Logan Gunthorpe 2018-10-04   39  void *pci_alloc_p2pmem(struct pci_dev *pdev, size_t size);
52916982af48d9 Logan Gunthorpe 2018-10-04   40  void pci_free_p2pmem(struct pci_dev *pdev, void *addr, size_t size);
52916982af48d9 Logan Gunthorpe 2018-10-04   41  pci_bus_addr_t pci_p2pmem_virt_to_bus(struct pci_dev *pdev, void *addr);
52916982af48d9 Logan Gunthorpe 2018-10-04   42  struct scatterlist *pci_p2pmem_alloc_sgl(struct pci_dev *pdev,
52916982af48d9 Logan Gunthorpe 2018-10-04   43  					 unsigned int *nents, u32 length);
52916982af48d9 Logan Gunthorpe 2018-10-04   44  void pci_p2pmem_free_sgl(struct pci_dev *pdev, struct scatterlist *sgl);
52916982af48d9 Logan Gunthorpe 2018-10-04   45  void pci_p2pmem_publish(struct pci_dev *pdev, bool publish);
892769aeb9761e Logan Gunthorpe 2021-03-17   46  enum pci_p2pdma_map_type pci_p2pdma_map_type(struct dev_pagemap *pgmap,
892769aeb9761e Logan Gunthorpe 2021-03-17   47  					     struct device *dev);
2b9f4bb2a4fb77 Logan Gunthorpe 2019-08-12   48  int pci_p2pdma_map_sg_attrs(struct device *dev, struct scatterlist *sg,
2b9f4bb2a4fb77 Logan Gunthorpe 2019-08-12   49  		int nents, enum dma_data_direction dir, unsigned long attrs);
7f73eac3a7137e Logan Gunthorpe 2019-08-12   50  void pci_p2pdma_unmap_sg_attrs(struct device *dev, struct scatterlist *sg,
7f73eac3a7137e Logan Gunthorpe 2019-08-12   51  		int nents, enum dma_data_direction dir, unsigned long attrs);
3b7b58fd026fb0 Logan Gunthorpe 2021-03-17   52  enum pci_p2pdma_map_type pci_p2pdma_map_segment(
3b7b58fd026fb0 Logan Gunthorpe 2021-03-17   53  		struct pci_p2pdma_map_state *state, struct device *dev,
3b7b58fd026fb0 Logan Gunthorpe 2021-03-17   54  		struct scatterlist *sg);
3b7b58fd026fb0 Logan Gunthorpe 2021-03-17   55  void pci_p2pdma_map_bus_segment(struct scatterlist *pg_sg,
3b7b58fd026fb0 Logan Gunthorpe 2021-03-17   56  				struct scatterlist *dma_sg);
2d7bc010f450d8 Logan Gunthorpe 2018-10-04   57  int pci_p2pdma_enable_store(const char *page, struct pci_dev **p2p_dev,
2d7bc010f450d8 Logan Gunthorpe 2018-10-04   58  			    bool *use_p2pdma);
2d7bc010f450d8 Logan Gunthorpe 2018-10-04   59  ssize_t pci_p2pdma_enable_show(char *page, struct pci_dev *p2p_dev,
2d7bc010f450d8 Logan Gunthorpe 2018-10-04   60  			       bool use_p2pdma);
52916982af48d9 Logan Gunthorpe 2018-10-04   61  #else /* CONFIG_PCI_P2PDMA */
52916982af48d9 Logan Gunthorpe 2018-10-04   62  static inline int pci_p2pdma_add_resource(struct pci_dev *pdev, int bar,
52916982af48d9 Logan Gunthorpe 2018-10-04   63  		size_t size, u64 offset)
52916982af48d9 Logan Gunthorpe 2018-10-04   64  {
52916982af48d9 Logan Gunthorpe 2018-10-04   65  	return -EOPNOTSUPP;
52916982af48d9 Logan Gunthorpe 2018-10-04   66  }
52916982af48d9 Logan Gunthorpe 2018-10-04   67  static inline int pci_p2pdma_distance_many(struct pci_dev *provider,
52916982af48d9 Logan Gunthorpe 2018-10-04   68  	struct device **clients, int num_clients, bool verbose)
52916982af48d9 Logan Gunthorpe 2018-10-04   69  {
52916982af48d9 Logan Gunthorpe 2018-10-04   70  	return -1;
52916982af48d9 Logan Gunthorpe 2018-10-04   71  }
52916982af48d9 Logan Gunthorpe 2018-10-04   72  static inline bool pci_has_p2pmem(struct pci_dev *pdev)
52916982af48d9 Logan Gunthorpe 2018-10-04   73  {
52916982af48d9 Logan Gunthorpe 2018-10-04   74  	return false;
52916982af48d9 Logan Gunthorpe 2018-10-04   75  }
52916982af48d9 Logan Gunthorpe 2018-10-04   76  static inline struct pci_dev *pci_p2pmem_find_many(struct device **clients,
52916982af48d9 Logan Gunthorpe 2018-10-04   77  						   int num_clients)
52916982af48d9 Logan Gunthorpe 2018-10-04   78  {
52916982af48d9 Logan Gunthorpe 2018-10-04   79  	return NULL;
52916982af48d9 Logan Gunthorpe 2018-10-04   80  }
52916982af48d9 Logan Gunthorpe 2018-10-04   81  static inline void *pci_alloc_p2pmem(struct pci_dev *pdev, size_t size)
52916982af48d9 Logan Gunthorpe 2018-10-04   82  {
52916982af48d9 Logan Gunthorpe 2018-10-04   83  	return NULL;
52916982af48d9 Logan Gunthorpe 2018-10-04   84  }
52916982af48d9 Logan Gunthorpe 2018-10-04   85  static inline void pci_free_p2pmem(struct pci_dev *pdev, void *addr,
52916982af48d9 Logan Gunthorpe 2018-10-04   86  		size_t size)
52916982af48d9 Logan Gunthorpe 2018-10-04   87  {
52916982af48d9 Logan Gunthorpe 2018-10-04   88  }
52916982af48d9 Logan Gunthorpe 2018-10-04   89  static inline pci_bus_addr_t pci_p2pmem_virt_to_bus(struct pci_dev *pdev,
52916982af48d9 Logan Gunthorpe 2018-10-04   90  						    void *addr)
52916982af48d9 Logan Gunthorpe 2018-10-04   91  {
52916982af48d9 Logan Gunthorpe 2018-10-04   92  	return 0;
52916982af48d9 Logan Gunthorpe 2018-10-04   93  }
52916982af48d9 Logan Gunthorpe 2018-10-04   94  static inline struct scatterlist *pci_p2pmem_alloc_sgl(struct pci_dev *pdev,
52916982af48d9 Logan Gunthorpe 2018-10-04   95  		unsigned int *nents, u32 length)
52916982af48d9 Logan Gunthorpe 2018-10-04   96  {
52916982af48d9 Logan Gunthorpe 2018-10-04   97  	return NULL;
52916982af48d9 Logan Gunthorpe 2018-10-04   98  }
52916982af48d9 Logan Gunthorpe 2018-10-04   99  static inline void pci_p2pmem_free_sgl(struct pci_dev *pdev,
52916982af48d9 Logan Gunthorpe 2018-10-04  100  		struct scatterlist *sgl)
52916982af48d9 Logan Gunthorpe 2018-10-04  101  {
52916982af48d9 Logan Gunthorpe 2018-10-04  102  }
52916982af48d9 Logan Gunthorpe 2018-10-04  103  static inline void pci_p2pmem_publish(struct pci_dev *pdev, bool publish)
52916982af48d9 Logan Gunthorpe 2018-10-04  104  {
52916982af48d9 Logan Gunthorpe 2018-10-04  105  }
892769aeb9761e Logan Gunthorpe 2021-03-17  106  static inline enum pci_p2pdma_map_type pci_p2pdma_map_type(
892769aeb9761e Logan Gunthorpe 2021-03-17  107  		struct dev_pagemap *pgmap, struct device *dev)
892769aeb9761e Logan Gunthorpe 2021-03-17  108  {
892769aeb9761e Logan Gunthorpe 2021-03-17  109  	return PCI_P2PDMA_MAP_NOT_SUPPORTED;
892769aeb9761e Logan Gunthorpe 2021-03-17  110  }
2b9f4bb2a4fb77 Logan Gunthorpe 2019-08-12  111  static inline int pci_p2pdma_map_sg_attrs(struct device *dev,
2b9f4bb2a4fb77 Logan Gunthorpe 2019-08-12  112  		struct scatterlist *sg, int nents, enum dma_data_direction dir,
2b9f4bb2a4fb77 Logan Gunthorpe 2019-08-12  113  		unsigned long attrs)
977196b8c5b20b Logan Gunthorpe 2018-10-04  114  {
977196b8c5b20b Logan Gunthorpe 2018-10-04  115  	return 0;
977196b8c5b20b Logan Gunthorpe 2018-10-04  116  }
7f73eac3a7137e Logan Gunthorpe 2019-08-12  117  static inline void pci_p2pdma_unmap_sg_attrs(struct device *dev,
7f73eac3a7137e Logan Gunthorpe 2019-08-12  118  		struct scatterlist *sg, int nents, enum dma_data_direction dir,
7f73eac3a7137e Logan Gunthorpe 2019-08-12  119  		unsigned long attrs)
7f73eac3a7137e Logan Gunthorpe 2019-08-12  120  {
7f73eac3a7137e Logan Gunthorpe 2019-08-12  121  }
3b7b58fd026fb0 Logan Gunthorpe 2021-03-17 @122  static inline enum pci_p2pdma_map_type pci_p2pdma_map_segment(
3b7b58fd026fb0 Logan Gunthorpe 2021-03-17  123  		struct pci_p2pdma_map_state *state, struct device *dev,
3b7b58fd026fb0 Logan Gunthorpe 2021-03-17  124  		struct scatterlist *sg);
3b7b58fd026fb0 Logan Gunthorpe 2021-03-17  125  {
3b7b58fd026fb0 Logan Gunthorpe 2021-03-17  126  	return PCI_P2PDMA_MAP_NOT_SUPPORTED;
3b7b58fd026fb0 Logan Gunthorpe 2021-03-17  127  }
3b7b58fd026fb0 Logan Gunthorpe 2021-03-17  128  static inline void pci_p2pdma_map_bus_segment(struct scatterlist *pg_sg,
3b7b58fd026fb0 Logan Gunthorpe 2021-03-17  129  					      struct scatterlist *dma_sg)
3b7b58fd026fb0 Logan Gunthorpe 2021-03-17  130  {
3b7b58fd026fb0 Logan Gunthorpe 2021-03-17  131  }
2d7bc010f450d8 Logan Gunthorpe 2018-10-04  132  static inline int pci_p2pdma_enable_store(const char *page,
2d7bc010f450d8 Logan Gunthorpe 2018-10-04  133  		struct pci_dev **p2p_dev, bool *use_p2pdma)
2d7bc010f450d8 Logan Gunthorpe 2018-10-04  134  {
2d7bc010f450d8 Logan Gunthorpe 2018-10-04  135  	*use_p2pdma = false;
2d7bc010f450d8 Logan Gunthorpe 2018-10-04  136  	return 0;
2d7bc010f450d8 Logan Gunthorpe 2018-10-04  137  }
2d7bc010f450d8 Logan Gunthorpe 2018-10-04  138  static inline ssize_t pci_p2pdma_enable_show(char *page,
2d7bc010f450d8 Logan Gunthorpe 2018-10-04  139  		struct pci_dev *p2p_dev, bool use_p2pdma)
2d7bc010f450d8 Logan Gunthorpe 2018-10-04  140  {
2d7bc010f450d8 Logan Gunthorpe 2018-10-04  141  	return sprintf(page, "none\n");
2d7bc010f450d8 Logan Gunthorpe 2018-10-04  142  }
52916982af48d9 Logan Gunthorpe 2018-10-04  143  #endif /* CONFIG_PCI_P2PDMA */
52916982af48d9 Logan Gunthorpe 2018-10-04  144  
52916982af48d9 Logan Gunthorpe 2018-10-04  145  

:::::: The code at line 122 was first introduced by commit
:::::: 3b7b58fd026fb0b314c93fe506140dfd67dea103 PCI/P2PDMA: Introduce helpers for dma_map_sg implementations

:::::: TO: Logan Gunthorpe <logang@deltatee.com>
:::::: CC: Logan Gunthorpe <logang@deltatee.com>

---
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: 19570 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-08  1:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-08  1:09 [p2pmem:p2pdma_map_ops_v2+user 14/27] include/linux/pci-p2pdma.h:122:40: warning: 'pci_p2pdma_map_segment' used but never defined 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.