summaryrefslogtreecommitdiffstats
path: root/drivers/char/hvsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/hvsi.c')
-rw-r--r--drivers/char/hvsi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/hvsi.c b/drivers/char/hvsi.c
index a22aa940e01e..a9522189fc9e 100644
--- a/drivers/char/hvsi.c
+++ b/drivers/char/hvsi.c
@@ -197,7 +197,7 @@ static inline void print_state(struct hvsi_struct *hp)
};
const char *name = state_names[hp->state];
- if (hp->state > (sizeof(state_names)/sizeof(char*)))
+ if (hp->state > ARRAY_SIZE(state_names))
name = "UNKNOWN";
pr_debug("hvsi%i: state = %s\n", hp->index, name);
OpenPOWER on IntegriCloud