[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191113011038.GC19615@ziepe.ca>
Date: Tue, 12 Nov 2019 21:10:38 -0400
From: Jason Gunthorpe <jgg@...pe.ca>
To: Parav Pandit <parav@...lanox.com>
Cc: Greg KH <gregkh@...uxfoundation.org>,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
"davem@...emloft.net" <davem@...emloft.net>,
Dave Ertman <david.m.ertman@...el.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"nhorman@...hat.com" <nhorman@...hat.com>,
"sassmann@...hat.com" <sassmann@...hat.com>,
Kiran Patil <kiran.patil@...el.com>
Subject: Re: [net-next 1/1] virtual-bus: Implementation of Virtual Bus
On Wed, Nov 13, 2019 at 01:03:44AM +0000, Parav Pandit wrote:
> A small improvement below, because get_drvdata() and set_drvdata()
Here it was called 'devdata' not the existing drvdata - so something
different, I was confused for a bit too..
> is supposed to be called by the bus driver, not its creator. And
> below data structure achieve strong type checks, no void* casts, and
> exactly achieves the foo_device example. Isn't it better?
> mlx5_virtbus_device {
> struct virtbus_device dev;
> struct mlx5_core_dev *dev;
> };
This does seem a bit cleaner than using the void * trick (more, OOPy
at least)
Jason
Powered by blists - more mailing lists