[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200521201009.GD17583@ziepe.ca>
Date: Thu, 21 May 2020 17:10:09 -0300
From: Jason Gunthorpe <jgg@...pe.ca>
To: "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
Cc: Parav Pandit <parav@...lanox.com>,
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>,
"galpress@...zon.com" <galpress@...zon.com>,
"selvin.xavier@...adcom.com" <selvin.xavier@...adcom.com>,
"sriharsha.basavapatna@...adcom.com"
<sriharsha.basavapatna@...adcom.com>,
"benve@...co.com" <benve@...co.com>,
"bharat@...lsio.com" <bharat@...lsio.com>,
"xavier.huwei@...wei.com" <xavier.huwei@...wei.com>,
Yishai Hadas <yishaih@...lanox.com>,
Leon Romanovsky <leonro@...lanox.com>,
"mkalderon@...vell.com" <mkalderon@...vell.com>,
"aditr@...are.com" <aditr@...are.com>,
"ranjani.sridharan@...ux.intel.com"
<ranjani.sridharan@...ux.intel.com>,
"pierre-louis.bossart@...ux.intel.com"
<pierre-louis.bossart@...ux.intel.com>,
Kiran Patil <kiran.patil@...el.com>,
Andrew Bowers <andrewx.bowers@...el.com>
Subject: Re: [net-next v4 01/12] Implementation of Virtual Bus
On Thu, May 21, 2020 at 07:43:58PM +0200, gregkh@...uxfoundation.org wrote:
> On Thu, May 21, 2020 at 02:57:55PM +0000, Parav Pandit wrote:
> > Hi Greg, Jason,
> >
> > On 5/20/2020 12:32 PM, Jeff Kirsher wrote:
> > > From: Dave Ertman <david.m.ertman@...el.com>
> > >
> >
> > > +static const
> > > +struct virtbus_dev_id *virtbus_match_id(const struct virtbus_dev_id *id,
> > > + struct virtbus_device *vdev)
> > > +{
> > > + while (id->name[0]) {
> > > + if (!strcmp(vdev->match_name, id->name))
> > > + return id;
> >
> > Should we have VID, DID based approach instead of _any_ string chosen by
> > vendor drivers?
>
> No, because:
>
> > This will required central place to define the VID, DID of the vdev in
> > vdev_ids.h to have unique ids.
>
> That's not a good way to run things :)
>
> Have the virtbus core create the "name", as it really doesn't matter
> what it is, just that it is unique, right?
It is being used like the compatible string in OF. Look at where
"sof-ipc-test" appears in the SOF patches.
So it has to be a compile time static, and it has to be broadly global
in some fashion since it appears in a mod alias.
I don't think the name "sof-ipc-test" is particularly good by these
metrics.
Jason
Powered by blists - more mailing lists