From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Wed, 19 Sep 2012 11:29:32 -0700 Subject: [U-Boot] [PATCHv4] [RFC] DM: early_malloc for DM added. In-Reply-To: References: <1346069529-27397-1-git-send-email-tmshlvck@gmail.com> <1347952436-5722-1-git-send-email-tmshlvck@gmail.com> <201209181257.53329.marex@denx.de> Message-ID: <20120919182932.GD12703@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Sep 19, 2012 at 09:29:04AM +1000, Graeme Russ wrote: > Hi Marek, > > On Tue, Sep 18, 2012 at 8:57 PM, Marek Vasut wrote: > > Dear Tomas Hlavacek, [snip] > >> +struct early_heap_header *early_brk(size_t size) > >> + __attribute__((weak, alias("def_early_brk"))); > > > > what about using (it needs ): > > > > __weak struct early_heap_header *early_brk(size_t size) > > { > > ... > > body > > ... > > } > > We already have a lot of the former - I prefer not to add additional > semantics (unless you want to do a wholesale search/replace ;)) Migrating everyone but the real tricky uses (alias >=2 functions to one weak dummy) to the semantics is something on my TODO list from ages ago. So yes please, unless it's a complex case, find and use the __shortform that and company provide (and a git grep for your attribute when in doubt, sometimes it's in