checks: make check.data const
Fixes: ../checks.c:47:25: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>main
parent
7a1d72a788
commit
61fa22b05f
10
checks.c
10
checks.c
|
@ -31,7 +31,7 @@ typedef void (*check_fn)(struct check *c, struct dt_info *dti, struct node *node
|
||||||
struct check {
|
struct check {
|
||||||
const char *name;
|
const char *name;
|
||||||
check_fn fn;
|
check_fn fn;
|
||||||
void *data;
|
const void *data;
|
||||||
bool warn, error;
|
bool warn, error;
|
||||||
enum checkstatus status;
|
enum checkstatus status;
|
||||||
bool inprogress;
|
bool inprogress;
|
||||||
|
@ -208,7 +208,7 @@ static void check_is_string(struct check *c, struct dt_info *dti,
|
||||||
struct node *node)
|
struct node *node)
|
||||||
{
|
{
|
||||||
struct property *prop;
|
struct property *prop;
|
||||||
char *propname = c->data;
|
const char *propname = c->data;
|
||||||
|
|
||||||
prop = get_property(node, propname);
|
prop = get_property(node, propname);
|
||||||
if (!prop)
|
if (!prop)
|
||||||
|
@ -227,7 +227,7 @@ static void check_is_string_list(struct check *c, struct dt_info *dti,
|
||||||
{
|
{
|
||||||
int rem, l;
|
int rem, l;
|
||||||
struct property *prop;
|
struct property *prop;
|
||||||
char *propname = c->data;
|
const char *propname = c->data;
|
||||||
char *str;
|
char *str;
|
||||||
|
|
||||||
prop = get_property(node, propname);
|
prop = get_property(node, propname);
|
||||||
|
@ -255,7 +255,7 @@ static void check_is_cell(struct check *c, struct dt_info *dti,
|
||||||
struct node *node)
|
struct node *node)
|
||||||
{
|
{
|
||||||
struct property *prop;
|
struct property *prop;
|
||||||
char *propname = c->data;
|
const char *propname = c->data;
|
||||||
|
|
||||||
prop = get_property(node, propname);
|
prop = get_property(node, propname);
|
||||||
if (!prop)
|
if (!prop)
|
||||||
|
@ -1466,7 +1466,7 @@ static void check_provider_cells_property(struct check *c,
|
||||||
struct dt_info *dti,
|
struct dt_info *dti,
|
||||||
struct node *node)
|
struct node *node)
|
||||||
{
|
{
|
||||||
struct provider *provider = c->data;
|
const struct provider *provider = c->data;
|
||||||
struct property *prop;
|
struct property *prop;
|
||||||
|
|
||||||
prop = get_property(node, provider->prop_name);
|
prop = get_property(node, provider->prop_name);
|
||||||
|
|
Loading…
Reference in New Issue