From: Kees Cook Date: Tue, 22 Aug 2017 19:41:43 +0000 (-0700) Subject: net/atm/mpc: Avoid open-coded assignment of timer callback function X-Git-Tag: v4.19~2092^2~1^2~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1e9aa74ecd84ac3eeffb7a9f08f9021d7df6486a;p=platform%2Fkernel%2Flinux-rpi.git net/atm/mpc: Avoid open-coded assignment of timer callback function Instead of a single function assignment, just fold this into DEFINE_TIMER(). Cc: "David S. Miller" Signed-off-by: Kees Cook --- diff --git a/net/atm/mpc.c b/net/atm/mpc.c index e882d8b..7c6a1cc 100644 --- a/net/atm/mpc.c +++ b/net/atm/mpc.c @@ -121,7 +121,7 @@ static struct notifier_block mpoa_notifier = { struct mpoa_client *mpcs = NULL; /* FIXME */ static struct atm_mpoa_qos *qos_head = NULL; -static DEFINE_TIMER(mpc_timer, NULL); +static DEFINE_TIMER(mpc_timer, mpc_cache_check); static struct mpoa_client *find_mpc_by_itfnum(int itf) @@ -1413,7 +1413,6 @@ static void mpc_timer_refresh(void) { mpc_timer.expires = jiffies + (MPC_P2 * HZ); checking_time = mpc_timer.expires; - mpc_timer.function = (TIMER_FUNC_TYPE)mpc_cache_check; add_timer(&mpc_timer); }