Re: [PATCH 10/22 take 3] UBI: EBA unit

Randy Dunlap
2007-03-15T22:25:57Z

On Thu, 15 Mar 2007 11:07:03 -0800 Andrew Morton wrote:

>
> There's way too much code here to expect it to get decently reviewed, alas.

Yes.

/me repeats wish that Not Everything Should Be Sent to lkml. :(

> > On Wed, 14 Mar 2007 17:20:24 +0200 Artem Bityutskiy <dedekind@infradead.org> wrote:
> >
> > ...
> >
> > +/**
> > + * leb_get_ver - get logical eraseblock version.
> > + *
> > + * @ubi: the UBI device description object
> > + * @vol_id: the volume ID
> > + * @lnum: the logical eraseblock number
> > + *
> > + * The logical eraseblock has to be locked. Note, all this leb_ver stuff is
> > + * obsolete and will be removed eventually. FIXME: to be removed together with
> > + * leb_ver support.
> > + */

Please use kernel-doc syntax and test it. Using and testing it
are really easy to do. It's just a simple language. Don't make
(even trivial) problems for others to clean up...

Documentation/kernel-doc-nano-HOWTO.txt

Above: no "blank" line between the function name and its parameters.

> > +static inline int leb_get_ver(struct ubi_info *ubi, int vol_id, int lnum)
> > +{
> > + int idx, leb_ver;
> > +
> > + idx = vol_id2idx(ubi, vol_id);
> > +
> > + spin_lock(&ubi->eba.eba_tbl_lock);
> > + ubi_assert(ubi->eba.eba_tbl[idx].recs);
> > + leb_ver = ubi->eba.eba_tbl[idx].recs[lnum].leb_ver;
> > + spin_unlock(&ubi->eba.eba_tbl_lock);
> > +
> > + return leb_ver;
> > +}

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***