All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.m@jp.panasonic.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] cmd_test: fix a compile error on Blackfin
Date: Tue, 19 Nov 2013 16:50:27 +0900	[thread overview]
Message-ID: <20131119165027.30BC.AA925319@jp.panasonic.com> (raw)
In-Reply-To: <20131119070144.70D40380481@gemini.denx.de>

Hello Wolfgang


> In message <1384830117-25345-1-git-send-email-yamada.m@jp.panasonic.com> you wrote:
> > Before this commit, common/cmd_test.c defined
> > _STDBOOL_H in order to avoid including <stdbool.h>.
> > But this work-around is not a good idea.
> 
> Actually it is a good idea, as it attempts to be independent of the
> actual implementation of the bool data types - it does the same no
> matter if "true" and "flase" are members or a union or #define'd
> constants.

If you think so,  the following also depends on the impilementation
of <stdbool.h>, doesn't it?

#define _STDBOOL_H

#include <common.h>
#include <command.h>


For example, if <stdbool.h> used
_STDBOOL_H_  or  __STDBOOL_H  instead of _STDBOOL_H,
<stdbool.h> would be included and 
common/cmd_test.c  would not be compiled correctly.




> I don't like this.  I feel we should not change global files (that
> build fine for everyone else) to work around problems in one specific
> implementation.  Instead, we should fix the problem at the root cause,
> for example like that.   Could you please test if this patch fixes the
> problem, too?
> 
> 
> From f68e524dd72c9cc08e86b479b82eff59ef6d591b Mon Sep 17 00:00:00 2001
> From: Wolfgang Denk <wd@denx.de>
> Date: Tue, 19 Nov 2013 07:50:46 +0100
> Subject: [PATCH] Blackfin: don't use 'bool' when it causes problems

[snipped]

> @@ -51,7 +51,7 @@ extern u_long get_dclk(void);
>  
>  # define bfin_revid() (bfin_read_CHIPID() >> 28)
>  
> -extern bool bfin_os_log_check(void);
> +extern int bfin_os_log_check(void);
>  extern void bfin_os_log_dump(void);
>  
>  extern void blackfin_icache_flush_range(const void *, const void *);

Yes. Your patch fixed the build error.



Best Regards
Masahiro Yamada

  reply	other threads:[~2013-11-19  7:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-19  3:01 [U-Boot] [PATCH] cmd_test: fix a compile error on Blackfin Masahiro Yamada
2013-11-19  3:15 ` Masahiro Yamada
2013-11-19  7:01 ` Wolfgang Denk
2013-11-19  7:50   ` Masahiro Yamada [this message]
2013-11-25  1:43   ` Masahiro Yamada
2013-11-25 13:06     ` Tom Rini
2013-11-25 14:19     ` Wolfgang Denk
2013-11-26 10:34       ` Masahiro Yamada
2013-11-25 21:58   ` [U-Boot] " Tom Rini
2013-11-19 15:51 ` [U-Boot] [PATCH] " Måns Rullgård
2013-11-20  4:29   ` Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131119165027.30BC.AA925319@jp.panasonic.com \
    --to=yamada.m@jp.panasonic.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.