All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Svyatoslav Ryhel <clamor95@gmail.com>
Cc: Thierry Reding <treding@nvidia.com>, u-boot@lists.denx.de
Subject: Re: [PATCH v1 17/19] ARM: tegra: dt-setup: convert TrustZone remove into config
Date: Thu, 24 Aug 2023 15:33:48 +0200	[thread overview]
Message-ID: <ZOdcPHTsyKxN9OzS@orome> (raw)
In-Reply-To: <86A72122-840F-46B1-9C25-0B6F5AFB82A1@gmail.com>

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

On Wed, Aug 23, 2023 at 02:47:11PM +0300, Svyatoslav Ryhel wrote:
> 
> 
> 23 серпня 2023 р. 14:17:37 GMT+03:00, Thierry Reding <thierry.reding@gmail.com> написав(-ла):
> >On Tue, Aug 22, 2023 at 02:22:15PM +0300, Svyatoslav Ryhel wrote:
> >> Remove of TrustZone nodes is required by many product devices
> >> which require repetable calls of same function from device board.
> >> To simplify this, TZ remove is converted into Kconfig option.
> >> 
> >> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> >> ---
> >>  arch/arm/mach-tegra/Kconfig    | 14 ++++++++++++++
> >>  arch/arm/mach-tegra/dt-setup.c |  7 +++++++
> >>  2 files changed, 21 insertions(+)
> >
> >I kind of preferred the original because it's very explicit. There's
> >also no big advantage in consolidating this because the code is unlikely
> >to ever require changing (the libfdt API is quite stable and these nodes
> >are all hard-coded anyway). This new variant put non-generic code (it
> >requires a Kconfig option after all) into a generic place, so it seems a
> >bit backwards.
> 
> So you say that I have to add same function to boards over and over
> for all devices I plan to mainline? Unneeded code duplication in
> action.

There's a balance to be struck between duplication and readability. If
you insert this board-specific code into a generic code path, that
generic code path becomes difficult to read given the extra #ifdef
guards etc. If you're really worried about duplicating code you can move
the two libfdt calls into a separate function and call that function
from each of the boards that need it.

Thierry

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

  parent reply	other threads:[~2023-08-24 13:33 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-22 11:21 [PATCH v1 00/19] General tegra and board improvements Svyatoslav Ryhel
2023-08-22 11:21 ` [PATCH v1 01/19] ARM: dts: p1801-t: separate from common transformers tree Svyatoslav Ryhel
2023-08-22 11:22 ` [PATCH v1 02/19] ARM: dts: tf600t: " Svyatoslav Ryhel
2023-08-22 11:22 ` [PATCH v1 03/19] configs: transformer_t30: support booting from USB Svyatoslav Ryhel
2023-08-22 11:22 ` [PATCH v1 04/19] ARM: dts: tf201: configure dock USB phy Svyatoslav Ryhel
2023-08-22 11:22 ` [PATCH v1 05/19] board: asus: transformer-t30: remove PMIC GPIOs configuration Svyatoslav Ryhel
2023-08-22 11:22 ` [PATCH v1 06/19] configs: transformer_t30: convert bootmenu option Svyatoslav Ryhel
2023-08-22 11:22 ` [PATCH v1 07/19] ARM: dts: transformer-t30: complete missing bindings Svyatoslav Ryhel
2023-08-22 11:22 ` [PATCH v1 08/19] ARM: dts: endeavoru: " Svyatoslav Ryhel
2023-08-22 11:22 ` [PATCH v1 09/19] ARM: dts: lg-x3: " Svyatoslav Ryhel
2023-08-22 11:22 ` [PATCH v1 10/19] ARM: dts: grouper: " Svyatoslav Ryhel
2023-08-22 11:22 ` [PATCH v1 11/19] configs: transformer_t30: grouper: lg-x3: endeavoru: sync defconfigs Svyatoslav Ryhel
2023-08-22 11:22 ` [PATCH v1 12/19] ARM: tegra114: enable base voltages setup from board Svyatoslav Ryhel
2023-08-22 11:22 ` [PATCH v1 13/19] ARM: tegra210: set default-tap and default-trim values in sdhci nodes Svyatoslav Ryhel
2023-08-22 11:22 ` [PATCH v1 14/19] ARM: tegra20: tegra30: support EBTUPDATE on non-encrypted devices Svyatoslav Ryhel
2023-08-22 11:22 ` [PATCH v1 15/19] ARM: tegra: board2: add generic late init Svyatoslav Ryhel
2023-08-23 11:13   ` Thierry Reding
2023-08-23 11:42     ` Svyatoslav Ryhel
2023-08-23 23:57   ` Simon Glass
2023-08-24  5:41     ` Svyatoslav Ryhel
2023-08-24 14:41       ` Simon Glass
2023-08-22 11:22 ` [PATCH v1 16/19] board: tegra30: remove nvidia_board_late_init calls Svyatoslav Ryhel
2023-08-22 11:22 ` [PATCH v1 17/19] ARM: tegra: dt-setup: convert TrustZone remove into config Svyatoslav Ryhel
2023-08-23 11:17   ` Thierry Reding
2023-08-23 11:47     ` Svyatoslav Ryhel
2023-08-23 14:54       ` Simon Glass
2023-08-23 15:11         ` Svyatoslav Ryhel
2023-08-24 13:33       ` Thierry Reding [this message]
2023-08-24 13:43         ` Svyatoslav Ryhel
2023-08-22 11:22 ` [PATCH v1 18/19] board: tegra30: switch to config version of TZ remove Svyatoslav Ryhel
2023-08-22 11:22 ` [PATCH v1 19/19] board: asus: lg: move config fragments into device boards Svyatoslav Ryhel

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=ZOdcPHTsyKxN9OzS@orome \
    --to=thierry.reding@gmail.com \
    --cc=clamor95@gmail.com \
    --cc=treding@nvidia.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.