public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: unsik Kim <donari75@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] Initial mflash support
Date: Wed, 18 Feb 2009 12:32:02 +0900	[thread overview]
Message-ID: <499B8132.7010400@gmail.com> (raw)
In-Reply-To: <20090217084124.GC7712@game.jcrosoft.org>


>>>> +/* must override this function */
>>>> +struct mg_drv_data * __attribute__((weak)) mg_get_drv_data (void)
>>>> +{
>>>> +	puts ("### WARNING ### port mg_get_drv_data function\n");
>>>> +	return NULL;
>>>> +}
>>> please do an compile error not a run time error
>> IMHO, compile error (or warning) is not a good choice for this case.
> sorry no beacause everyone does not have the board to test it, a compile error
> will at least help use to check if we brake the board or not
Ok, I understand.
>> Compile time error always generate error even though override function
>> exist.
> not necessarely
> does you driver allow multiple instance of mflash?
> if no you does not implement the function
mflash driver doesn't use multiple instance.
I can't understand your thought exactly.

If I remove mg_get_drv_data() default weak function and just add weak attribute
to it's prototype, build works well but it's logically same as original one.
User still don't get any information at build time.

Do you want to just leave mg_get_drv_data() to unresolved symbol ?
If user does not port it, link error will be generate. Is it U-boot's driver
policy ?

Regards,
unsik Kim

      reply	other threads:[~2009-02-18  3:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-13 11:06 [U-Boot] [U-BOOT][PATCH 1/3] Initial mflash support unsik Kim
2009-02-14 11:51 ` Jean-Christophe PLAGNIOL-VILLARD
2009-02-17  7:09   ` [U-Boot] [PATCH " unsik Kim
2009-02-17  8:41     ` Jean-Christophe PLAGNIOL-VILLARD
2009-02-18  3:32       ` unsik Kim [this message]

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=499B8132.7010400@gmail.com \
    --to=donari75@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox