From: kbuild test robot Date: Fri, 11 Nov 2016 08:10:20 +0000 (+0800) Subject: staging: vc04_services: fix setup_timer.cocci warnings X-Git-Tag: v5.15~12305^2~285 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=53a6e71fdf242bebea0bcb692a86956aa88df706;p=platform%2Fkernel%2Flinux-starfive.git staging: vc04_services: fix setup_timer.cocci warnings drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1817:2-12: Use setup_timer function for function on line 1818. Use setup_timer function instead of initializing timer with the function and data fields Generated by: scripts/coccinelle/api/setup_timer.cocci Signed-off-by: Fengguang Wu Reviewed-by: Eric Anholt Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index 8fcd940..5418dd6 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -1814,9 +1814,8 @@ vchiq_arm_init_state(VCHIQ_STATE_T *state, VCHIQ_ARM_STATE_T *arm_state) arm_state->suspend_timer_timeout = SUSPEND_TIMER_TIMEOUT_MS; arm_state->suspend_timer_running = 0; - init_timer(&arm_state->suspend_timer); - arm_state->suspend_timer.data = (unsigned long)(state); - arm_state->suspend_timer.function = suspend_timer_callback; + setup_timer(&arm_state->suspend_timer, suspend_timer_callback, + (unsigned long)(state)); arm_state->first_connect = 0;