All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peng Fan <peng.fan@oss.nxp.com>
To: Francesco Dolcini <francesco@dolcini.it>
Cc: Tom Rini <trini@konsulko.com>,
	u-boot@lists.denx.de, Peng Fan <peng.fan@nxp.com>
Subject: Re: [PATCH 07/14] toradex: common: Add missing headers
Date: Thu, 5 Feb 2026 20:05:39 +0800	[thread overview]
Message-ID: <aYSHk6XMPFsoMQGs@shlinux89> (raw)
In-Reply-To: <20260205075815.GA10676@francesco-nb>

On Thu, Feb 05, 2026 at 08:58:15AM +0100, Francesco Dolcini wrote:
>On Thu, Feb 05, 2026 at 03:20:10PM +0800, Peng Fan wrote:
>> On Wed, Feb 04, 2026 at 01:08:55PM +0100, Francesco Dolcini wrote:
>> >On Tue, Feb 03, 2026 at 06:41:38PM +0800, Peng Fan (OSS) wrote:
>> >> From: Peng Fan <peng.fan@nxp.com>
>> >> 
>> >> Include linux/types.h and asm-generic/u-boot.h. Missing the two header
>> >> files will cause building error after cleaning up usage of
>> >> asm/global_data.h.
>> >> 
>> >> Signed-off-by: Peng Fan <peng.fan@nxp.com>
>> >> ---
>> >>  board/toradex/common/tdx-cfg-block.h | 2 ++
>> >>  board/toradex/common/tdx-common.h    | 2 ++
>> >>  2 files changed, 4 insertions(+)
>> >> 
>> >> diff --git a/board/toradex/common/tdx-cfg-block.h b/board/toradex/common/tdx-cfg-block.h
>> >> index b28033d8332e09d063a6a8ad1d4e334703077f00..067daec0d776070b0b53fc26d1043d6eb781a527 100644
>> >> --- a/board/toradex/common/tdx-cfg-block.h
>> >> +++ b/board/toradex/common/tdx-cfg-block.h
>> >> @@ -6,6 +6,8 @@
>> >>  #ifndef _TDX_CFG_BLOCK_H
>> >>  #define _TDX_CFG_BLOCK_H
>> >>  
>> >> +#include <linux/types.h>
>> >> +
>> >>  #include "tdx-common.h"
>> >>  
>> >>  struct toradex_hw {
>> >> diff --git a/board/toradex/common/tdx-common.h b/board/toradex/common/tdx-common.h
>> >> index d446e9f1d5ca7d3d5a1318b389393d28854e2263..db3369a8f9ef9b409c53c45e94aa5f22933a44fa 100644
>> >> --- a/board/toradex/common/tdx-common.h
>> >> +++ b/board/toradex/common/tdx-common.h
>> >> @@ -6,6 +6,8 @@
>> >>  #ifndef _TDX_COMMON_H
>> >>  #define _TDX_COMMON_H
>> >>  
>> >> +#include <asm-generic/u-boot.h>
>> >> +
>> >
>> >maybe just have the forward declaration?
>> >
>> >  struct bd_info;
>> >
>> >and that's it?
>> 
>> I would not add a common declaration here.
>
>Why?

This is board‑specific code, and explicitly including <asm-generic/u-boot.h>
makes the dependency on struct bd_info clear and self‑contained. Forward
declarations are more useful in common code or headers to avoid dependency
chains, which is not really a concern in this case.

Thanks,
Peng
>
>See also commit c3dc39a2f85b ("arm: Don't include common.h in header files")
>
>Francesco
>

  reply	other threads:[~2026-02-05 12:04 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-03 10:41 [PATCH 00/14] treewide: Clean up usage of DECLARE_GLOBAL_DATA_PTR Peng Fan (OSS)
2026-02-03 10:41 ` [PATCH 01/14] beacon: imx8mm/n: Drop useless files Peng Fan (OSS)
2026-02-03 10:41 ` [PATCH 02/14] mediatek: mt7622: Drop useless board files Peng Fan (OSS)
2026-02-03 10:41 ` [PATCH 03/14] common: cli_hush: Include vsprintf.h Peng Fan (OSS)
2026-02-03 10:41 ` [PATCH 04/14] cmd: mem: " Peng Fan (OSS)
2026-02-03 10:41 ` [PATCH 05/14] test: log_filter: " Peng Fan (OSS)
2026-02-22  1:27   ` David Zang
2026-02-03 10:41 ` [PATCH 06/14] xtensa: relocate: Add missing headers Peng Fan (OSS)
2026-02-03 10:41 ` [PATCH 07/14] toradex: common: " Peng Fan (OSS)
2026-02-04 12:08   ` Francesco Dolcini
2026-02-05  7:20     ` Peng Fan
2026-02-05  7:58       ` Francesco Dolcini
2026-02-05 12:05         ` Peng Fan [this message]
2026-02-03 10:41 ` [PATCH 08/14] tegra: pmc: Cleanup headers Peng Fan (OSS)
2026-02-03 10:41 ` [PATCH 09/14] rockchip: evk_rk3308: " Peng Fan (OSS)
2026-02-03 10:41 ` [PATCH 10/14] nxp: emc2305: " Peng Fan (OSS)
2026-02-03 10:41 ` [PATCH 11/14] pci: layerspace: Add missing header files Peng Fan (OSS)
2026-02-03 10:41 ` [PATCH 12/14] renesas: common: Include asm-generic/u-boot.h Peng Fan (OSS)
2026-02-03 11:42 ` [PATCH 00/14] treewide: Clean up usage of DECLARE_GLOBAL_DATA_PTR Peng Fan
2026-02-03 11:42   ` Peng Fan
2026-02-03 14:17   ` Tom Rini
2026-02-03 14:46     ` Peng Fan
2026-02-03 15:00       ` Tom Rini
2026-02-04  3:58   ` Anshul Dalal

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=aYSHk6XMPFsoMQGs@shlinux89 \
    --to=peng.fan@oss.nxp.com \
    --cc=francesco@dolcini.it \
    --cc=peng.fan@nxp.com \
    --cc=trini@konsulko.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 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.