[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6E21E5352C11B742B20C142EB499E048081B360E@TK5EX14MBXC126.redmond.corp.microsoft.com>
Date: Thu, 25 Aug 2011 22:27:40 +0000
From: KY Srinivasan <kys@...rosoft.com>
To: Greg KH <greg@...ah.com>
CC: "gregkh@...e.de" <gregkh@...e.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"devel@...uxdriverproject.org" <devel@...uxdriverproject.org>,
"virtualization@...ts.osdl.org" <virtualization@...ts.osdl.org>,
Haiyang Zhang <haiyangz@...rosoft.com>
Subject: RE: [PATCH 22/59] Staging: hv: vmbus: Get rid of the unused name
field in struct hv_driver
> -----Original Message-----
> From: Greg KH [mailto:greg@...ah.com]
> Sent: Thursday, August 25, 2011 5:28 PM
> To: KY Srinivasan
> Cc: gregkh@...e.de; linux-kernel@...r.kernel.org;
> devel@...uxdriverproject.org; virtualization@...ts.osdl.org; Haiyang Zhang
> Subject: Re: [PATCH 22/59] Staging: hv: vmbus: Get rid of the unused name field
> in struct hv_driver
>
> On Thu, Aug 25, 2011 at 02:24:28PM -0700, Greg KH wrote:
> > On Thu, Aug 25, 2011 at 09:48:48AM -0700, K. Y. Srinivasan wrote:
> > > Get rid of the unused "name" field in struct hv_driver.
> > >
> > > Signed-off-by: K. Y. Srinivasan <kys@...rosoft.com>
> > > Signed-off-by: Haiyang Zhang <haiyangz@...rosoft.com>
> > > ---
> > > drivers/staging/hv/hyperv.h | 2 --
> > > 1 files changed, 0 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/staging/hv/hyperv.h b/drivers/staging/hv/hyperv.h
> > > index b8199f4..60ead66 100644
> > > --- a/drivers/staging/hv/hyperv.h
> > > +++ b/drivers/staging/hv/hyperv.h
> > > @@ -802,8 +802,6 @@ struct hv_device_info {
> > >
> > > /* Base driver object */
> > > struct hv_driver {
> > > - const char *name;
> >
> > Wait, why is this unused? What are you going to use as your name for
> > the driver in sysfs then? The module name?
> >
> > As much as I love seeing things deleted, I really think you need this
> > field.
> >
> > Ah, yeah, I see why you think it's unneeded, crud like this in the
> > drivers:
> >
> > drv->driver.name = driver_name;
> >
> > No vmbus driver should ever have to touch the base struct driver on it's
> > own at all. Your vmbus core should properly handle telling the driver
> > core what the name of the driver is.
> >
> > As an example, see the __pci_register_driver() function, the first thing
> > that code does is set the name based on the name of the larger
> > pci_driver structure passed to it.
> >
> > Man, if you want something done right, you have to do it yourself, let
> > me go make these changes so you don't have to do any new work at this
> > point in time, hopefully your other patches will apply...
>
> What, vmbus_child_driver_register() takes a struct driver *?
>
> No wonder things are so messed up here, and why you got confused. Let
> me pound on this for a bit to see if I can get it cleaned up to be more
> "sane"...
Greg,
This was existing code and I realized it did not conform to the Linux
Driver Model. I fixed it in the patch set I had sent earlier (110/117).
Yesterday I only got up to 74 of the 117 patches that you commented on.
I was planning to send the rest today. If it is ok with you, please don't fix it here
As it would break everything else. This is existing code that I am fixing in the patch set
I will send you shortly.
Regards,
K. Y
>
> greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists