U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Simon Glass <sjg@chromium.org>,
	Marek Vasut <marek.vasut+renesas@mailbox.org>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>,
	Jerome Forissier <jerome.forissier@linaro.org>,
	Oliver Graute <oliver.graute@kococonnector.com>
Subject: Re: [PATCH v2 02/22] congatec: Include env.h to permit reading the environment
Date: Mon, 5 May 2025 08:43:19 -0600	[thread overview]
Message-ID: <20250505144319.GA5430@bill-the-cat> (raw)
In-Reply-To: <CAFLszTiQ+TOTEa_qV1S4WBGYzPT0=AuF2-4_oDfZgZZjbjM5Ag@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4844 bytes --]

On Sat, May 03, 2025 at 03:27:50PM -0600, Simon Glass wrote:
> Hi Tom,
> 
> On Sat, 3 May 2025 at 10:37, Tom Rini <trini@konsulko.com> wrote:
> >
> > On Sat, May 03, 2025 at 10:30:35AM -0600, Tom Rini wrote:
> > > On Fri, May 02, 2025 at 08:10:30PM -0600, Simon Glass wrote:
> > > > Hi Tom,
> > > >
> > > > On Fri, 2 May 2025 at 09:04, Tom Rini <trini@konsulko.com> wrote:
> > > > >
> > > > > On Fri, May 02, 2025 at 08:52:37AM -0600, Simon Glass wrote:
> > > > > > Hi Tom,
> > > > > >
> > > > > > On Fri, 2 May 2025 at 08:06, Tom Rini <trini@konsulko.com> wrote:
> > > > > > >
> > > > > > > On Fri, May 02, 2025 at 07:11:56AM -0600, Simon Glass wrote:
> > > > > > > > Hi Tom,
> > > > > > > >
> > > > > > > > On Thu, 1 May 2025 at 09:33, Tom Rini <trini@konsulko.com> wrote:
> > > > > > > > >
> > > > > > > > > On Thu, May 01, 2025 at 09:04:45AM -0600, Simon Glass wrote:
> > > > > > > > > > Hi Tom,
> > > > > > > > > >
> > > > > > > > > > On Thu, 1 May 2025 at 08:06, Tom Rini <trini@konsulko.com> wrote:
> > > > > > > > > > >
> > > > > > > > > > > On Wed, Apr 30, 2025 at 07:04:27PM -0600, Simon Glass wrote:
> > > > > > > > > > > > This file reads from the environment but does not include the correct
> > > > > > > > > > > > header. Update it.
> > > > > > > > > > > >
> > > > > > > > > > > > Drop the unnecessary config.h while we are here.
> > > > > > > > > > >
> > > > > > > > > > > Are you sure about that? It was explicitly added in commit
> > > > > > > > > > > ab61cc7d98f6 ("board: congatec: Remove <common.h> and add needed
> > > > > > > > > > > includes") probably because of CFG_SYS_... usage.
> > > > > > > > > >
> > > > > > > > > > Well I assumed it wouldn't build if it had it, but perhaps that is
> > > > > > > > > > incorrect? I understood that CFG_ things had to be values and you
> > > > > > > > > > couldn't #idef them?
> > > > > > > > >
> > > > > > > > > The cases where in that series I added config.h were for good reason,
> > > > > > > > > either failure to build or tricky size change reasons. All were
> > > > > > > > > intentional. An audit-and-remove of config.h would be it's own series as
> > > > > > > > > yes, there's perhaps not the need now as whatever complex chain was
> > > > > > > > > unwound.
> > > > > > > >
> > > > > > > > Oh dear, OK. I'll respin the series.
> > > > > > > >
> > > > > > > > Hmm but I see you have sent a series that does some similar tweak[1].
> > > > > > > > What was the goal there?
> > > > > > >
> > > > > > > I fixed your problem. Please don't bother re-spinning this series, it's
> > > > > > > not clear what problems it's solving correctly.
> > > > > >
> > > > > > OK thanks. The problem was trying to include net.h in include/efi.h:
> > > > > >
> > > > > > https://patchwork.ozlabs.org/project/uboot/cover/20250501010456.3930701-1-sjg@chromium.org/
> > > > >
> > > > > Adding headers to headers needs extra care (so that we don't end up with
> > > > > massive implicit include chains).
> > > > >
> > > > > > So long as that works, we're fine. Having said that, even if it were a
> > > > > > problem, we could always refactor things to put the Ethernet decls in
> > > > > > a separate header.
> > > > >
> > > > > Yes, if there's some problem down the line then some refactoring is
> > > > > likely the thing to look at, not adding more headers to C files (the
> > > > > right path is to unwind the header chain and fix C files, your series
> > > > > doesn't remove env.h from any header).
> > > >
> > > > I hope we haven't got confused here.
> > > >
> > > > My series removed env.h from being *transitively* included. I had to
> > > > add it to C files due to that.
> > >
> > > Yes, which may or may not be helpful. A transitive include in a C file
> > > is not terrible, otherwise many files will have 20+ includes. A
> > > transitive include in header file, which in turn pulls in another which
> > > pulls in another, is a problem. And the header should be unwound and C
> > > files then fixed.
> > >
> > > > Your series doesn't help with including net.h in efi.h - you can try
> > > > that and see that it still fails.
> > >
> > > Perhaps I took it out too quickly then, I'd have sworn I build sandbox
> > > with that change added.
> >
> > Yeah, I guess I removed it too quick and missed fixing
> > drivers/usb/gadget/epautoconf.c still, along with whatever the right
> > answer is for unwinding the exfat oddity. Likely seeing what the pain is
> > over using the normal byteswap headers instead.
> 
> OK, are you thinking of taking a look at that? Or do you think it
> would be better to change exfat to use the linux/byteorder stuff
> (which I somewhat prefer)?

Yes, I would like to hear Marek's thoughts on changing exfat to use the
normal byteswap functions.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2025-05-05 14:43 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-01  1:04 [PATCH v2 00/22] Deal with exfat versus byteorder Simon Glass
2025-05-01  1:04 ` [PATCH v2 01/22] net: Use a forward declaration for cmd_tbl in net-common.h Simon Glass
2025-05-01  1:04 ` [PATCH v2 02/22] congatec: Include env.h to permit reading the environment Simon Glass
2025-05-01 14:06   ` Tom Rini
2025-05-01 15:04     ` Simon Glass
2025-05-01 15:33       ` Tom Rini
2025-05-02 13:11         ` Simon Glass
2025-05-02 14:06           ` Tom Rini
2025-05-02 14:52             ` Simon Glass
2025-05-02 15:04               ` Tom Rini
2025-05-03  2:10                 ` Simon Glass
2025-05-03 16:30                   ` Tom Rini
2025-05-03 16:37                     ` Tom Rini
2025-05-03 21:27                       ` Simon Glass
2025-05-05 14:43                         ` Tom Rini [this message]
2025-05-01  1:04 ` [PATCH v2 03/22] dhelectronics: " Simon Glass
2025-05-01  1:04 ` [PATCH v2 04/22] imx8ulp_evk: " Simon Glass
2025-05-01  1:04 ` [PATCH v2 05/22] venice: " Simon Glass
2025-05-01  1:04 ` [PATCH v2 06/22] phytec: " Simon Glass
2025-05-01  1:04 ` [PATCH v2 07/22] ronetix: " Simon Glass
2025-05-01  1:04 ` [PATCH v2 08/22] toradex: " Simon Glass
2025-05-01  1:04 ` [PATCH v2 09/22] advantech: Include env.h in imx8qm_dmsse20_a1 Simon Glass
2025-05-08 10:27   ` Oliver Graute
2025-05-01  1:04 ` [PATCH v2 10/22] tegra: Include env.h to permit reading the environment Simon Glass
2025-05-01  1:04 ` [PATCH v2 11/22] synology: " Simon Glass
2025-05-01  3:21   ` Tony Dinh
2025-05-02  8:17   ` Stefan Roese
2025-05-01  1:04 ` [PATCH v2 12/22] amlogic: " Simon Glass
2025-05-08 16:18   ` Viacheslav
2025-05-01  1:04 ` [PATCH v2 13/22] freescale: " Simon Glass
2025-05-01  1:04 ` [PATCH v2 14/22] google: " Simon Glass
2025-05-01  1:04 ` [PATCH v2 15/22] liebherr: " Simon Glass
2025-05-01  6:17   ` Lukasz Majewski
2025-05-01  1:04 ` [PATCH v2 16/22] technexion: " Simon Glass
2025-05-01  1:04 ` [PATCH v2 17/22] elf: Only use network environment-variables if net enabled Simon Glass
2025-05-05 12:37   ` Jerome Forissier
2025-05-01  1:04 ` [PATCH v2 18/22] net: Include byteorder in net6.h Simon Glass
2025-05-01  1:04 ` [PATCH v2 19/22] net: Include string.h in net-legacy.h Simon Glass
2025-05-05 12:38   ` Jerome Forissier
2025-05-01  1:04 ` [PATCH v2 20/22] net: Include env.h in pcap.c Simon Glass
2025-05-01  1:04 ` [PATCH v2 21/22] net: dc2114x: Include env.h to permit reading the environment Simon Glass
2025-05-01  1:04 ` [PATCH v2 22/22] net: Move env_get_ip() out of the header file Simon Glass
2025-05-01  2:02 ` [PATCH v2 00/22] Deal with exfat versus byteorder Marek Vasut
2025-05-01 12:07   ` Simon Glass
2025-05-01 14:17     ` Tom Rini
2025-05-01 15:03       ` Simon Glass
2025-05-01 15:35         ` 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=20250505144319.GA5430@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=jerome.forissier@linaro.org \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=oliver.graute@kococonnector.com \
    --cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox