From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Mon, 6 Jul 2015 23:57:00 +0200 Subject: [U-Boot] [PATCH 7/8] mtd/nand/ubi: assortment of alignment fixes In-Reply-To: <1436219439.2658.27.camel@freescale.com> References: <201507062345.01029.marex@denx.de> <1436219439.2658.27.camel@freescale.com> Message-ID: <201507062357.00947.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Monday, July 06, 2015 at 11:50:39 PM, Scott Wood wrote: > 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. ... of course. Best regards, Marek Vasut