Re: [PATCH rdma-core 4/5] libocrdma: Move ocrdma's list implementation into common directory

Jason Gunthorpe
2016-09-25T22:05:23Z

On Sun, Sep 25, 2016 at 07:13:15PM +0300, Leon Romanovsky wrote:
> On Sun, Sep 25, 2016 at 07:41:21AM -0700, Christoph Hellwig wrote:
> > This implementation was also copy and pasted from the Linux kernel
> > one, including the kernel document comments, and an incorrect license
> > was added to it. It should be removed just like the Mellanox copy.
>
> Awesome,
> Any suggestion where can we get list.h compliant with BSD license?
> Is this enough [1] ?
>
> [1]
> https://github.com/lattera/freebsd/blob/master/sys/ofed/include/linux/list.h

I recommend CCAN's version, it looks like it would be trivial to
convert to.

https://github.com/rustyrussell/ccan/blob/master/ccan/list/list.h

We should also try and use their macros for the other stuff your
migrated, eg their container_of has more static checking, as does the
min/max, and they have a min/max_t implementation.

Jason