Re: [PATCH rdma-next 3/6] RDMA/hfi1: Avoid redeclaration error

Dalessandro, Dennis
2016-08-16T17:15:39Z

On Tue, 2016-08-16 at 16:45 +0300, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@mellanox.com>
>
> Plugging HFI1 IOCTL defines will cause to the following
> build error for QIB:
>   CC [M] drivers/infiniband/hw/qib/qib_sysfs.o
> In file included from ./include/uapi/rdma/rdma_user_ioctl.h:39:0,
>  from include/uapi/rdma/ib_user_mad.h:38,
>  from include/rdma/ib_mad.h:43,
>  from include/rdma/ib_pma.h:38,
>  from drivers/infiniband/hw/qib/qib_mad.h:37,
>  from drivers/infiniband/hw/qib/qib_init.c:49:
> ./include/uapi/rdma/hfi/hfi1_user.h:370:2: error: redeclaration of
> enumerator ‘ur_rcvhdrtail’
>   ur_rcvhdrtail = 0,
> Move HFI1 structures to separate file to avoid this failure.

I need to look at this some more. So does this mean this patch series
don't build if you just take the first 2? qib should not need anything
from hfi1_user.h so it should not be including it.

-Denny