From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/6] config_distro_bootcmd.h: Add shared block definition for the host interface
Date: Mon, 02 Mar 2015 09:54:08 -0700 [thread overview]
Message-ID: <54F495B0.6030806@wwwdotorg.org> (raw)
In-Reply-To: <CAPnjgZ3dr_TzKfoTiZ5gFvwAr52YcXUBdegokyPgBsiqRZRXrw@mail.gmail.com>
On 02/28/2015 07:14 AM, Simon Glass wrote:
> +Stephen for real this time
>
> Hi Sjoerd,
>
> On 28 February 2015 at 07:05, Sjoerd Simons
> <sjoerd.simons@collabora.co.uk> wrote:
>> On Fri, 2015-02-20 at 12:23 -0700, Simon Glass wrote:
>>> +Stephen who knows more about this stuff
>>>
>>> On 19 February 2015 at 15:41, Sjoerd Simons
>>> <sjoerd.simons@collabora.co.uk> wrote:
>>>> Define the common shared block environment for the host interface in
>>>> preperation for the sandbox build to use config_distro_bootcmd.
>>>>
>>>> Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
>>>> ---
>>>> include/config_distro_bootcmd.h | 13 +++++++++++++
>>>> 1 file changed, 13 insertions(+)
>>>>
>>>> diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
>>>> index 07a0b3b..ff0e3a8 100644
>>>> --- a/include/config_distro_bootcmd.h
>>>> +++ b/include/config_distro_bootcmd.h
>>>> @@ -32,6 +32,18 @@
>>>> #define BOOTENV_DEV_NAME_BLKDEV(devtypeu, devtypel, instance) \
>>>> #devtypel #instance " "
>>>>
>>>> +#ifdef CONFIG_SANDBOX
>>>> +#define BOOTENV_SHARED_HOST BOOTENV_SHARED_BLKDEV(host)
>>>> +#define BOOTENV_DEV_HOST BOOTENV_DEV_BLKDEV
>>>> +#define BOOTENV_DEV_NAME_HOST BOOTENV_DEV_NAME_BLKDEV
>>>> +#else
>>>> +#define BOOTENV_SHARED_HOST
>>>> +#define BOOTENV_DEV_HOST \
>>>> + BOOT_TARGET_DEVICES_references_HOST_without_CONFIG_SANDBOX
>>>> +#define BOOTENV_DEV_NAME_HOST \
>>>
>>> Can we use upper case in #defines?
>>
>> The reason for this is that it is consistent with all other block device
>> blocks in that file e.g:
>>
>> #define BOOTENV_DEV_SATA \
>> BOOT_TARGET_DEVICES_references_SATA_without_CONFIG_CMD_SATA
>>
>> So i'd prefer to to keep it that way. Btw, note that this is used for
>> compile time error reporting rather then something you'd refer to in
>> code.
>
> OK I see.
Yes, in this case that mixed-case variable name is essentially an error
message to the user. The mixed case hopefully makes it more legible
since only other variable names are in upper case, and the rest of the
warning text is lower case. We can't use e.g. #error here, since this
error can only be detected in the middle of a macro expansion rather
than via some top-level singleton #if/#ifdef check.
next prev parent reply other threads:[~2015-03-02 16:54 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-19 22:41 [U-Boot] [PATCH 0/6] Allow sandbox to use config_distro_bootcmd Sjoerd Simons
2015-02-19 22:41 ` [U-Boot] [PATCH 1/6] sandbox: only do sandboxfs for hostfs interface Sjoerd Simons
2015-02-20 19:22 ` Simon Glass
2015-04-01 1:59 ` Simon Glass
2015-02-19 22:41 ` [U-Boot] [PATCH 2/6] sandbox: Add support for bootz Sjoerd Simons
2015-02-20 19:23 ` Simon Glass
2015-02-19 22:41 ` [U-Boot] [PATCH 3/6] sandbox: Implement host dev [device] Sjoerd Simons
2015-02-20 19:23 ` Simon Glass
2015-02-28 14:00 ` Sjoerd Simons
2015-03-02 21:58 ` Simon Glass
2015-03-03 7:48 ` Sjoerd Simons
2015-02-19 22:41 ` [U-Boot] [PATCH 4/6] config_distro_bootcmd.h: Add shared block definition for the host interface Sjoerd Simons
2015-02-20 19:23 ` Simon Glass
2015-02-28 14:05 ` Sjoerd Simons
2015-02-28 14:14 ` Simon Glass
2015-03-02 16:54 ` Stephen Warren [this message]
2015-03-02 18:58 ` Simon Glass
2015-02-19 22:41 ` [U-Boot] [PATCH 5/6] pxe: Ensure all memory access is to mapped memory Sjoerd Simons
2015-02-20 19:23 ` Simon Glass
2015-02-28 14:12 ` Sjoerd Simons
2015-02-28 14:16 ` Simon Glass
2015-02-19 22:41 ` [U-Boot] [PATCH 6/6] sandbox: add config_distro_defaults and config_distro_bootcmd Sjoerd Simons
2015-02-20 19:23 ` Simon Glass
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=54F495B0.6030806@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--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