Patch Set 2:

Patch Set 2:

where are you getting this error - is this from depthcharge/src/board/tglrvp/board.c?

i was doing emerge-tglrvp depthcharge libpayload and could see this issue.


i'd suggest moving <libpayload.h> and <sysinfo.h> up in the up in the include order.
also, which file is including ec_commands.h directly? it may be better to include
ec.h instead. it's essentially a wrapper and will take care of the libpayload.h
dependency and ordering.

ec_commands.h has a guard for a previous BIT, so as long as libpayload.h comes
first, it'll be fine.

+#include <libpayload.h>
+#include <sysinfo.h>
#include "base/init_funcs.h"
#include "base/list.h"
#include "drivers/ec/cros/lpc.h"
@@ -33,25 +35,33 @@
#include "drivers/power/pch.h"
#include "drivers/storage/blockdev.h"
#include "drivers/storage/nvme.h"
-#include <libpayload.h>
-#include <sysinfo.h>

this is fixing as well. But do you like to have this hard dependency of include ordering or having this check here make sense.
I believe this issue has started coming along with EC_HEADERS CL.

ya, the issue started with the EC_HEADERS CL. the issue is that care
must be taken when sharing headers with another source tree and
cpu arch - whether it's a checked-in copy or an auto-exported copy.
the wrapper shouldn't have any include ordering issues.
it's better to use the wrapper header file than directly using
the "low level" header file. over time, there may be other quirks
that we'd want to handle in the wrapper as well. we'll make sure
the wrapper header file gets us the right thing.

View Change

To view, visit change 41059. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I0a5fd069acbd7e59980f6602b63362fcb3220009
Gerrit-Change-Number: 41059
Gerrit-PatchSet: 2
Gerrit-Owner: Subrata Banik <subrata.banik@intel.com>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Caveh Jalali <caveh@chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan@google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-Comment-Date: Tue, 05 May 2020 11:16:36 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment