[PATCH 1/3][MTD] P4080/eLBC: Make Freescale elbc interrupt common to elbc devices

Zang Roy-R61911 r61911 at freescale.com
Mon Sep 6 06:15:30 EDT 2010



> -----Original Message-----
> From: Anton Vorontsov [mailto:cbouatmailru at gmail.com]
> Sent: Monday, September 06, 2010 17:44 PM
> To: Zang Roy-R61911
> Cc: linux-mtd at lists.infradead.org; Lan Chunhe-B25806; linuxppc-dev at ozlabs.org;
> akpm at linux-foundation.org; Gala Kumar-B11780; Wood Scott-B07421
> Subject: Re: [PATCH 1/3][MTD] P4080/eLBC: Make Freescale elbc interrupt common
> to elbc devices
> 
> On Mon, Sep 06, 2010 at 05:24:35PM +0800, Zang Roy-R61911 wrote:
> [..]
> > > mxmr = &fsl_lbc_ctrl_dev->regs->mcmr;
> > That makes sense.  A global or local variable for fsl_lbc_ctrl_dev->regs?
> Which one is better?
> 
> The less global variables, the better. So, I'd vote for
> a local one.
I also prefer local one.
> 
> > > [...]
> > > > > > +static int __devinit fsl_lbc_ctrl_probe(struct of_device *ofdev,
> > > > > > +					 const struct of_device_id *match)
> > > > > > +{
> > > > > > +	int ret = 0;
> > > > >
> > > > > no need for the initial value here.
> > > > Any harm?
> > >
> > > Probably not as gcc will likely optimize it away,
> > > but it's not needed, so why keep it there?
> > habit.
> 
> ;-)
:-(.
Thanks for all your comments. That is valuable.
I will update the patch according to your comment and the new platform device arch.
Roy


More information about the linux-mtd mailing list