[U-Boot] [PATCH 7/8] mtd/nand/ubi: assortment of alignment fixes

Scott Wood
2015-07-06T21:50:39Z

On Mon, 2015-07-06 at 23:45 +0200, Marek Vasut wrote:
> On Monday, July 06, 2015 at 11:25:35 PM, Scott Wood wrote:
> > On Fri, 2015-07-03 at 15:44 +0200, Marek Vasut wrote:
> > >
> > > This is what memalign(3) has
> > >
> > > to say:
> > >
> > > "
> > > The function posix_memalign() allocates size bytes and places the
> > > address of the allocated memory in *memptr. The address of the
> > > allo? cated memory will be a multiple of alignment, which must
> > > be a power of two and a multiple of sizeof(void *). If size is 0,
> > > then the value placed in *memptr is either NULL, or a unique pointer
> > > value that can later be successfully passed to free(3).
> > >
> > > The obsolete function memalign() allocates size bytes and returns a
> > > pointer to the allocated memory. The memory address will be a mul?
> > > tiple of alignment, which must be a power of two.
> > > "
> >
> > posix_memalign() does not exist in U-Boot, and it's not clear to me why
> > memalign() should be considered obsolete. Is the difference just the
> > ability to return -EINVAL?
>
> The args are also totally different.

...in order to accommodate returning an error value.

-Scott