Code Review
/
kvmfornfv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git]
/
kernel
/
scripts
/
dtc
/
checks.c
diff --git
a/kernel/scripts/dtc/checks.c
b/kernel/scripts/dtc/checks.c
index
ee96a25
..
e81a8c7
100644
(file)
--- a/
kernel/scripts/dtc/checks.c
+++ b/
kernel/scripts/dtc/checks.c
@@
-53,7
+53,7
@@
struct check {
void *data;
bool warn, error;
enum checkstatus status;
void *data;
bool warn, error;
enum checkstatus status;
-
int
inprogress;
+
bool
inprogress;
int num_prereqs;
struct check **prereq;
};
int num_prereqs;
struct check **prereq;
};
@@
-113,6
+113,7
@@
static inline void check_msg(struct check *c, const char *fmt, ...)
vfprintf(stderr, fmt, ap);
fprintf(stderr, "\n");
}
vfprintf(stderr, fmt, ap);
fprintf(stderr, "\n");
}
+ va_end(ap);
}
#define FAIL(c, ...) \
}
#define FAIL(c, ...) \
@@
-141,9
+142,9
@@
static void check_nodes_props(struct check *c, struct node *dt, struct node *nod
check_nodes_props(c, dt, child);
}
check_nodes_props(c, dt, child);
}
-static
int
run_check(struct check *c, struct node *dt)
+static
bool
run_check(struct check *c, struct node *dt)
{
{
-
int error = 0
;
+
bool error = false
;
int i;
assert(!c->inprogress);
int i;
assert(!c->inprogress);
@@
-151,11
+152,11
@@
static int run_check(struct check *c, struct node *dt)
if (c->status != UNCHECKED)
goto out;
if (c->status != UNCHECKED)
goto out;
- c->inprogress =
1
;
+ c->inprogress =
true
;
for (i = 0; i < c->num_prereqs; i++) {
struct check *prq = c->prereq[i];
for (i = 0; i < c->num_prereqs; i++) {
struct check *prq = c->prereq[i];
- error
|=
run_check(prq, dt);
+ error
= error ||
run_check(prq, dt);
if (prq->status != PASSED) {
c->status = PREREQ;
check_msg(c, "Failed prerequisite '%s'",
if (prq->status != PASSED) {
c->status = PREREQ;
check_msg(c, "Failed prerequisite '%s'",
@@
-177,9
+178,9
@@
static int run_check(struct check *c, struct node *dt)
TRACE(c, "\tCompleted, status %d", c->status);
out:
TRACE(c, "\tCompleted, status %d", c->status);
out:
- c->inprogress =
0
;
+ c->inprogress =
false
;
if ((c->status != PASSED) && (c->error))
if ((c->status != PASSED) && (c->error))
- error =
1
;
+ error =
true
;
return error;
}
return error;
}
@@
-624,11
+625,11
@@
static void check_avoid_default_addr_size(struct check *c, struct node *dt,
if (!reg && !ranges)
return;
if (!reg && !ranges)
return;
- if (
(node->parent->addr_cells == -1)
)
+ if (
node->parent->addr_cells == -1
)
FAIL(c, "Relying on default #address-cells value for %s",
node->fullpath);
FAIL(c, "Relying on default #address-cells value for %s",
node->fullpath);
- if (
(node->parent->size_cells == -1)
)
+ if (
node->parent->size_cells == -1
)
FAIL(c, "Relying on default #size-cells value for %s",
node->fullpath);
}
FAIL(c, "Relying on default #size-cells value for %s",
node->fullpath);
}
@@
-706,15
+707,15
@@
static void disable_warning_error(struct check *c, bool warn, bool error)
c->error = c->error && !error;
}
c->error = c->error && !error;
}
-void parse_checks_option(bool warn, bool error, const char *
opt
arg)
+void parse_checks_option(bool warn, bool error, const char *arg)
{
int i;
{
int i;
- const char *name =
opt
arg;
+ const char *name = arg;
bool enable = true;
bool enable = true;
- if ((strncmp(
opt
arg, "no-", 3) == 0)
- || (strncmp(
opt
arg, "no_", 3) == 0)) {
- name =
opt
arg + 3;
+ if ((strncmp(arg, "no-", 3) == 0)
+ || (strncmp(arg, "no_", 3) == 0)) {
+ name = arg + 3;
enable = false;
}
enable = false;
}
@@
-733,7
+734,7
@@
void parse_checks_option(bool warn, bool error, const char *optarg)
die("Unrecognized check name \"%s\"\n", name);
}
die("Unrecognized check name \"%s\"\n", name);
}
-void process_checks(
int
force, struct boot_info *bi)
+void process_checks(
bool
force, struct boot_info *bi)
{
struct node *dt = bi->dt;
int i;
{
struct node *dt = bi->dt;
int i;