[U-Boot] [PATCH 1/7] i2c: Use __weak instead of __attribute__((weak, alias))

Wolfgang Denk wd at denx.de
Tue Nov 13 08:16:13 CET 2012


Dear Marek Vasut,

In message <1352766871-892-1-git-send-email-marex at denx.de> you wrote:
> Use __weak from linux/compiler.h instead of __attribute__((weak, alias))
> to define overridable function. This patch is intended as a cleanup patch
> to bring some consistency into the code.
> 
> Signed-off-by: Marek Vasut <marex at denx.de>
> Cc: Heiko Schocher <hs at denx.de>
> ---
>  common/cmd_i2c.c |   16 +++++++---------
>  1 file changed, 7 insertions(+), 9 deletions(-)

The actual definition of __weak is in include/linux/compiler-gcc.h and
looks like this:

	#define __weak	__attribute__((weak))

which means you omit the ", alias" part of the existing code.

Are you 100% sure that this has no impacts on the behaviour?

In my understanding, "weak" and "weak, alias" are not exactly the
same...

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
While most peoples' opinions change, the conviction of their correct-
ness never does.


More information about the U-Boot mailing list