mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Manohar Vanga <manohar.vanga@cern.ch>
To: "Emilio G. Cota" <cota@braap.org>
Cc: Greg KH <greg@kroah.com>, <gregkh@suse.de>, <martyn.welch@ge.com>,
	<devel@driverdev.osuosl.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] staging: vme: add struct vme_dev for VME devices
Date: Tue, 30 Aug 2011 09:52:18 +0200	[thread overview]
Message-ID: <20110830075218.GA3056@becoht-mvanga> (raw)
In-Reply-To: <20110829235508.GA30400@flamenco.cs.columbia.edu>

Hey Emilio,

On Mon, Aug 29, 2011 at 07:55:08PM -0400, Emilio G. Cota wrote:
> On Mon, Aug 29, 2011 at 10:52:41 -0700, Greg KH wrote:
> > On Mon, Aug 29, 2011 at 11:02:49AM +0200, Manohar Vanga wrote:
> > > --- a/drivers/staging/vme/vme_bridge.h
> > > +++ b/drivers/staging/vme/vme_bridge.h
> > > @@ -115,9 +115,8 @@ struct vme_bridge {
> > >  	struct list_head bus_list; /* list of VME buses */
> > >  	struct module *owner;	/* module that owns the bridge */
> > >  
> > > -	struct device dev[VME_SLOTS_MAX];	/* Device registered with
> > > -						 * device model on VME bus
> > > -						 */
> > > +	struct vme_dev dev[VME_SLOTS_MAX];	/* Device registered
> > > +						 * on VME bus */
> > 
> > Overall, this is the right way to go, using a vme_dev.
> > 
> > BUT, you should never have a static list of devices, these should be
> > pointers, not actual structures here, otherwise your reference counting
> > just got all messed up and is wrong.
> > 
> > And yes, I know you didn't create the code this way, but it needs to be
> > fixed _before_ you make this kind of a change.
> 
> True, I overlooked this while reviewing >_<
> 
> Manohar, have a look at vme_unregister_driver_ng() and
> __vme_register_driver_bus() in this patch:
>  
>     http://article.gmane.org/gmane.linux.kernel/1054046

I actually threw the static devices out of the code in patch 3. I didn't
introduce it here as I thought the changes were unrelated (introducing
struct vme_dev across the code and getting rid of that static device
array).

-- 
/manohar

  reply	other threads:[~2011-08-30  7:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-29  9:02 [PATCH 0/3] [RESEND v3] VME Driver Changes Manohar Vanga
2011-08-29  9:02 ` [PATCH 1/3] staging: vme: add functions for bridge module refcounting Manohar Vanga
2011-08-29 14:56   ` Emilio G. Cota
2011-08-29 17:51   ` Greg KH
2011-08-29 18:40     ` Emilio G. Cota
2011-08-29 18:54       ` Greg KH
2011-08-29  9:02 ` [PATCH 2/3] staging: vme: add struct vme_dev for VME devices Manohar Vanga
2011-08-29 14:57   ` Emilio G. Cota
2011-08-29 17:52   ` Greg KH
2011-08-29 23:55     ` Emilio G. Cota
2011-08-30  7:52       ` Manohar Vanga [this message]
2011-08-29  9:02 ` [PATCH 3/3] staging: vme: make match() driver specific to improve non-VME64x support Manohar Vanga
2011-08-29 14:55   ` Emilio G. Cota
2011-08-30 10:39     ` Manohar Vanga
2011-08-31 10:05 [PATCH 0/3] [RESEND v4] VME Framework Fixes Manohar Vanga
2011-08-31 10:05 ` [PATCH 2/3] staging: vme: add struct vme_dev for VME devices Manohar Vanga
2011-09-01  9:15 [PATCH 0/3] [RESEND v5] VME Framework Fixes Manohar Vanga
2011-09-01  9:15 ` [PATCH 2/3] staging: vme: add struct vme_dev for VME devices Manohar Vanga
2011-09-02  9:02   ` Martyn Welch
2011-09-26 14:06     ` Manohar Vanga

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=20110830075218.GA3056@becoht-mvanga \
    --to=manohar.vanga@cern.ch \
    --cc=cota@braap.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=greg@kroah.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martyn.welch@ge.com \
    /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

all inboxes | Powered by JetHome®