Linux-Next discussions
 help / color / mirror / Atom feed
* linux-next: manual merge of the qcom tree with the origin tree
@ 2026-07-27 13:04 Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2026-07-27 13:04 UTC (permalink / raw)
  To: Konrad Dybcio, Bjorn Andersson, Andy Gross
  Cc: Konrad Dybcio, Linux Kernel Mailing List, Linux Next Mailing List,
	Qiang Yu, Uwe Kleine-König

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

Hi all,

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

  drivers/clk/qcom/tcsrcc-glymur.c

between commit:

  995832b2cebe6 ("Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files)")

from the origin tree and commit:

  0753091abc4b4 ("clk: qcom: tcsrcc-glymur: Add regulator supplies and migrate to clk_ref helper")

from the qcom 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/clk/qcom/tcsrcc-glymur.c
index b44fccb795c6b,3388c1c3a2aaa..0000000000000
--- a/drivers/clk/qcom/tcsrcc-glymur.c
+++ b/drivers/clk/qcom/tcsrcc-glymur.c
@@@ -4,7 -4,10 +4,9 @@@
   */
  
  #include <linux/clk-provider.h>
+ #include <linux/clk/qcom.h>
 -#include <linux/mod_devicetable.h>
  #include <linux/module.h>
+ #include <linux/of.h>
  #include <linux/platform_device.h>
  #include <linux/regmap.h>
  

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* linux-next: manual merge of the qcom tree with the origin tree
@ 2026-12-03 14:47 Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2026-12-03 14:47 UTC (permalink / raw)
  To: Konrad Dybcio, Bjorn Andersson, Andy Gross
  Cc: Kees Cook, Kees Cook, Linux Kernel Mailing List,
	Linux Next Mailing List, Stanislav Aleksandrov

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

Hi all,

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

  drivers/clk/qcom/clk-ref.c

between commit:

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

from the origin tree and commit:

  bd5d4cb7ebeed ("clk: qcom: common: Register clk_ref clocks from qcom_cc_desc")

from the qcom 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 --combined drivers/clk/qcom/clk-ref.c
index 91113743e0bed,a0013a1d9c0e6..0000000000000
--- a/drivers/clk/qcom/clk-ref.c
+++ b/drivers/clk/qcom/clk-ref.c
@@@ -13,6 -13,8 +13,8 @@@
  #include <linux/regulator/consumer.h>
  #include <linux/slab.h>
  
+ #include "common.h"
+ 
  #define QCOM_CLK_REF_EN_MASK BIT(0)
  
  struct qcom_clk_ref_provider {
@@@ -96,63 -98,45 +98,45 @@@ static const struct clk_ops qcom_clk_re
  	.is_enabled = qcom_clk_ref_is_enabled,
  };
  
