Skip to content

Commit

Permalink
of: fdt: Constify 'pathp'
Browse files Browse the repository at this point in the history
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]

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
[Rob Herring: also constify np and lp]
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
  • Loading branch information
Fabio Estevam authored and Rob Herring committed Nov 21, 2012
1 parent c22618a commit e55b082
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/of/fdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -488,7 +488,7 @@ int __init of_scan_flat_dt(int (*it)(unsigned long node,
pathp = (char *)p;
p = ALIGN(p + strlen(pathp) + 1, 4);
if ((*pathp) == '/') {
char *lp, *np;
const char *lp, *np;
for (lp = NULL, np = pathp; *np; np++)
if ((*np) == '/')
lp = np+1;
Expand Down

0 comments on commit e55b082

Please sign in to comment.