* [U-Boot] [PATCH] common: env_mmc: Use __weak annotation to simplify code
@ 2013-01-08 15:36 Fabio Estevam
2013-01-08 15:57 ` Marek Vasut
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Fabio Estevam @ 2013-01-08 15:36 UTC (permalink / raw)
To: u-boot
Using the __weak annotation can make the code cleaner.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
common/env_mmc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/common/env_mmc.c b/common/env_mmc.c
index ce21671..02bd5ae 100644
--- a/common/env_mmc.c
+++ b/common/env_mmc.c
@@ -46,13 +46,11 @@ DECLARE_GLOBAL_DATA_PTR;
#define CONFIG_ENV_OFFSET 0
#endif
-static int __mmc_get_env_addr(struct mmc *mmc, u32 *env_addr)
+__weak int mmc_get_env_addr(struct mmc *mmc, u32 *env_addr)
{
*env_addr = CONFIG_ENV_OFFSET;
return 0;
}
-int mmc_get_env_addr(struct mmc *mmc, u32 *env_addr)
- __attribute__((weak, alias("__mmc_get_env_addr")));
int env_init(void)
{
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] common: env_mmc: Use __weak annotation to simplify code
2013-01-08 15:36 [U-Boot] [PATCH] common: env_mmc: Use __weak annotation to simplify code Fabio Estevam
@ 2013-01-08 15:57 ` Marek Vasut
2013-01-28 5:54 ` Stefano Babic
2013-02-04 16:37 ` [U-Boot] " Tom Rini
2 siblings, 0 replies; 4+ messages in thread
From: Marek Vasut @ 2013-01-08 15:57 UTC (permalink / raw)
To: u-boot
Dear Fabio Estevam,
> Using the __weak annotation can make the code cleaner.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Just a quickie -- have you checked that noone is using the "default" versions of
all these functions you annotate with __weak?
Other than that:
Acked-by: Marek Vasut <marex@denx.de>
> ---
> common/env_mmc.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/common/env_mmc.c b/common/env_mmc.c
> index ce21671..02bd5ae 100644
> --- a/common/env_mmc.c
> +++ b/common/env_mmc.c
> @@ -46,13 +46,11 @@ DECLARE_GLOBAL_DATA_PTR;
> #define CONFIG_ENV_OFFSET 0
> #endif
>
> -static int __mmc_get_env_addr(struct mmc *mmc, u32 *env_addr)
> +__weak int mmc_get_env_addr(struct mmc *mmc, u32 *env_addr)
> {
> *env_addr = CONFIG_ENV_OFFSET;
> return 0;
> }
> -int mmc_get_env_addr(struct mmc *mmc, u32 *env_addr)
> - __attribute__((weak, alias("__mmc_get_env_addr")));
>
> int env_init(void)
> {
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] common: env_mmc: Use __weak annotation to simplify code
2013-01-08 15:36 [U-Boot] [PATCH] common: env_mmc: Use __weak annotation to simplify code Fabio Estevam
2013-01-08 15:57 ` Marek Vasut
@ 2013-01-28 5:54 ` Stefano Babic
2013-02-04 16:37 ` [U-Boot] " Tom Rini
2 siblings, 0 replies; 4+ messages in thread
From: Stefano Babic @ 2013-01-28 5:54 UTC (permalink / raw)
To: u-boot
On 08/01/2013 16:36, Fabio Estevam wrote:
> Using the __weak annotation can make the code cleaner.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
Applied to u-boot-imx, thanks.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] common: env_mmc: Use __weak annotation to simplify code
2013-01-08 15:36 [U-Boot] [PATCH] common: env_mmc: Use __weak annotation to simplify code Fabio Estevam
2013-01-08 15:57 ` Marek Vasut
2013-01-28 5:54 ` Stefano Babic
@ 2013-02-04 16:37 ` Tom Rini
2 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2013-02-04 16:37 UTC (permalink / raw)
To: u-boot
On Tue, Jan 08, 2013 at 05:36:11AM -0000, Fabio Estevam wrote:
> Using the __weak annotation can make the code cleaner.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> Acked-by: Marek Vasut <marex@denx.de>
Applied to u-boot/master, thanks!
--
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/20130204/755bf57b/attachment.pgp>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-02-04 16:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-08 15:36 [U-Boot] [PATCH] common: env_mmc: Use __weak annotation to simplify code Fabio Estevam
2013-01-08 15:57 ` Marek Vasut
2013-01-28 5:54 ` Stefano Babic
2013-02-04 16:37 ` [U-Boot] " Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox