From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Majewski Date: Wed, 10 Oct 2012 08:24:28 +0200 Subject: [U-Boot] [PATCH v2 05/21] pmic: Introduce power_board_init() method at ./lib/board.c file In-Reply-To: <20121009180505.GA1137@bill-the-cat> References: <1349425003-32523-1-git-send-email-l.majewski@samsung.com> <1349425003-32523-6-git-send-email-l.majewski@samsung.com> <5073E631.2030402@denx.de> <20121009122548.74467dc2@amdc308.digital.local> <50740BCB.9010607@denx.de> <20121009180505.GA1137@bill-the-cat> Message-ID: <20121010082428.427731e5@amdc308.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 Tom, > On Tue, Oct 09, 2012 at 01:34:35PM +0200, Stefano Babic wrote: > > On 09/10/2012 12:25, Lukasz Majewski wrote: > [snip] > > >> We use often the "weak" mechanism to avoid that a board > > >> maintainer is constrained to implement an empty function only to > > >> make happy the linker. It is better to declare the function as > > >> weak and call it with the same schema, such as > > >> board_power_init() (several board_* are weak) > > > > > > Correct me if I'm wrong, but weren't we recently trying to remove > > > functions defined as weak? > > > > I am not aware of it. I see several patches in last days adding weak > > function. Several weak function are present in the recent added SPL > > framework. > > We should use weak functions when we can provide a functioning in many > cases default but need to allow for overrides in some cases. We > shouldn't use them when everyone needs to define the function and it > has to do something. > Ok, thanks for clarification :-). I will define and use board_power_init() as a __weak function. -- Best regards, Lukasz Majewski Samsung Poland R&D Center | Linux Platform Group