Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1186645 > unrolled thread

Re: [PATCH 1/4] staging: dgap: fix error path

Started byDan Carpenter <dan.carpenter@oracle.com>
First post2015-07-17 11:40 +0200
Last post2015-07-17 13:00 +0200
Articles 5 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 1/4] staging: dgap: fix error path Dan Carpenter <dan.carpenter@oracle.com> - 2015-07-17 11:40 +0200
    Re: [PATCH 1/4] staging: dgap: fix error path Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-07-17 12:00 +0200
      Re: [PATCH 1/4] staging: dgap: fix error path Dan Carpenter <dan.carpenter@oracle.com> - 2015-07-17 12:10 +0200
        Re: [PATCH 1/4] staging: dgap: fix error path Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-07-17 12:30 +0200
          Re: [PATCH 1/4] staging: dgap: fix error path Dan Carpenter <dan.carpenter@oracle.com> - 2015-07-17 13:00 +0200

#1186645 — Re: [PATCH 1/4] staging: dgap: fix error path

FromDan Carpenter <dan.carpenter@oracle.com>
Date2015-07-17 11:40 +0200
SubjectRe: [PATCH 1/4] staging: dgap: fix error path
Message-ID<pNahz-1uy-17@gated-at.bofh.it>
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.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1186658

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2015-07-17 12:00 +0200
Message-ID<pNaAV-1Rc-9@gated-at.bofh.it>
In reply to#1186645
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.
Now dgap_stop() is being called from dgap_remove_one(). How do you suggest
it should be?

regards
sudip
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1186664

FromDan Carpenter <dan.carpenter@oracle.com>
Date2015-07-17 12:10 +0200
Message-ID<pNaKB-2i1-11@gated-at.bofh.it>
In reply to#1186658
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().

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1186675

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2015-07-17 12:30 +0200
Message-ID<pNb3X-2EK-7@gated-at.bofh.it>
In reply to#1186664
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1186707

FromDan Carpenter <dan.carpenter@oracle.com>
Date2015-07-17 13:00 +0200
Message-ID<pNbwZ-3cw-15@gated-at.bofh.it>
In reply to#1186675
On Fri, Jul 17, 2015 at 03:57:21PM +0530, Sudip Mukherjee wrote:
> 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.

It shouldn't be unregistering everything when one thing is removed, it
should only unregister the stuff that is removed.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web