aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic
diff options
context:
space:
mode:
authorRobert Marko <robimarko@gmail.com>2023-01-22 11:47:23 +0100
committerChristian Marangi <ansuelsmth@gmail.com>2023-01-23 19:08:01 +0100
commite3082dc555750d91e0d3e2237652ade5306b3347 (patch)
tree79162f92d78149f1732b44a0a8e7f957b187a548 /target/linux/generic
parent183bad664167f73a6798980faab5d9b5bba06b5a (diff)
downloadupstream-e3082dc555750d91e0d3e2237652ade5306b3347.tar.gz
upstream-e3082dc555750d91e0d3e2237652ade5306b3347.tar.bz2
upstream-e3082dc555750d91e0d3e2237652ade5306b3347.zip
generic: backport fix for #nvmem-cell-cells false warning
Recent backport of NVMEM layout support as well as acommpanying OF changes introduced a false #nvmem-cell-cells warning as #nvmem-cell-cells are fully optional. So, backport an upstream fix for this. Fixes: 11759a5bf3c6 ("kernel: backport of changes & helpers") Signed-off-by: Robert Marko <robimarko@gmail.com>
Diffstat (limited to 'target/linux/generic')
-rw-r--r--target/linux/generic/backport-5.10/828-v6.3-of-property-fix-nvmem-cell-cells-parsing.patch44
-rw-r--r--target/linux/generic/backport-5.15/828-v6.3-of-property-fix-nvmem-cell-cells-parsing.patch44
2 files changed, 88 insertions, 0 deletions
diff --git a/target/linux/generic/backport-5.10/828-v6.3-of-property-fix-nvmem-cell-cells-parsing.patch b/target/linux/generic/backport-5.10/828-v6.3-of-property-fix-nvmem-cell-cells-parsing.patch
new file mode 100644
index 0000000000..848ec3731b
--- /dev/null
+++ b/target/linux/generic/backport-5.10/828-v6.3-of-property-fix-nvmem-cell-cells-parsing.patch
@@ -0,0 +1,44 @@
+From ef26c0349eb5a615dab2272d08d1d5de4ac9cd4c Mon Sep 17 00:00:00 2001
+From: Michael Walle <michael@walle.cc>
+Date: Wed, 11 Jan 2023 00:30:56 +0100
+Subject: [PATCH] of: property: fix #nvmem-cell-cells parsing
+
+Commit 67b8497f005f ("of: property: make #.*-cells optional for simple
+props") claims to make the cells-name property optional for simple
+properties, but changed the code for the wrong property, i.e. for
+DEFINE_SUFFIX_PROP(). Fix that.
+
+Fixes: 67b8497f005f ("of: property: make #.*-cells optional for simple props")
+Reported-by: Peng Fan <peng.fan@nxp.com>
+Signed-off-by: Michael Walle <michael@walle.cc>
+Acked-by: Rob Herring <robh@kernel.org>
+Tested-by: Robert Marko <robimarko@gmail.com>
+Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+---
+ drivers/of/property.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/of/property.c
++++ b/drivers/of/property.c
+@@ -1213,8 +1213,8 @@ static struct device_node *parse_prop_ce
+ if (strcmp(prop_name, list_name))
+ return NULL;
+
+- if (of_parse_phandle_with_args(np, list_name, cells_name, index,
+- &sup_args))
++ if (__of_parse_phandle_with_args(np, list_name, cells_name, 0, index,
++ &sup_args))
+ return NULL;
+
+ return sup_args.np;
+@@ -1267,8 +1267,8 @@ static struct device_node *parse_suffix_
+ if (strcmp_suffix(prop_name, suffix))
+ return NULL;
+
+- if (__of_parse_phandle_with_args(np, prop_name, cells_name, 0, index,
+- &sup_args))
++ if (of_parse_phandle_with_args(np, prop_name, cells_name, index,
++ &sup_args))
+ return NULL;
+
+ return sup_args.np;
diff --git a/target/linux/generic/backport-5.15/828-v6.3-of-property-fix-nvmem-cell-cells-parsing.patch b/target/linux/generic/backport-5.15/828-v6.3-of-property-fix-nvmem-cell-cells-parsing.patch
new file mode 100644
index 0000000000..f17cc1f4fa
--- /dev/null
+++ b/target/linux/generic/backport-5.15/828-v6.3-of-property-fix-nvmem-cell-cells-parsing.patch
@@ -0,0 +1,44 @@
+From ef26c0349eb5a615dab2272d08d1d5de4ac9cd4c Mon Sep 17 00:00:00 2001
+From: Michael Walle <michael@walle.cc>
+Date: Wed, 11 Jan 2023 00:30:56 +0100
+Subject: [PATCH] of: property: fix #nvmem-cell-cells parsing
+
+Commit 67b8497f005f ("of: property: make #.*-cells optional for simple
+props") claims to make the cells-name property optional for simple
+properties, but changed the code for the wrong property, i.e. for
+DEFINE_SUFFIX_PROP(). Fix that.
+
+Fixes: 67b8497f005f ("of: property: make #.*-cells optional for simple props")
+Reported-by: Peng Fan <peng.fan@nxp.com>
+Signed-off-by: Michael Walle <michael@walle.cc>
+Acked-by: Rob Herring <robh@kernel.org>
+Tested-by: Robert Marko <robimarko@gmail.com>
+Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+---
+ drivers/of/property.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/of/property.c
++++ b/drivers/of/property.c
+@@ -1173,8 +1173,8 @@ static struct device_node *parse_prop_ce
+ if (strcmp(prop_name, list_name))
+ return NULL;
+
+- if (of_parse_phandle_with_args(np, list_name, cells_name, index,
+- &sup_args))
++ if (__of_parse_phandle_with_args(np, list_name, cells_name, 0, index,
++ &sup_args))
+ return NULL;
+
+ return sup_args.np;
+@@ -1227,8 +1227,8 @@ static struct device_node *parse_suffix_
+ if (strcmp_suffix(prop_name, suffix))
+ return NULL;
+
+- if (__of_parse_phandle_with_args(np, prop_name, cells_name, 0, index,
+- &sup_args))
++ if (of_parse_phandle_with_args(np, prop_name, cells_name, index,
++ &sup_args))
+ return NULL;
+
+ return sup_args.np;