Skip to contentSkip to conversation

of: fdt: Constify 'pathp'

PATCH In review Fabio Estevam 2 participants 2 messages Nov 12, 2012 1 message not in the archive Device tree

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 of: fdt: Constify 'pathp'

From: Fabio Estevam <[email protected]>

Constify 'pathp' in order to get rid of the following warning:

drivers/of/fdt.c:491:10: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]

---
 drivers/of/fdt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/of/fdt.c +1 -1
index 793b823..73fb8c0 100644
@@ -460,7 +460,7 @@ int __init of_scan_flat_dt(int (*it)(unsigned long node,
 
 	do {
 		u32 tag = be32_to_cpup((__be32 *)p);
-		char *pathp;
+		const char *pathp;
 
 		p += 4;
 		if (tag == OF_DT_END_NODE) {
Signature · 1 line
1.7.9.5
#2 lore raw
In reply to a message not in the archive
Quoted 7 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Constify 'pathp' in order to get rid of the following warning:

drivers/of/fdt.c:491:10: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]

Applied for 3.8.

Rob

Quoted 18 lines
---
 drivers/of/fdt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/of/fdt.c +1 -1
index 793b823..73fb8c0 100644
@@ -460,7 +460,7 @@ int __init of_scan_flat_dt(int (*it)(unsigned long node,
 
 	do {
 		u32 tag = be32_to_cpup((__be32 *)p);
-		char *pathp;
+		const char *pathp;
 
 		p += 4;
 		if (tag == OF_DT_END_NODE) {