From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Majewski Date: Thu, 26 Apr 2012 12:32:40 +0200 Subject: [U-Boot] [PATCH v2 4/4] lin_gadget: use common linux/compat.h In-Reply-To: <20120426110319.3690e103@wker> References: <1334014796-4627-4-git-send-email-vapier@gentoo.org> <1335341501-4270-1-git-send-email-agust@denx.de> <20120425175851.3c996837@lmajewski.digital.local> <20120426110319.3690e103@wker> Message-ID: <20120426123240.76c4c43a@lmajewski.digital.local> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Anatolij, > > Hi Anatolij, > > > > > From: Mike Frysinger > > > > > > Merge our duplicate definitions with the common header. > > > Also fix drivers/usb/gadget/s3c_udc_otg_xfer_dma.c to > > > use min() instead of min_t() since we remove the latter > > > from compat.h. > > > > Yes. the include/usb/lin_gadget_compat.h layer. > > Good idea to provide one compat file (as fair as I remember similar > > problem is with mtd/compat.h). > > > > I'll look into the include/linux.h file. > > Mike already moved mtd/compat.h to linux/compat.h, please see this > patch http://patchwork.ozlabs.org/patch/151500/ > > Now I see another issue. In this 4/4 patch we are removing kmalloc: > > -#define kmalloc(size, type) memalign(CONFIG_SYS_CACHELINE_SIZE, size) > > linux/compat.h defines kmalloc() to be malloc(), so the gadget driver > should probably use memalign() directly where it is needed? In the include/usb/lin_gadget_compat.h the #define kmalloc(size, type) memalign(CONFIG_SYS_CACHELINE_SIZE, size) line is defined. I think that memalign can be used directly, no problem. -- Best regards, Lukasz Majewski Samsung Poland R&D Center | Linux Platform Group