2 * sparse/check_bogus_irqrestore.c
4 * Copyright (C) 2011 Oracle.
6 * Licensed under the Open Software License version 1.1
14 static void match_irqrestore(const char *fn
, struct expression
*expr
, void *data
)
16 struct expression
*arg_expr
;
19 arg_expr
= get_argument_from_call_expr(expr
->args
, 1);
20 if (!get_implied_value(arg_expr
, &val
))
22 sm_msg("error: calling '%s()' with bogus flags", fn
);
25 void check_bogus_irqrestore(int id
)
27 if (option_project
!= PROJ_KERNEL
)
31 add_function_hook("spin_unlock_irqrestore", &match_irqrestore
, NULL
);