All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 5/9] Fix up inclusion of common.h
Date: Fri, 12 May 2017 19:11:10 -0600	[thread overview]
Message-ID: <CAPnjgZ38Qeyk4Nx_S-rF0TG4Dd9s5D_dHONN-cSvmdVdbu7M2Q@mail.gmail.com> (raw)
In-Reply-To: <CAK7LNASNerKGGz9LdHVhz1dCkhqC-GvRb5TN0KTtSXWX73-1vw@mail.gmail.com>

Hi Masahiro,

On 10 May 2017 at 20:21, Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
> Hi Simon
>
> 2017-05-11 6:43 GMT+09:00 Tom Rini <trini@konsulko.com>:
>> On Mon, May 01, 2017 at 09:18:48AM -0600, Simon Glass wrote:
>>
>>> It is good practice to include common.h as the first header. This ensures
>>> that required features like the DECLARE_GLOBAL_DATA_PTR macro,
>>> configuration options and common types are available.
>>>
>>> Fix up some files which currently don't do this. This is necessary because
>>> driver model will soon start using global data and configuration in the
>>> dm/ofnode.h header file, included via dm.h.
>>>
>>> Signed-off-by: Simon Glass <sjg@chromium.org>
>>
>> Reviewed-by: Tom Rini <trini@konsulko.com>
>
>
> NACK.
>
> include/common.h is really bad idea
> and this is a step backward.
>
> If you need something in your include/dm/ofnode.h
> you should include needed header(s) from it.
>
> Why do you need to touch lots of C files?

All of these files fail to build when they cannot see global_data.
Also we need access to CONFIG options in dm.h. So I think we have to
have common.h - it is (I think) a rule that all files should have
common.h and have it first, because any other header.

Regards,
Simon

  reply	other threads:[~2017-05-13  1:11 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-01 15:18 [U-Boot] [PATCH v2 0/9] dm: Prepare for supporting a live device tree Simon Glass
2017-05-01 15:18 ` [U-Boot] [PATCH v2 1/9] dm: Use dm.h header when driver mode is used Simon Glass
2017-05-10 21:43   ` Tom Rini
2017-05-11  2:12     ` Masahiro Yamada
2017-05-13  1:11       ` Simon Glass
2017-05-16  9:56         ` Masahiro Yamada
2017-05-17 10:07           ` Simon Glass
2017-05-01 15:18 ` [U-Boot] [PATCH v2 2/9] dm: core: Move dev_get_addr() etc. into a separate file Simon Glass
2017-05-10 21:43   ` Tom Rini
2017-05-16 10:04   ` Masahiro Yamada
2017-05-17 10:09     ` Simon Glass
2017-05-01 15:18 ` [U-Boot] [PATCH v2 3/9] dm: Rename dev_addr..() functions Simon Glass
2017-05-10 21:43   ` Tom Rini
2017-05-01 15:18 ` [U-Boot] [PATCH v2 4/9] atmel: Fix up use of dm_scan_fdt_node() Simon Glass
2017-05-10 21:43   ` Tom Rini
2017-05-01 15:18 ` [U-Boot] [PATCH v2 5/9] Fix up inclusion of common.h Simon Glass
2017-05-10 21:43   ` Tom Rini
2017-05-11  2:21     ` Masahiro Yamada
2017-05-13  1:11       ` Simon Glass [this message]
2017-05-16 10:32         ` Masahiro Yamada
2017-05-17 10:09           ` Simon Glass
2017-05-20 16:50             ` Masahiro Yamada
2017-05-01 15:18 ` [U-Boot] [PATCH v2 6/9] dm: core: Dont export dm_scan_fdt_node() Simon Glass
2017-05-10 21:43   ` Tom Rini
2017-05-01 15:18 ` [U-Boot] [PATCH v2 7/9] dm: core: Replace of_offset with accessor (part 2) Simon Glass
2017-05-10 21:43   ` Tom Rini
2017-05-01 15:18 ` [U-Boot] [PATCH v2 8/9] dm: core: Add ofnode to represent device tree nodes Simon Glass
2017-05-10 21:43   ` Tom Rini
2017-05-11  2:33   ` Masahiro Yamada
2017-05-13  1:11     ` Simon Glass
2017-05-16 10:35   ` Masahiro Yamada
2017-05-20  2:29     ` Simon Glass
2017-05-20 16:17       ` Masahiro Yamada
2017-05-01 15:18 ` [U-Boot] [PATCH v2 9/9] dm: core: Adjust device_bind_common() to take an ofnode Simon Glass
2017-05-10 21:43   ` Tom Rini

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=CAPnjgZ38Qeyk4Nx_S-rF0TG4Dd9s5D_dHONN-cSvmdVdbu7M2Q@mail.gmail.com \
    --to=sjg@chromium.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 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.