[U-Boot] [PATCH v2 05/21] pmic: Introduce power_board_init() method at ./lib/board.c file

Tom Rini trini at ti.com
Tue Oct 9 20:05:05 CEST 2012


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.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121009/1401dfdb/attachment.pgp>


More information about the U-Boot mailing list