public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] common: env_common: make env_get_char_spec __weak
@ 2014-07-10 21:27 Jeroen Hofstee
  2014-07-10 21:51 ` Jeroen Hofstee
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jeroen Hofstee @ 2014-07-10 21:27 UTC (permalink / raw)
  To: u-boot

---
yup another clang warning:

common/env_common.c:30:14: warning: unused function '__env_get_char_spec' [-Wunused-function]
static uchar __env_get_char_spec(int index)
             ^
---
 common/env_common.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/common/env_common.c b/common/env_common.c
index cd7b4cd..3b979bc 100644
--- a/common/env_common.c
+++ b/common/env_common.c
@@ -27,12 +27,10 @@ struct hsearch_data env_htab = {
 	.change_ok = env_flags_validate,
 };
 
-static uchar __env_get_char_spec(int index)
+__weak uchar env_get_char_spec(int index)
 {
 	return *((uchar *)(gd->env_addr + index));
 }
-uchar env_get_char_spec(int)
-	__attribute__((weak, alias("__env_get_char_spec")));
 
 static uchar env_get_char_init(int index)
 {
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH] common: env_common: make env_get_char_spec __weak
  2014-07-10 21:27 [U-Boot] [PATCH] common: env_common: make env_get_char_spec __weak Jeroen Hofstee
@ 2014-07-10 21:51 ` Jeroen Hofstee
  2014-07-11  4:26 ` Wolfgang Denk
  2014-07-12 13:22 ` [U-Boot] [PATCH v2] " Jeroen Hofstee
  2 siblings, 0 replies; 7+ messages in thread
From: Jeroen Hofstee @ 2014-07-10 21:51 UTC (permalink / raw)
  To: u-boot

Hi Jeroen,

On 10-07-14 23:27, Jeroen Hofstee wrote:
> ---
> yup another clang warning:
>
> common/env_common.c:30:14: warning: unused function '__env_get_char_spec' [-Wunused-function]
> static uchar __env_get_char_spec(int index)
>               ^
> ---
>   common/env_common.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/common/env_common.c b/common/env_common.c
> index cd7b4cd..3b979bc 100644
> --- a/common/env_common.c
> +++ b/common/env_common.c
> @@ -27,12 +27,10 @@ struct hsearch_data env_htab = {
>   	.change_ok = env_flags_validate,
>   };
>   
> -static uchar __env_get_char_spec(int index)
> +__weak uchar env_get_char_spec(int index)
>   {
>   	return *((uchar *)(gd->env_addr + index));
>   }
> -uchar env_get_char_spec(int)
> -	__attribute__((weak, alias("__env_get_char_spec")));
>   
>   static uchar env_get_char_init(int index)
>   {

signed-off is missing?

Regards,
Jeroen

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH] common: env_common: make env_get_char_spec __weak
  2014-07-10 21:27 [U-Boot] [PATCH] common: env_common: make env_get_char_spec __weak Jeroen Hofstee
  2014-07-10 21:51 ` Jeroen Hofstee
@ 2014-07-11  4:26 ` Wolfgang Denk
  2014-07-11 17:16   ` Jeroen Hofstee
  2014-07-12 13:22 ` [U-Boot] [PATCH v2] " Jeroen Hofstee
  2 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Denk @ 2014-07-11  4:26 UTC (permalink / raw)
  To: u-boot

Dear Jeroen,

In message <1405027670-28516-1-git-send-email-jeroen@myspectrum.nl> you wrote:
>  
> -static uchar __env_get_char_spec(int index)
> +__weak uchar env_get_char_spec(int index)

