* [PATCH 0/4] nvmem: patches (set 1) for 6.20
@ 2026-01-16 17:08 srini
2026-01-16 17:08 ` [PATCH 1/4] nvmem: Drop OF node reference on nvmem_add_one_cell() failure srini
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: srini @ 2026-01-16 17:08 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Srinivas Kandagatla
From: Srinivas Kandagatla <srini@kernel.org>
Hi Greg,
Here are few nvmem patches for 6.20, Could you please queue
these for 6.20.
Patches include
- of node cleanups
- unused Kconfig cleanup.
- new sm8750 qfprom support
Thanks,
Srini
Komal Bajaj (1):
dt-bindings: nvmem: qfprom: Add sm8750 compatible
Krzysztof Kozlowski (2):
nvmem: Drop OF node reference on nvmem_add_one_cell() failure
nvmem: Simplify with scoped for each OF child loop
Randy Dunlap (1):
nvmem: an8855: drop an unused Kconfig symbol
Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml | 1 +
drivers/nvmem/Kconfig | 2 +-
drivers/nvmem/core.c | 7 ++-----
3 files changed, 4 insertions(+), 6 deletions(-)
--
2.51.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/4] nvmem: Drop OF node reference on nvmem_add_one_cell() failure
2026-01-16 17:08 [PATCH 0/4] nvmem: patches (set 1) for 6.20 srini
@ 2026-01-16 17:08 ` srini
2026-01-16 17:08 ` [PATCH 2/4] nvmem: Simplify with scoped for each OF child loop srini
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: srini @ 2026-01-16 17:08 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Krzysztof Kozlowski, stable, Srinivas Kandagatla
From: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
If nvmem_add_one_cell() failed, the ownership of "child" (or "info.np"),
thus its OF reference, is not passed further and function should clean
up by putting the reference it got via earlier of_node_get(). Note that
this is independent of references obtained via for_each_child_of_node()
loop.
Fixes: 50014d659617 ("nvmem: core: use nvmem_add_one_cell() in nvmem_add_cells_from_of()")
Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Srinivas Kandagatla <srini@kernel.org>
---
drivers/nvmem/core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index 387c88c55259..ff68fd5ad3d6 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -831,6 +831,7 @@ static int nvmem_add_cells_from_dt(struct nvmem_device *nvmem, struct device_nod
kfree(info.name);
if (ret) {
of_node_put(child);
+ of_node_put(info.np);
return ret;
}
}
--
2.51.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/4] nvmem: Simplify with scoped for each OF child loop
2026-01-16 17:08 [PATCH 0/4] nvmem: patches (set 1) for 6.20 srini
2026-01-16 17:08 ` [PATCH 1/4] nvmem: Drop OF node reference on nvmem_add_one_cell() failure srini
@ 2026-01-16 17:08 ` srini
2026-01-16 17:08 ` [PATCH 3/4] nvmem: an8855: drop an unused Kconfig symbol srini
2026-01-16 17:08 ` [PATCH 4/4] dt-bindings: nvmem: qfprom: Add sm8750 compatible srini
3 siblings, 0 replies; 5+ messages in thread
From: srini @ 2026-01-16 17:08 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Krzysztof Kozlowski, Srinivas Kandagatla
From: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Use scoped for-each loop when iterating over device nodes to make code a
bit simpler.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Srinivas Kandagatla <srini@kernel.org>
---
drivers/nvmem/core.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index ff68fd5ad3d6..c6180cf1dd91 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -789,11 +789,10 @@ static int nvmem_validate_keepouts(struct nvmem_device *nvmem)
static int nvmem_add_cells_from_dt(struct nvmem_device *nvmem, struct device_node *np)
{
struct device *dev = &nvmem->dev;
- struct device_node *child;
const __be32 *addr;
int len, ret;
- for_each_child_of_node(np, child) {
+ for_each_child_of_node_scoped(np, child) {
struct nvmem_cell_info info = {0};
addr = of_get_property(child, "reg", &len);
@@ -801,7 +800,6 @@ static int nvmem_add_cells_from_dt(struct nvmem_device *nvmem, struct device_nod
continue;
if (len < 2 * sizeof(u32)) {
dev_err(dev, "nvmem: invalid reg on %pOF\n", child);
- of_node_put(child);
return -EINVAL;
}
@@ -817,7 +815,6 @@ static int nvmem_add_cells_from_dt(struct nvmem_device *nvmem, struct device_nod
info.nbits < 1 ||
info.bit_offset + info.nbits > BITS_PER_BYTE * info.bytes) {
dev_err(dev, "nvmem: invalid bits on %pOF\n", child);
- of_node_put(child);
return -EINVAL;
}
}
@@ -830,7 +827,6 @@ static int nvmem_add_cells_from_dt(struct nvmem_device *nvmem, struct device_nod
ret = nvmem_add_one_cell(nvmem, &info);
kfree(info.name);
if (ret) {
- of_node_put(child);
of_node_put(info.np);
return ret;
}
--
2.51.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/4] nvmem: an8855: drop an unused Kconfig symbol
2026-01-16 17:08 [PATCH 0/4] nvmem: patches (set 1) for 6.20 srini
2026-01-16 17:08 ` [PATCH 1/4] nvmem: Drop OF node reference on nvmem_add_one_cell() failure srini
2026-01-16 17:08 ` [PATCH 2/4] nvmem: Simplify with scoped for each OF child loop srini
@ 2026-01-16 17:08 ` srini
2026-01-16 17:08 ` [PATCH 4/4] dt-bindings: nvmem: qfprom: Add sm8750 compatible srini
3 siblings, 0 replies; 5+ messages in thread
From: srini @ 2026-01-16 17:08 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Randy Dunlap, Srinivas Kandagatla
From: Randy Dunlap <rdunlap@infradead.org>
MFD_AIROHA_AN8855 is referenced here but never defined, so drop it
from the Kconfig file.
Fixes: e2258cfd9b98 ("nvmem: an8855: Add support for Airoha AN8855 Switch EFUSE")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Srinivas Kandagatla <srini@kernel.org>
---
drivers/nvmem/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig
index bf47a982cf62..74ddbd0f79b0 100644
--- a/drivers/nvmem/Kconfig
+++ b/drivers/nvmem/Kconfig
@@ -30,7 +30,7 @@ source "drivers/nvmem/layouts/Kconfig"
config NVMEM_AN8855_EFUSE
tristate "Airoha AN8855 eFuse support"
- depends on MFD_AIROHA_AN8855 || COMPILE_TEST
+ depends on COMPILE_TEST
help
Say y here to enable support for reading eFuses on Airoha AN8855
Switch. These are e.g. used to store factory programmed
--
2.51.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] dt-bindings: nvmem: qfprom: Add sm8750 compatible
2026-01-16 17:08 [PATCH 0/4] nvmem: patches (set 1) for 6.20 srini
` (2 preceding siblings ...)
2026-01-16 17:08 ` [PATCH 3/4] nvmem: an8855: drop an unused Kconfig symbol srini
@ 2026-01-16 17:08 ` srini
3 siblings, 0 replies; 5+ messages in thread
From: srini @ 2026-01-16 17:08 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Komal Bajaj, Akhil P Oommen, Srinivas Kandagatla
From: Komal Bajaj <komal.bajaj@oss.qualcomm.com>
Document compatible string for the QFPROM on SM8750 platform.
Signed-off-by: Komal Bajaj <komal.bajaj@oss.qualcomm.com>
Reviewed-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>
Signed-off-by: Srinivas Kandagatla <srini@kernel.org>
---
Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
index 7d1612acca48..839513d4b499 100644
--- a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
+++ b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
@@ -55,6 +55,7 @@ properties:
- qcom,sm8450-qfprom
- qcom,sm8550-qfprom
- qcom,sm8650-qfprom
+ - qcom,sm8750-qfprom
- qcom,x1e80100-qfprom
- const: qcom,qfprom
--
2.51.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-01-16 17:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-16 17:08 [PATCH 0/4] nvmem: patches (set 1) for 6.20 srini
2026-01-16 17:08 ` [PATCH 1/4] nvmem: Drop OF node reference on nvmem_add_one_cell() failure srini
2026-01-16 17:08 ` [PATCH 2/4] nvmem: Simplify with scoped for each OF child loop srini
2026-01-16 17:08 ` [PATCH 3/4] nvmem: an8855: drop an unused Kconfig symbol srini
2026-01-16 17:08 ` [PATCH 4/4] dt-bindings: nvmem: qfprom: Add sm8750 compatible srini
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.