Skip to content

Commit

Permalink
test_ida: Fix lockdep warning
Browse files Browse the repository at this point in the history
The IDA was declared on the stack instead of statically, so lockdep
triggered a warning that it was improperly initialised.

Reported-by: 0day bot
Tested-by: Rong Chen <[email protected]>
Signed-off-by: Matthew Wilcox <[email protected]>
  • Loading branch information
Matthew Wilcox committed Oct 15, 2018
1 parent f0a7d18 commit c994b12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/test_ida.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@ static void ida_check_conv(struct ida *ida)
IDA_BUG_ON(ida, !ida_is_empty(ida));
}

static DEFINE_IDA(ida);

static int ida_checks(void)
{
DEFINE_IDA(ida);

IDA_BUG_ON(&ida, !ida_is_empty(&ida));
ida_check_alloc(&ida);
ida_check_destroy(&ida);
Expand Down

0 comments on commit c994b12

Please sign in to comment.