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

Leon Romanovsky
2016-08-17T06:45:59Z

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

On Wed, Aug 17, 2016 at 02:01:40AM -0400, ira.weiny wrote:
> On Tue, Aug 16, 2016 at 04:45:20PM +0300, Leon Romanovsky wrote:
> > From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> >
> > 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,
>
> I was pretty confused about what you were doing here mainly because you
> reference a symbol you don't actually touch in the patch.
>
> I see what you are doing now. But a better explanation would be:
>
> <quote>
>
> 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:
>
> 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,
>
>
> The actual move of the ioctl definitions comes in a follow on patch.
> </quote>
>

It is definitely better.
I'll update it in next version.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]