public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: KY Srinivasan <kys@microsoft.com>
Cc: "gregkh@suse.de" <gregkh@suse.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devel@linuxdriverproject.org" <devel@linuxdriverproject.org>,
	"virtualization@lists.osdl.org" <virtualization@lists.osdl.org>
Subject: Re: various vmbus review comments
Date: Fri, 6 May 2011 07:59:44 -0700	[thread overview]
Message-ID: <20110506145944.GA11871@kroah.com> (raw)
In-Reply-To: <6E21E5352C11B742B20C142EB499E0481E0694@TK5EX14MBXC124.redmond.corp.microsoft.com>

On Fri, May 06, 2011 at 01:10:38PM +0000, KY Srinivasan wrote:
> > No, I am referring to the module reference counting of the bus drivers
> > that register with the vmbus core.  You aren't doing that at all, and
> > you probably need to make sure that this isn't needed.  That is
> > concentrating on the vmbus driver.
> 
> I audited the block and the net drivers. As part of their exit routine,
> they invoke vmbus_child_driver_unregister() after properly cleaning
> up all the devices they are managing. Do you still see an issue with
> regards to module reference counting.

I will look again, the next time I review the vmbus code.

> > > I will also address your comment on static initialization hv_driver instances
> > > as part of other driver cleanup.
> > 
> > No, please do this now as it will show how to properly interact with the
> > vmbus core code in the correct manner.  Hopefully that will be correct,
> > but I have a feeling that it will show you some places in the API that
> > need to be changed...
> 
> As opposed to run-time initialization of fields such as probe, etc; I have 
> initialized them statically. For instance, in the blkvsc driver:
> 
> /* The one and only one */
> static  struct storvsc_driver blkvsc_drv = {
>         .base.probe =  blkvsc_probe,
>         .base.remove =  blkvsc_remove,
>         .base.shutdown = blkvsc_shutdown,
> };
> 
> Is this what you had in mind.

Close.  The format is correct.

But what's with that ".base." crud?  That shows that something is wrong
as no USB or PCI or any other bus driver has to mess with a ".base"
subpointer in a driver structure.

See, I told you that when you converted to use this format the problems
would pop out at you :)

Please fix that.

thanks,

greg k-h

  reply	other threads:[~2011-05-06 14:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-03 20:46 various vmbus review comments Greg KH
2011-05-03 21:00 ` KY Srinivasan
2011-05-03 22:03   ` Greg KH
2011-05-03 22:49     ` KY Srinivasan
2011-05-04 16:20 ` KY Srinivasan
2011-05-04 16:32   ` Greg KH
2011-05-04 16:58     ` KY Srinivasan
2011-05-04 18:28       ` Greg KH
2011-05-06 13:10     ` KY Srinivasan
2011-05-06 14:59       ` Greg KH [this message]
2011-05-06 17:34         ` KY Srinivasan
2011-05-09 14:33       ` Christoph Hellwig
2011-05-09 14:56         ` KY Srinivasan
2011-05-10  5:24           ` Christoph Hellwig
2011-05-10 13:00             ` KY Srinivasan
2011-05-10 13:07               ` Christoph Hellwig
2011-05-10 13:16               ` Greg KH
2011-05-09  1:46 ` KY Srinivasan
2011-05-09  3:04   ` Greg KH
2011-05-09 12:35     ` KY Srinivasan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110506145944.GA11871@kroah.com \
    --to=greg@kroah.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@suse.de \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=virtualization@lists.osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox