public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: devel@driverdev.osuosl.org, Lidza Louina <lidza.louina@gmail.com>,
	Daeseok Youn <daeseok.youn@gmail.com>,
	driverdev-devel@linuxdriverproject.org,
	linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH 1/4] staging: dgap: fix error path
Date: Fri, 17 Jul 2015 15:57:21 +0530	[thread overview]
Message-ID: <20150717102721.GA3832@sudip-PC> (raw)
In-Reply-To: <20150717100555.GB5371@mwanda>

On Fri, Jul 17, 2015 at 01:05:55PM +0300, Dan Carpenter wrote:
> On Fri, Jul 17, 2015 at 03:21:28PM +0530, Sudip Mukherjee wrote:
> > On Fri, Jul 17, 2015 at 12:30:03PM +0300, Dan Carpenter wrote:
> > > I don't think I like these at all.  remove_one has always been buggy in
> > > that it removes everything.  We should fix it to only remove one instead
> > > of formalizing the currect terrible behavior.
> > Its already applied.
> > I thought after the full series the code became a little better than the
> > original one.
> 
> It looks nicer but it's wrong.
> 
> 
> > Now dgap_stop() is being called from dgap_remove_one(). How do you suggest
> > it should be?
> 
> dgap_remove_one() should mirror dgap_init_one().  dgap_stop() should
> only be called from dgap_cleanup_module().  dgap_cleanup_module() should
> mirror dgap_init_module().
But if dgap_stop() is only called from dgap_cleanup_module() then what
will happen if the pci device is suddenly removed?
Currently if the pci device is removed then the remove callback will be
executed and it will stop and unregister everything properly.

regards
sudip

  reply	other threads:[~2015-07-17 10:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-16 12:58 [PATCH 1/4] staging: dgap: fix error path Sudip Mukherjee
2015-07-16 12:58 ` [PATCH 2/4] staging: dgap: rearrange function Sudip Mukherjee
2015-07-16 12:58 ` [PATCH 3/4] staging: dgap: new arguments to dgap_stop Sudip Mukherjee
2015-07-16 12:58 ` [PATCH 4/4] staging: dgap: remove duplicate code Sudip Mukherjee
2015-07-17  9:30 ` [PATCH 1/4] staging: dgap: fix error path Dan Carpenter
2015-07-17  9:51   ` Sudip Mukherjee
2015-07-17 10:05     ` Dan Carpenter
2015-07-17 10:27       ` Sudip Mukherjee [this message]
2015-07-17 10:52         ` Dan Carpenter

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=20150717102721.GA3832@sudip-PC \
    --to=sudipm.mukherjee@gmail.com \
    --cc=daeseok.youn@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=lidza.louina@gmail.com \
    --cc=linux-kernel@vger.kernel.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