From: Alexander Aring <alex.aring@gmail.com>
To: Holger Schurig <holgerschurig@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 2/4] sandbox: only access of_add_memory_bank if it's defined
Date: Thu, 26 Jun 2014 11:43:56 +0200 [thread overview]
Message-ID: <20140626094355.GA10359@omega> (raw)
In-Reply-To: <20140626093701.GA9619@omega>
On Thu, Jun 26, 2014 at 11:37:01AM +0200, Alexander Aring wrote:
> Hi Holger,
>
> can you please check if this is also a solution for this?
>
> diff --git a/include/of.h b/include/of.h
> index e6993fd..76845e7 100644
> --- a/include/of.h
> +++ b/include/of.h
> @@ -227,7 +227,14 @@ int of_parse_partitions(struct cdev *cdev, struct device_node *node);
> int of_device_is_stdout_path(struct device_d *dev);
> const char *of_get_model(void);
> void *of_flatten_dtb(struct device_node *node);
> +#ifdef CONFIG_OFTREE_MEM_GENERIC
> int of_add_memory(struct device_node *node, bool dump);
> +#else
> +static inline int of_add_memory(struct device_node *node, bool dump)
> +{
> + return -EINVAL;
> +}
> +#endif
> void of_add_memory_bank(struct device_node *node, bool dump, int r,
> u64 base, u64 size);
> struct device_d *of_find_device_by_node_path(const char *path);
>
>
>
Okay the implementation "#ifdef CONFIG_OFTREE_MEM_GENERIC" for function
of_add_memory, need to be there.
Other option would be to put this function in a separete file which
depends on CONFIG_OFTREE_MEM_GENERIC and do in the header file the above
solution one. Don't know if this is better. Then you could drop the
#ifdef CONFIG_OFTREE_MEM_GENERIC from the implementation.
- Alex
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2014-06-26 9:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-26 8:49 [PATCH 2/4] sandbox: only access of_add_memory_bank if it's defined Holger Schurig
2014-06-26 9:37 ` Alexander Aring
2014-06-26 9:39 ` Alexander Aring
2014-06-26 9:43 ` Holger Schurig
2014-06-26 9:48 ` Alexander Aring
2014-06-26 9:43 ` Alexander Aring [this message]
2014-06-26 20:42 ` Sascha Hauer
2014-06-27 7:28 ` Alexander Aring
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=20140626094355.GA10359@omega \
--to=alex.aring@gmail.com \
--cc=barebox@lists.infradead.org \
--cc=holgerschurig@gmail.com \
/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.