Re: [PATCH v2 2/3] RDMA: Add NLDEV_GET_CHARDEV to allow char dev discovery and autoload

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2019-06-18 at 10:10 -0300, Jason Gunthorpe wrote:
> On Tue, Jun 18, 2019 at 03:17:09PM +0300, Leon Romanovsky wrote:
> > >  /**
> > >   * ib_set_client_data - Set IB client context
> > >   * @device:Device to set context for
> > > diff --git a/drivers/infiniband/core/nldev.c
> > > b/drivers/infiniband/core/nldev.c
> > > index 69188cbbd99bd5..55eccea628e99f 100644
> > > +++ b/drivers/infiniband/core/nldev.c
> > > @@ -120,6 +120,9 @@ static const struct nla_policy
> > > nldev_policy[RDMA_NLDEV_ATTR_MAX] = {
> > >  	[RDMA_NLDEV_ATTR_DEV_PROTOCOL]		= { .type =
> > > NLA_NUL_STRING,
> > >  				    .len = RDMA_NLDEV_ATTR_ENTRY_STRLEN
> > > },
> > >  	[RDMA_NLDEV_NET_NS_FD]			= { .type =
> > > NLA_U32 },
> > > +	[RDMA_NLDEV_ATTR_CHARDEV_TYPE]		= { .type =
> > > NLA_NUL_STRING,
> > > +				    .len = 128 },
> > > +	[RDMA_NLDEV_ATTR_PORT_INDEX]		= { .type = NLA_U32 },
> > 
> > It is wrong, we already have RDMA_NLDEV_ATTR_PORT_INDEX declared in
> > nla_policy.
> > But we don't have other RDMA_NLDEV_ATTR_CHARDEV_* declarations
> > here.
> 
> Doug can you fix it?

I haven't pushed my wip to for-next yet, so yeah, I can fix it.  We
just need to decide on what the full fix is ;-)

Drop the duplicate ATTR_PORT_INDEX, but what about a final decision on
including the outputs for possible future type checking?  You and Leon
seem to be going back and forth, and I don't have strong feelings
either way on this one.  It's just a definition statement, not like
it's a dead subroutine.

-- 
Doug Ledford <dledford@xxxxxxxxxx>
    GPG KeyID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57
2FDD

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux