Skip to contentSkip to conversation

da8xx: fix section mismatch in new drivers

PATCH Applied Bartosz Golaszewski 2 participants 4 messages Nov 23, 2016 – Nov 24, 2016 Memory controller drivers

lore
Share & tools
lore
#0 lore raw

v4 cover da8xx: fix section mismatch in new drivers

Sekhar noticed there's a section mismatch in the da8xx-mstpri and da8xx-ddrctl drivers. This is caused by calling of_flat_dt_get_machine_name() which has an __init annotation.

This series makes the drivers drop the call and not print the machine name in the error message.

v1 -> v2:
- drop patch [1/3] from v1
- introduce internal routines in the drivers instead of a general function in of/base.c

v2 -> v3:
- use of_property_read_string_index() instead of of_property_read_string() to get the first compatible entry
- s/priotities/priorities

v3 -> v4:
- drop the compatible string printing altogether as the new function is not safe
- merge the typo fix into patch [1/2]

Bartosz Golaszewski (2):
bus: da8xx-mstpri: drop the call to of_flat_dt_get_machine_name()
memory: da8xx-ddrctl: drop the call to of_flat_dt_get_machine_name()

 drivers/bus/da8xx-mstpri.c    | 4 +---
 drivers/memory/da8xx-ddrctl.c | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)
Signature · 1 line
2.9.3
#1 lore raw

PATCH v4 1/2 bus: da8xx-mstpri: drop the call to of_flat_dt_get_machine_name()

In order to avoid a section mismatch drop the call to of_flat_dt_get_machine_name() when printing the error message.

While we're at it: fix a typo.

---
 drivers/bus/da8xx-mstpri.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/bus/da8xx-mstpri.c +1 -3
index 85f0b53..063397f 100644
@@ -16,7 +16,6 @@
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/regmap.h>
-#include <linux/of_fdt.h>
 
 /*
  * REVISIT: Linux doesn't have a good framework for the kind of performance
@@ -226,8 +225,7 @@ static int da8xx_mstpri_probe(struct platform_device *pdev)
 
 	prio_list = da8xx_mstpri_get_board_prio();
 	if (!prio_list) {
-		dev_err(dev, "no master priotities defined for board '%s'\n",
-			of_flat_dt_get_machine_name());
+		dev_err(dev, "no master priorities defined for this board\n");
 		return -EINVAL;
 	}
 
Signature · 1 line
2.9.3
#2 lore raw

PATCH v4 2/2 memory: da8xx-ddrctl: drop the call to of_flat_dt_get_machine_name()

In reply to Bartosz Golaszewski

In order to avoid a section mismatch drop the call to of_flat_dt_get_machine_name() when printing the error message.

---
 drivers/memory/da8xx-ddrctl.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/memory/da8xx-ddrctl.c +1 -3
index a20e7bb..030afbe 100644
@@ -14,7 +14,6 @@
 #include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
-#include <linux/of_fdt.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 
@@ -117,8 +116,7 @@ static int da8xx_ddrctl_probe(struct platform_device *pdev)
 
 	setting = da8xx_ddrctl_get_board_settings();
 	if (!setting) {
-		dev_err(dev, "no settings for board '%s'\n",
-			of_flat_dt_get_machine_name());
+		dev_err(dev, "no settings defined for this board\n");
 		return -EINVAL;
 	}
 
Signature · 1 line
2.9.3
Applied
#3 lore raw
In reply to Bartosz Golaszewski
Quoted 6 lines · Bartosz Golaszewski

Sekhar noticed there's a section mismatch in the da8xx-mstpri and da8xx-ddrctl drivers. This is caused by calling of_flat_dt_get_machine_name() which has an __init annotation.

This series makes the drivers drop the call and not print the machine name in the error message.

Applied both. Thanks!

Regards,
Sekhar
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html