2 * smatch/check_mod_timer.c
4 * Copyright (C) 2010 Dan Carpenter.
6 * Licensed under the Open Software License version 1.1
11 #include "smatch_slist.h"
15 static void match_mod_timer(const char *fn
, struct expression
*expr
, void *param
)
17 struct expression
*arg
;
20 arg
= get_argument_from_call_expr(expr
->args
, 1);
21 if (!get_value(arg
, &val
) || !val
)
23 sm_msg("warn: mod_timer() takes an absolute time not an offset.");
26 void check_mod_timer(int id
)
28 if (option_project
!= PROJ_KERNEL
)
32 add_function_hook("mod_timer", &match_mod_timer
, NULL
);