- static int qcom_clk_ref_register(struct device *dev, struct regmap *regmap,
- 				 struct qcom_clk_ref *clk_refs,
- 				 const struct qcom_clk_ref_desc * const *descs,
- 				 size_t num_clk_refs)
+ int qcom_clk_ref_register(struct device *dev, struct regmap *regmap,
+ 			  struct qcom_clk_ref *clk_ref,
+ 			  const struct qcom_clk_ref_desc *desc)
  {
- 	const struct qcom_clk_ref_desc *desc;
  	struct clk_init_data init_data = {};
- 	struct qcom_clk_ref *clk_ref;
- 	size_t clk_idx;
  	unsigned int i;
  	int ret;
  
- 	for (clk_idx = 0; clk_idx < num_clk_refs; clk_idx++) {
- 		clk_ref = &clk_refs[clk_idx];
- 		desc = descs[clk_idx];
+ 	if (WARN_ON(!desc->name))
+ 		return -EINVAL;
  
- 		/* Skip unpopulated indices; the array is indexed by clock ID. */
- 		if (!desc)
- 			continue;
+ 	clk_ref->regmap = regmap;
+ 	clk_ref->desc = *desc;
  
- 		if (WARN_ON(!desc->name))
- 			continue;
+ 	if (clk_ref->desc.num_regulators) {
+ 		clk_ref->regulators = devm_kzalloc_objs(dev, *clk_ref->regulators,
+ 							clk_ref->desc.num_regulators);
+ 		if (!clk_ref->regulators)
+ 			return -ENOMEM;
  
- 		clk_ref->regmap = regmap;
- 		clk_ref->desc = *desc;
+ 		for (i = 0; i < clk_ref->desc.num_regulators; i++)
+ 			clk_ref->regulators[i].supply =
+ 				clk_ref->desc.regulator_names[i];
  
- 		if (clk_ref->desc.num_regulators) {
- 			clk_ref->regulators = devm_kzalloc_objs(dev,
- 								*clk_ref->regulators,
- 								clk_ref->desc.num_regulators);
- 			if (!clk_ref->regulators)
- 				return -ENOMEM;
- 
- 			for (i = 0; i < clk_ref->desc.num_regulators; i++)
- 				clk_ref->regulators[i].supply =
- 					clk_ref->desc.regulator_names[i];
- 
- 			ret = devm_regulator_bulk_get(dev, clk_ref->desc.num_regulators,
- 						      clk_ref->regulators);
- 			if (ret)
- 				return dev_err_probe(dev, ret,
- 						     "Failed to get regulators for %s\n",
- 						     clk_ref->desc.name);
- 		}
- 
- 		init_data.name = clk_ref->desc.name;
- 		init_data.parent_data = &qcom_clk_ref_parent_data;
- 		init_data.num_parents = 1;
- 		init_data.ops = &qcom_clk_ref_ops;
- 		clk_ref->hw.init = &init_data;
- 
- 		ret = devm_clk_hw_register(dev, &clk_ref->hw);
+ 		ret = devm_regulator_bulk_get(dev, clk_ref->desc.num_regulators,
+ 					      clk_ref->regulators);
  		if (ret)
- 			return ret;
+ 			return dev_err_probe(dev, ret,
+ 					     "Failed to get regulators for %s\n",
+ 					     clk_ref->desc.name);
  	}
  
- 	return 0;
+ 	init_data.name = clk_ref->desc.name;
+ 	init_data.parent_data = &qcom_clk_ref_parent_data;
+ 	init_data.num_parents = 1;
+ 	init_data.ops = &qcom_clk_ref_ops;
+ 	clk_ref->hw.init = &init_data;
+ 
+ 	return devm_clk_hw_register(dev, &clk_ref->hw);
  }
  
  static struct clk_hw *qcom_clk_ref_provider_get(struct of_phandle_args *clkspec, void *data)
@@@ -178,6 -162,7 +162,7 @@@ int qcom_clk_ref_probe(struct platform_
  	struct device *dev = &pdev->dev;
  	struct regmap *regmap;
  	void __iomem *base;
+ 	size_t i;
  	int ret;
  
  	base = devm_platform_ioremap_resource(pdev, 0);
@@@ -188,16 -173,22 +173,21 @@@
  	if (IS_ERR(regmap))
  		return PTR_ERR(regmap);
  
 -	provider = devm_kzalloc(dev, struct_size(provider, refs, num_clk_refs),
 -				GFP_KERNEL);
 +	provider = devm_kzalloc_flex(dev, *provider, refs, num_clk_refs);
  	if (!provider)
  		return -ENOMEM;
  
  	provider->num_refs = num_clk_refs;
  
- 	ret = qcom_clk_ref_register(dev, regmap, provider->refs, descs,
- 				    provider->num_refs);
- 	if (ret)
- 		return ret;
+ 	for (i = 0; i < num_clk_refs; i++) {
+ 		/* Skip unpopulated indices; the array is indexed by clock ID. */
+ 		if (!descs[i])
+ 			continue;
+ 
+ 		ret = qcom_clk_ref_register(dev, regmap, &provider->refs[i], descs[i]);
+ 		if (ret)
+ 			return ret;
+ 	}
  
  	return devm_of_clk_add_hw_provider(dev, qcom_clk_ref_provider_get, provider);
  }

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-12-03 14:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 14:47 linux-next: manual merge of the qcom tree with the origin tree Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2026-07-27 13:04 Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox