[PATCH 2/8] staging: vme: allow explicit assignment of bus numbers

Manohar Vanga manohar.vanga at cern.ch
Mon Aug 1 12:12:36 UTC 2011


On Mon, Aug 01, 2011 at 02:10:00PM +0300, Dan Carpenter wrote:
> On Mon, Aug 01, 2011 at 12:20:47PM +0200, Manohar Vanga wrote:
> > -static int vme_alloc_bus_num(void)
> > +/* call with vme_bus_num_mtx held */
> 
> Why move the lock outside the function?
> 
> > +static int __vme_alloc_bus_num(int bus_num)
> >  {
> 
> regards,
> dan carpenter
> 

It just makes the code in __vme_add_bus cleaner when you have failures.
I can merge __vme_add_bus and __vme_alloc_bus_num into one.

--
/manohar



More information about the devel mailing list