__weak static ... ?

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
Experience is what causes a person to make new  mistakes  instead  of
old ones.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH] common: env_common: make env_get_char_spec __weak
  2014-07-11  4:26 ` Wolfgang Denk
@ 2014-07-11 17:16   ` Jeroen Hofstee
  2014-07-11 19:14     ` Wolfgang Denk
  0 siblings, 1 reply; 7+ messages in thread
From: Jeroen Hofstee @ 2014-07-11 17:16 UTC (permalink / raw)
  To: u-boot

Hello Wolfgang,

On 11-07-14 06:26, Wolfgang Denk wrote:
> Dear Jeroen,
>
> In message <1405027670-28516-1-git-send-email-jeroen@myspectrum.nl> you wrote:
>>   
>> -static uchar __env_get_char_spec(int index)
>> +__weak uchar env_get_char_spec(int index)
> __weak static ... ?

tempting huh, but it is the patch format with tricks
you in thinking that. The weak is actually added to
the function without the leading underscores, a
couple of lines below (which wasn't static and
shouldn't become so).

Regards,
Jeroen

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH] common: env_common: make env_get_char_spec __weak
  2014-07-11 17:16   ` Jeroen Hofstee
@ 2014-07-11 19:14     ` Wolfgang Denk
  0 siblings, 0 replies; 7+ messages in thread
From: Wolfgang Denk @ 2014-07-11 19:14 UTC (permalink / raw)
  To: u-boot

Dear Jeroen Hofstee,

In message <53C01BD7.8030608@myspectrum.nl> you wrote:
> 
> >> -static uchar __env_get_char_spec(int index)
> >> +__weak uchar env_get_char_spec(int index)
> > __weak static ... ?
> 
> tempting huh, but it is the patch format with tricks
> you in thinking that. The weak is actually added to
> the function without the leading underscores, a
> couple of lines below (which wasn't static and
> shouldn't become so).

Argh.  You are right.

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
Sometimes, too long is too long.                          - Joe Crowe

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v2] common: env_common: make env_get_char_spec __weak
  2014-07-10 21:27 [U-Boot] [PATCH] common: env_common: make env_get_char_spec __weak Jeroen Hofstee
  2014-07-10 21:51 ` Jeroen Hofstee
  2014-07-11  4:26 ` Wolfgang Denk
@ 2014-07-12 13:22 ` Jeroen Hofstee
  2014-07-21 20:43   ` [U-Boot] [U-Boot, " Tom Rini
  2 siblings, 1 reply; 7+ messages in thread
From: Jeroen Hofstee @ 2014-07-12 13:22 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
---
yup another clang warning:

common/env_common.c:30:14: warning: unused function '__env_get_char_spec' [-Wunused-function]
static uchar __env_get_char_spec(int index)
             ^

changes since v1:
  add missing S-O-B line
---
 common/env_common.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/common/env_common.c b/common/env_common.c
index cd7b4cd..3b979bc 100644
--- a/common/env_common.c
+++ b/common/env_common.c
@@ -27,12 +27,10 @@ struct hsearch_data env_htab = {
 	.change_ok = env_flags_validate,
 };
 
-static uchar __env_get_char_spec(int index)
+__weak uchar env_get_char_spec(int index)
 {
 	return *((uchar *)(gd->env_addr + index));
 }
-uchar env_get_char_spec(int)
-	__attribute__((weak, alias("__env_get_char_spec")));
 
 static uchar env_get_char_init(int index)
 {
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [U-Boot, v2] common: env_common: make env_get_char_spec __weak
  2014-07-12 13:22 ` [U-Boot] [PATCH v2] " Jeroen Hofstee
@ 2014-07-21 20:43   ` Tom Rini
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2014-07-21 20:43 UTC (permalink / raw)
  To: u-boot

On Sat, Jul 12, 2014 at 03:22:13PM +0200, Jeroen Hofstee wrote:

> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>

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/20140721/d5d91eef/attachment.pgp>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-07-21 20:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-10 21:27 [U-Boot] [PATCH] common: env_common: make env_get_char_spec __weak Jeroen Hofstee
2014-07-10 21:51 ` Jeroen Hofstee
2014-07-11  4:26 ` Wolfgang Denk
2014-07-11 17:16   ` Jeroen Hofstee
2014-07-11 19:14     ` Wolfgang Denk
2014-07-12 13:22 ` [U-Boot] [PATCH v2] " Jeroen Hofstee
2014-07-21 20:43   ` [U-Boot] [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