Skip to content

Commit 5f784f7

Browse files
sashalevinjwessel
authored andcommitted
kdb: use ARRAY_SIZE where possible
Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
1 parent e78acf6 commit 5f784f7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

kernel/debug/kdb/kdb_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ static kdbmsg_t kdbmsgs[] = {
124124
};
125125
#undef KDBMSG
126126

127-
static const int __nkdb_err = sizeof(kdbmsgs) / sizeof(kdbmsg_t);
127+
static const int __nkdb_err = ARRAY_SIZE(kdbmsgs);
128128

129129

130130
/*
@@ -175,7 +175,7 @@ static char *__env[] = {
175175
(char *)0,
176176
};
177177

178-
static const int __nenv = (sizeof(__env) / sizeof(char *));
178+
static const int __nenv = ARRAY_SIZE(__env);
179179

180180
struct task_struct *kdb_curr_task(int cpu)
181181
{

0 commit comments

Comments
 (0)