Message ID | 20170124121824.12673-1-colin.king@canonical.com |
---|---|
State | Accepted |
Headers | show |
On 2017-01-24 08:18 PM, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > minor code style change, no functional difference > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/devicetree/dt_sysinfo/dt_sysinfo.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/src/devicetree/dt_sysinfo/dt_sysinfo.c b/src/devicetree/dt_sysinfo/dt_sysinfo.c > index 9c22351..dd160ee 100644 > --- a/src/devicetree/dt_sysinfo/dt_sysinfo.c > +++ b/src/devicetree/dt_sysinfo/dt_sysinfo.c > @@ -57,11 +57,10 @@ static int dt_sysinfo_get_version(fwts_framework *fw, > char *firmware) > { > int version_len; > - const char *version_buf; > > /* only output if the platform_firmware node is present */ > if (node >= 0) { > - version_buf = fdt_getprop(fw->fdt, node, > + const char *version_buf = fdt_getprop(fw->fdt, node, > firmware, &version_len); > if (version_buf) { > fwts_passed(fw, > @@ -91,7 +90,6 @@ static int dt_sysinfo_check_version(fwts_framework *fw) > } > > int node, version_len; > - const char *version_buf; > > fwts_log_info(fw, > "OPAL base device tree path is %s.", > @@ -99,7 +97,7 @@ static int dt_sysinfo_check_version(fwts_framework *fw) > node = fdt_path_offset(fw->fdt, > opal_firmware); > if (node >= 0) { > - version_buf = fdt_getprop(fw->fdt, node, > + const char *version_buf = fdt_getprop(fw->fdt, node, > "version", &version_len); > if (version_buf) { > fwts_passed(fw, > Acked-by: Alex Hung <alex.hung@canonical.com>
On 2017年01月24日 20:18, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > minor code style change, no functional difference > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/devicetree/dt_sysinfo/dt_sysinfo.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/src/devicetree/dt_sysinfo/dt_sysinfo.c b/src/devicetree/dt_sysinfo/dt_sysinfo.c > index 9c22351..dd160ee 100644 > --- a/src/devicetree/dt_sysinfo/dt_sysinfo.c > +++ b/src/devicetree/dt_sysinfo/dt_sysinfo.c > @@ -57,11 +57,10 @@ static int dt_sysinfo_get_version(fwts_framework *fw, > char *firmware) > { > int version_len; > - const char *version_buf; > > /* only output if the platform_firmware node is present */ > if (node >= 0) { > - version_buf = fdt_getprop(fw->fdt, node, > + const char *version_buf = fdt_getprop(fw->fdt, node, > firmware, &version_len); > if (version_buf) { > fwts_passed(fw, > @@ -91,7 +90,6 @@ static int dt_sysinfo_check_version(fwts_framework *fw) > } > > int node, version_len; > - const char *version_buf; > > fwts_log_info(fw, > "OPAL base device tree path is %s.", > @@ -99,7 +97,7 @@ static int dt_sysinfo_check_version(fwts_framework *fw) > node = fdt_path_offset(fw->fdt, > opal_firmware); > if (node >= 0) { > - version_buf = fdt_getprop(fw->fdt, node, > + const char *version_buf = fdt_getprop(fw->fdt, node, > "version", &version_len); > if (version_buf) { > fwts_passed(fw, > Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff --git a/src/devicetree/dt_sysinfo/dt_sysinfo.c b/src/devicetree/dt_sysinfo/dt_sysinfo.c index 9c22351..dd160ee 100644 --- a/src/devicetree/dt_sysinfo/dt_sysinfo.c +++ b/src/devicetree/dt_sysinfo/dt_sysinfo.c @@ -57,11 +57,10 @@ static int dt_sysinfo_get_version(fwts_framework *fw, char *firmware) { int version_len; - const char *version_buf; /* only output if the platform_firmware node is present */ if (node >= 0) { - version_buf = fdt_getprop(fw->fdt, node, + const char *version_buf = fdt_getprop(fw->fdt, node, firmware, &version_len); if (version_buf) { fwts_passed(fw, @@ -91,7 +90,6 @@ static int dt_sysinfo_check_version(fwts_framework *fw) } int node, version_len; - const char *version_buf; fwts_log_info(fw, "OPAL base device tree path is %s.", @@ -99,7 +97,7 @@ static int dt_sysinfo_check_version(fwts_framework *fw) node = fdt_path_offset(fw->fdt, opal_firmware); if (node >= 0) { - version_buf = fdt_getprop(fw->fdt, node, + const char *version_buf = fdt_getprop(fw->fdt, node, "version", &version_len); if (version_buf) { fwts_passed(fw,