Commit d35d623f authored by Stephen Boyd's avatar Stephen Boyd Committed by Rob Herring

of/resolver: Simplify to be32_add_cpu()

This is the same as be32_add_cpu(), so simplify the code and
remove the now unused local variable.
Signed-off-by: default avatarStephen Boyd <stephen.boyd@linaro.org>
Reviewed-by: default avatarFrank Rowand <frowand.list@gmail.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent 77ea8a68
...@@ -165,7 +165,6 @@ static int adjust_local_phandle_references(struct device_node *local_fixups, ...@@ -165,7 +165,6 @@ static int adjust_local_phandle_references(struct device_node *local_fixups,
struct property *prop_fix, *prop; struct property *prop_fix, *prop;
int err, i, count; int err, i, count;
unsigned int off; unsigned int off;
phandle phandle;
if (!local_fixups) if (!local_fixups)
return 0; return 0;
...@@ -195,9 +194,7 @@ static int adjust_local_phandle_references(struct device_node *local_fixups, ...@@ -195,9 +194,7 @@ static int adjust_local_phandle_references(struct device_node *local_fixups,
if ((off + 4) > prop->length) if ((off + 4) > prop->length)
return -EINVAL; return -EINVAL;
phandle = be32_to_cpu(*(__be32 *)(prop->value + off)); be32_add_cpu(prop->value + off, phandle_delta);
phandle += phandle_delta;
*(__be32 *)(prop->value + off) = cpu_to_be32(phandle);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment