All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [sashal-linux-stable:queue-5.4 117/290] drivers/infiniband/hw/qedr/qedr.h:483:30: error: field 'rdma_entry' has incomplete type
@ 2020-05-16 18:40 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2020-05-16 18:40 UTC (permalink / raw
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.4
head:   de62e075613ad8d1b4979186b1962e3ae58156f2
commit: 2749e1e145eec7db3729de3261f1ea352348f3c8 [117/290] RDMA/qedr: Use the common mmap API
config: sparc-allyesconfig (attached as .config)
compiler: sparc64-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
        git checkout 2749e1e145eec7db3729de3261f1ea352348f3c8
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=sparc 

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

Note: the sashal-linux-stable/queue-5.4 HEAD de62e075613ad8d1b4979186b1962e3ae58156f2 builds fine.
      It only hurts bisectibility.

All error/warnings (new ones prefixed by >>, old ones prefixed by <<):

In file included from drivers/infiniband/hw/qedr/main.c:45:
>> drivers/infiniband/hw/qedr/qedr.h:483:30: error: field 'rdma_entry' has incomplete type
483 |  struct rdma_user_mmap_entry rdma_entry;
|                              ^~~~~~~~~~
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/module.h:9,
from drivers/infiniband/hw/qedr/main.c:32:
drivers/infiniband/hw/qedr/qedr.h: In function 'get_qedr_mmap_entry':
>> include/linux/kernel.h:994:32: error: dereferencing pointer to incomplete type 'struct rdma_user_mmap_entry'
994 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&          |                                ^~~~~~
include/linux/compiler.h:330:9: note: in definition of macro '__compiletime_assert'
330 |   if (!(condition))              |         ^~~~~~~~~
include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
350 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
|  ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
|                                     ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:994:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
994 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&          |  ^~~~~~~~~~~~~~~~
include/linux/kernel.h:994:20: note: in expansion of macro '__same_type'
994 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&          |                    ^~~~~~~~~~~
>> drivers/infiniband/hw/qedr/qedr.h:593:9: note: in expansion of macro 'container_of'
593 |  return container_of(rdma_entry, struct qedr_user_mmap_entry,
|         ^~~~~~~~~~~~
drivers/infiniband/hw/qedr/main.c: At top level:
>> drivers/infiniband/hw/qedr/main.c:215:3: error: 'const struct ib_device_ops' has no member named 'mmap_free'
215 |  .mmap_free = qedr_mmap_free,
|   ^~~~~~~~~
>> drivers/infiniband/hw/qedr/main.c:215:15: error: initialization of 'void (*)(struct ib_ucontext *)' from incompatible pointer type 'void (*)(struct rdma_user_mmap_entry *)' [-Werror=incompatible-pointer-types]
215 |  .mmap_free = qedr_mmap_free,
|               ^~~~~~~~~~~~~~
drivers/infiniband/hw/qedr/main.c:215:15: note: (near initialization for 'qedr_dev_ops.disassociate_ucontext')
cc1: some warnings being treated as errors
--
In file included from drivers/infiniband/hw/qedr/verbs.c:50:
>> drivers/infiniband/hw/qedr/qedr.h:483:30: error: field 'rdma_entry' has incomplete type
483 |  struct rdma_user_mmap_entry rdma_entry;
|                              ^~~~~~~~~~
In file included from include/linux/string.h:6,
from include/linux/dma-mapping.h:6,
from drivers/infiniband/hw/qedr/verbs.c:32:
drivers/infiniband/hw/qedr/qedr.h: In function 'get_qedr_mmap_entry':
>> include/linux/kernel.h:994:32: error: dereferencing pointer to incomplete type 'struct rdma_user_mmap_entry'
994 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&          |                                ^~~~~~
include/linux/compiler.h:330:9: note: in definition of macro '__compiletime_assert'
330 |   if (!(condition))              |         ^~~~~~~~~
include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
350 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
|  ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
|                                     ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:994:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
994 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&          |  ^~~~~~~~~~~~~~~~
include/linux/kernel.h:994:20: note: in expansion of macro '__same_type'
994 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&          |                    ^~~~~~~~~~~
>> drivers/infiniband/hw/qedr/qedr.h:593:9: note: in expansion of macro 'container_of'
593 |  return container_of(rdma_entry, struct qedr_user_mmap_entry,
|         ^~~~~~~~~~~~
drivers/infiniband/hw/qedr/verbs.c: In function 'qedr_alloc_ucontext':
>> drivers/infiniband/hw/qedr/verbs.c:300:7: error: implicit declaration of function 'rdma_user_mmap_entry_insert' [-Werror=implicit-function-declaration]
300 |  rc = rdma_user_mmap_entry_insert(uctx, &entry->rdma_entry,
|       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/infiniband/hw/qedr/verbs.c:311:16: error: implicit declaration of function 'rdma_user_mmap_get_offset'; did you mean 'rdma_user_mmap_io'? [-Werror=implicit-function-declaration]
311 |  uresp.db_pa = rdma_user_mmap_get_offset(ctx->db_mmap_entry);
|                ^~~~~~~~~~~~~~~~~~~~~~~~~
|                rdma_user_mmap_io
>> drivers/infiniband/hw/qedr/verbs.c:335:3: error: implicit declaration of function 'rdma_user_mmap_entry_remove' [-Werror=implicit-function-declaration]
335 |   rdma_user_mmap_entry_remove(ctx->db_mmap_entry);
|   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/infiniband/hw/qedr/verbs.c: In function 'qedr_mmap':
>> drivers/infiniband/hw/qedr/verbs.c:374:15: error: implicit declaration of function 'rdma_user_mmap_entry_get' [-Werror=implicit-function-declaration]
374 |  rdma_entry = rdma_user_mmap_entry_get(ucontext, vma);
|               ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/infiniband/hw/qedr/verbs.c:374:13: warning: assignment to 'struct rdma_user_mmap_entry *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
374 |  rdma_entry = rdma_user_mmap_entry_get(ucontext, vma);
|             ^
>> drivers/infiniband/hw/qedr/verbs.c:388:8: error: too many arguments to function 'rdma_user_mmap_io'
388 |   rc = rdma_user_mmap_io(ucontext, vma, pfn, length,
|        ^~~~~~~~~~~~~~~~~
In file included from drivers/infiniband/hw/qedr/verbs.c:39:
include/rdma/ib_verbs.h:2796:5: note: declared here
2796 | int rdma_user_mmap_io(struct ib_ucontext *ucontext, struct vm_area_struct *vma,
|     ^~~~~~~~~~~~~~~~~
>> drivers/infiniband/hw/qedr/verbs.c:401:2: error: implicit declaration of function 'rdma_user_mmap_entry_put' [-Werror=implicit-function-declaration]
401 |  rdma_user_mmap_entry_put(rdma_entry);
|  ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/infiniband/hw/qedr/verbs.c:50:
drivers/infiniband/hw/qedr/qedr.h: In function 'get_qedr_mmap_entry':
>> drivers/infiniband/hw/qedr/qedr.h:595:1: warning: control reaches end of non-void function [-Wreturn-type]
595 | }
| ^
cc1: some warnings being treated as errors
--
In file included from drivers/infiniband/hw/qedr/qedr_roce_cm.c:48:
>> drivers/infiniband/hw/qedr/qedr.h:483:30: error: field 'rdma_entry' has incomplete type
483 |  struct rdma_user_mmap_entry rdma_entry;
|                              ^~~~~~~~~~
In file included from include/linux/string.h:6,
from include/linux/dma-mapping.h:6,
from drivers/infiniband/hw/qedr/qedr_roce_cm.c:32:
drivers/infiniband/hw/qedr/qedr.h: In function 'get_qedr_mmap_entry':
>> include/linux/kernel.h:994:32: error: dereferencing pointer to incomplete type 'struct rdma_user_mmap_entry'
994 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&          |                                ^~~~~~
include/linux/compiler.h:330:9: note: in definition of macro '__compiletime_assert'
330 |   if (!(condition))              |         ^~~~~~~~~
include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
350 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
|  ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
|                                     ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:994:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
994 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&          |  ^~~~~~~~~~~~~~~~
include/linux/kernel.h:994:20: note: in expansion of macro '__same_type'
994 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&          |                    ^~~~~~~~~~~
>> drivers/infiniband/hw/qedr/qedr.h:593:9: note: in expansion of macro 'container_of'
593 |  return container_of(rdma_entry, struct qedr_user_mmap_entry,
|         ^~~~~~~~~~~~

vim +/rdma_entry +483 drivers/infiniband/hw/qedr/qedr.h

   481	
   482	struct qedr_user_mmap_entry {
 > 483		struct rdma_user_mmap_entry rdma_entry;
   484		struct qedr_dev *dev;
   485		u64 io_address;
   486		size_t length;
   487		u16 dpi;
   488		u8 mmap_flag;
   489	};
   490	
   491	#define SET_FIELD2(value, name, flag) ((value) |= ((flag) << (name ## _SHIFT)))
   492	
   493	#define QEDR_RESP_IMM	(RDMA_CQE_RESPONDER_IMM_FLG_MASK << \
   494				 RDMA_CQE_RESPONDER_IMM_FLG_SHIFT)
   495	#define QEDR_RESP_RDMA	(RDMA_CQE_RESPONDER_RDMA_FLG_MASK << \
   496				 RDMA_CQE_RESPONDER_RDMA_FLG_SHIFT)
   497	#define QEDR_RESP_INV	(RDMA_CQE_RESPONDER_INV_FLG_MASK << \
   498				 RDMA_CQE_RESPONDER_INV_FLG_SHIFT)
   499	
   500	static inline void qedr_inc_sw_cons(struct qedr_qp_hwq_info *info)
   501	{
   502		info->cons = (info->cons + 1) % info->max_wr;
   503		info->wqe_cons++;
   504	}
   505	
   506	static inline void qedr_inc_sw_prod(struct qedr_qp_hwq_info *info)
   507	{
   508		info->prod = (info->prod + 1) % info->max_wr;
   509	}
   510	
   511	static inline int qedr_get_dmac(struct qedr_dev *dev,
   512					struct rdma_ah_attr *ah_attr, u8 *mac_addr)
   513	{
   514		union ib_gid zero_sgid = { { 0 } };
   515		struct in6_addr in6;
   516		const struct ib_global_route *grh = rdma_ah_read_grh(ah_attr);
   517		u8 *dmac;
   518	
   519		if (!memcmp(&grh->dgid, &zero_sgid, sizeof(union ib_gid))) {
   520			DP_ERR(dev, "Local port GID not supported\n");
   521			eth_zero_addr(mac_addr);
   522			return -EINVAL;
   523		}
   524	
   525		memcpy(&in6, grh->dgid.raw, sizeof(in6));
   526		dmac = rdma_ah_retrieve_dmac(ah_attr);
   527		if (!dmac)
   528			return -EINVAL;
   529		ether_addr_copy(mac_addr, dmac);
   530	
   531		return 0;
   532	}
   533	
   534	struct qedr_iw_listener {
   535		struct qedr_dev *dev;
   536		struct iw_cm_id *cm_id;
   537		int		backlog;
   538		void		*qed_handle;
   539	};
   540	
   541	struct qedr_iw_ep {
   542		struct qedr_dev	*dev;
   543		struct iw_cm_id	*cm_id;
   544		struct qedr_qp	*qp;
   545		void		*qed_context;
   546		struct kref	refcnt;
   547	};
   548	
   549	static inline
   550	struct qedr_ucontext *get_qedr_ucontext(struct ib_ucontext *ibucontext)
   551	{
   552		return container_of(ibucontext, struct qedr_ucontext, ibucontext);
   553	}
   554	
   555	static inline struct qedr_dev *get_qedr_dev(struct ib_device *ibdev)
   556	{
   557		return container_of(ibdev, struct qedr_dev, ibdev);
   558	}
   559	
   560	static inline struct qedr_pd *get_qedr_pd(struct ib_pd *ibpd)
   561	{
   562		return container_of(ibpd, struct qedr_pd, ibpd);
   563	}
   564	
   565	static inline struct qedr_cq *get_qedr_cq(struct ib_cq *ibcq)
   566	{
   567		return container_of(ibcq, struct qedr_cq, ibcq);
   568	}
   569	
   570	static inline struct qedr_qp *get_qedr_qp(struct ib_qp *ibqp)
   571	{
   572		return container_of(ibqp, struct qedr_qp, ibqp);
   573	}
   574	
   575	static inline struct qedr_ah *get_qedr_ah(struct ib_ah *ibah)
   576	{
   577		return container_of(ibah, struct qedr_ah, ibah);
   578	}
   579	
   580	static inline struct qedr_mr *get_qedr_mr(struct ib_mr *ibmr)
   581	{
   582		return container_of(ibmr, struct qedr_mr, ibmr);
   583	}
   584	
   585	static inline struct qedr_srq *get_qedr_srq(struct ib_srq *ibsrq)
   586	{
   587		return container_of(ibsrq, struct qedr_srq, ibsrq);
   588	}
   589	
   590	static inline struct qedr_user_mmap_entry *
   591	get_qedr_mmap_entry(struct rdma_user_mmap_entry *rdma_entry)
   592	{
 > 593		return container_of(rdma_entry, struct qedr_user_mmap_entry,
   594				    rdma_entry);
 > 595	}

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

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

only message in thread, other threads:[~2020-05-16 18:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-16 18:40 [sashal-linux-stable:queue-5.4 117/290] drivers/infiniband/hw/qedr/qedr.h:483:30: error: field 'rdma_entry' has incomplete type kbuild 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.