mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Colin Cross <ccross@android.com>, Thierry Reding <treding@nvidia.com>
Cc: Aniruddha Rao <anrao@nvidia.com>, Kees Cook <kees@kernel.org>,
	Kees Cook <kees+treewide@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: linux-next: manual merge of the tegra tree with the origin tree
Date: Tue, 10 Nov 2026 16:41:56 +0000	[thread overview]
Message-ID: <avNJVJwZOOZ96FD9@sirena.org.uk> (raw)

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

Hi all,

Today's linux-next merge of the tegra tree got a conflict in:

  drivers/firmware/tegra/bpmp.c

between commit:

  4dd10fbbeb9c3 ("treewide: Convert devm_kmalloc() family to the devm_kmalloc_obj() family")

from the origin tree and commits:

  ee98ea41ee3fb ("firmware: tegra: bpmp: Add ACPI support")
  7432bd82f69e5 ("firmware: tegra: bpmp: Add MBWT BPMP helpers")
  fc92a01962b16 ("firmware: tegra: bpmp: Move channel initialization to helper")

from the tegra tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --cc drivers/firmware/tegra/bpmp.c
index 5fbd6a3e69e09,d3508e98e3382..0000000000000
--- a/drivers/firmware/tegra/bpmp.c
+++ b/drivers/firmware/tegra/bpmp.c
@@@ -764,20 -975,96 +975,94 @@@ int tegra_bpmp_init_channels(struct teg
  		return -ENOMEM;
  
  	spin_lock_init(&bpmp->atomic_tx_lock);
- 	bpmp->tx_channel = devm_kzalloc_obj(&pdev->dev, *bpmp->tx_channel);
 -	bpmp->tx_channel = devm_kzalloc(bpmp->dev, sizeof(*bpmp->tx_channel),
 -					GFP_KERNEL);
++	bpmp->tx_channel = devm_kzalloc_obj(bpmp->dev, *bpmp->tx_channel);
  	if (!bpmp->tx_channel)
  		return -ENOMEM;
  
- 	bpmp->rx_channel = devm_kzalloc_obj(&pdev->dev, *bpmp->rx_channel);
 -	bpmp->rx_channel = devm_kzalloc(bpmp->dev, sizeof(*bpmp->rx_channel),
 -					GFP_KERNEL);
++	bpmp->rx_channel = devm_kzalloc_obj(bpmp->dev, *bpmp->rx_channel);
  	if (!bpmp->rx_channel)
  		return -ENOMEM;
  
- 	bpmp->threaded_channels = devm_kzalloc_objs(&pdev->dev,
 -	bpmp->threaded_channels = devm_kcalloc(bpmp->dev, bpmp->threaded.count,
 -					       sizeof(*bpmp->threaded_channels),
 -					       GFP_KERNEL);
++	bpmp->threaded_channels = devm_kzalloc_objs(bpmp->dev,
 +						    *bpmp->threaded_channels,
 +						    bpmp->threaded.count);
  	if (!bpmp->threaded_channels)
  		return -ENOMEM;
  
+ 	return 0;
+ }
+ 
+ int tegra_bpmp_init_ping(struct tegra_bpmp *bpmp)
+ {
+ 	int err;
+ 
+ 	err = tegra_bpmp_request_mrq(bpmp, MRQ_PING,
+ 				     tegra_bpmp_mrq_handle_ping, bpmp);
+ 	if (err < 0)
+ 		return err;
+ 
+ 	err = tegra_bpmp_ping(bpmp);
+ 	if (err < 0) {
+ 		dev_err(bpmp->dev, "failed to ping BPMP: %d\n", err);
+ 		goto free_mrq;
+ 	}
+ 
+ 	return 0;
+ 
+ free_mrq:
+ 	tegra_bpmp_free_mrq(bpmp, MRQ_PING, bpmp);
+ 
+ 	return err;
+ }
+ 
+ void tegra_bpmp_deinit_ping(struct tegra_bpmp *bpmp)
+ {
+ 	tegra_bpmp_free_mrq(bpmp, MRQ_PING, bpmp);
+ }
+ 
+ int tegra_bpmp_init_dt_providers(struct tegra_bpmp *bpmp)
+ {
+ 	struct device *dev = bpmp->dev;
+ 	int err;
+ 
+ 	err = of_platform_default_populate(dev->of_node, NULL, dev);
+ 	if (err < 0)
+ 		return err;
+ 
+ 	if (of_property_present(dev->of_node, "#clock-cells")) {
+ 		err = tegra_bpmp_init_clocks(bpmp);
+ 		if (err < 0)
+ 			return err;
+ 	}
+ 
+ 	if (of_property_present(dev->of_node, "#reset-cells")) {
+ 		err = tegra_bpmp_init_resets(bpmp);
+ 		if (err < 0)
+ 			return err;
+ 	}
+ 
+ 	if (of_property_present(dev->of_node, "#power-domain-cells")) {
+ 		err = tegra_bpmp_init_powergates(bpmp);
+ 		if (err < 0)
+ 			return err;
+ 	}
+ 
+ 	return 0;
+ }
+ 
+ static int tegra_bpmp_probe(struct platform_device *pdev)
+ {
+ 	struct tegra_bpmp *bpmp;
+ 	char tag[TAG_SZ];
+ 	int err;
+ 
 -	bpmp = devm_kzalloc(&pdev->dev, sizeof(*bpmp), GFP_KERNEL);
++	bpmp = devm_kzalloc_obj(&pdev->dev, *bpmp);
+ 	if (!bpmp)
+ 		return -ENOMEM;
+ 
+ 	bpmp->soc = device_get_match_data(&pdev->dev);
+ 	bpmp->dev = &pdev->dev;
+ 
  	platform_set_drvdata(pdev, bpmp);
  
  	err = bpmp->soc->ops->init(bpmp);


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

             reply	other threads:[~2026-11-10 16:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10 16:41 Mark Brown [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-11-10 16:34 Mark Brown
2026-11-10 16:34 Mark Brown

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=avNJVJwZOOZ96FD9@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=anrao@nvidia.com \
    --cc=ccross@android.com \
    --cc=kees+treewide@kernel.org \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=treding@nvidia.com \
    /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

all inboxes | Powered by JetHome®