RDMA/hfi1: Avoid redeclaration error
authorLeon Romanovsky <leonro@mellanox.com>
Sun, 4 Sep 2016 11:30:32 +0000 (14:30 +0300)
committerDoug Ledford <dledford@redhat.com>
Tue, 10 Jan 2017 17:41:40 +0000 (12:41 -0500)
commit38e8b671bf04af09fc8de74ea857f920285bd211
tree8211368a145dafec005c53e9f64f8170bf162829
parent06393bc39e2fdcd9ca281401f25fa3b834bca799
RDMA/hfi1: Avoid redeclaration error

Move hfi1 ioctl definitions to a new header which can be included by
both the hfi1 and qib drivers to avoid a duplicate enum definition
as shown in this 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.

The actual move of the ioctl definitions comes in a follow on patch.

Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Haggai Eran <haggaie@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
include/uapi/rdma/hfi/Kbuild
include/uapi/rdma/hfi/hfi1_ioctl.h [new file with mode: 0644]
include/uapi/rdma/hfi/hfi1_user.h