From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Subject: Re: merge struct ib_device_attr into struct ib_device V2 Date: Wed, 21 Oct 2015 12:20:19 -0600 Message-ID: <20151021182019.GB15771@obsidianresearch.com> References: <56263CE6.5010005@dev.mellanox.co.il> <56265702.1030209@dev.mellanox.co.il> <20151021063830.GA19027@lst.de> <56273459.6050007@mellanox.com> <20151021065134.GA19210@lst.de> <56273AA1.6060607@mellanox.com> <5627B3BA.7060700@sandisk.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Or Gerlitz Cc: Bart Van Assche , Steve Wise , Or Gerlitz , Christoph Hellwig , Sagi Grimberg , "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" List-Id: linux-rdma@vger.kernel.org On Wed, Oct 21, 2015 at 09:08:31PM +0300, Or Gerlitz wrote: > The alternative approach to address this which was also running here > in the form of a patch from Ira following a reviewer comment from me, > is the have struct ib_device to contain a struct ib_device_attr member > (potentially a pointer) which is filled by the device driver before > they register themselves with the IB core. No to the pointer idea. > This way there's no need for kmalloc() + ib_query_device() + kfree() > when a device attribute is needed and we don't introduce tens/hundreds > new fields for struct ib_device. I care very little if the name is ibdev->attr.foo or ibdev->foo, that is just bikeshedding. I have a slight preference toward ibdev->foo to match other subsystems. I have no idea why you care so much about something so trivial. Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html