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

Re: [Xen-devel] [PATCH] xen: remove DEFINE_XENBUS_DRIVER() macro



>>> On 09.09.14 at 11:53, <david.vrabel@xxxxxxxxxx> wrote:
> On 09/09/14 10:33, Jan Beulich wrote:
>>>>> On 08.09.14 at 18:46, <david.vrabel@xxxxxxxxxx> wrote:
>>> The DEFINE_XENBUS_DRIVER() macro looks a bit weird and causes sparse
>>> errors.
>>>
>>> Replace the uses with standard structure definitions instead.  This is
>>> similar to pci and usb device registration.
>>>
>>> Signed-off-by: David Vrabel <david.vrabel@xxxxxxxxxx>
>> 
>> I really regret you doing this, re-adding redundancy the elimination
>> of which the macro got added for (the diffstat would look even less
>> favorable if your patch didn't eliminate a couple of bogus comments
>> and blank lines). I'm certainly not in the position to nack this patch,
>> but if I was I would.
> 
> There didn't seem to be a good reason to require that the driver name
> match the first device ID.  What should the driver be named if it was
> for two or more different types of Xenbus device?

Is that a reasonable thing to expect?

> And not all drivers did this anyway.
> 
> However, we could do:
> 
>   drv->driver.name = drv->name ? drv->name : drv->ids[0];
> 
> What that resolve your concern?

Only partly - to some degree I also prefer the slightly more terse
code resulting from the macro use. And the original motivation
was anyway to allow reuse of upstream driver code in our forward
ported kernel without needing to patch each individual instance
(iirc largely needed to keep unmodified_drivers/ building, which
would otherwise break due to e.g. new fields in .driver needing
initialization).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.