Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: Switch to use hrtimer_setup()

hrtimer_setup() takes the callback function pointer as argument and
initializes the timer completely.

Replace hrtimer_init() and the open coded initialization of
hrtimer::function with the new setup mechanism.

Patch was created by using Coccinelle.

Signed-off-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://lore.kernel.org/all/c951a5966e134307b8e50afb08e4b742e3f6ad06.1738746904.git.namcao@linutronix.de

authored by

Nam Cao and committed by
Thomas Gleixner
b7011929 0852ca41

+6 -9
+1 -3
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
··· 2922 2922 struct timer_cb *p_timer; 2923 2923 2924 2924 p_timer = &vscsi->rsp_q_timer; 2925 - hrtimer_init(&p_timer->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); 2926 - 2927 - p_timer->timer.function = ibmvscsis_service_wait_q; 2925 + hrtimer_setup(&p_timer->timer, ibmvscsis_service_wait_q, CLOCK_MONOTONIC, HRTIMER_MODE_REL); 2928 2926 p_timer->started = false; 2929 2927 p_timer->timer_pops = 0; 2930 2928
+3 -4
drivers/scsi/lpfc/lpfc_init.c
··· 7952 7952 timer_setup(&phba->fcf.redisc_wait, lpfc_sli4_fcf_redisc_wait_tmo, 0); 7953 7953 7954 7954 /* CMF congestion timer */ 7955 - hrtimer_init(&phba->cmf_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); 7956 - phba->cmf_timer.function = lpfc_cmf_timer; 7955 + hrtimer_setup(&phba->cmf_timer, lpfc_cmf_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); 7957 7956 /* CMF 1 minute stats collection timer */ 7958 - hrtimer_init(&phba->cmf_stats_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); 7959 - phba->cmf_stats_timer.function = lpfc_cmf_stats_timer; 7957 + hrtimer_setup(&phba->cmf_stats_timer, lpfc_cmf_stats_timer, CLOCK_MONOTONIC, 7958 + HRTIMER_MODE_REL); 7960 7959 7961 7960 /* 7962 7961 * Control structure for handling external multi-buffer mailbox
+2 -2
drivers/scsi/scsi_debug.c
··· 6384 6384 6385 6385 sd_dp = &sqcp->sd_dp; 6386 6386 6387 - hrtimer_init(&sd_dp->hrt, CLOCK_MONOTONIC, HRTIMER_MODE_REL_PINNED); 6388 - sd_dp->hrt.function = sdebug_q_cmd_hrt_complete; 6387 + hrtimer_setup(&sd_dp->hrt, sdebug_q_cmd_hrt_complete, CLOCK_MONOTONIC, 6388 + HRTIMER_MODE_REL_PINNED); 6389 6389 INIT_WORK(&sd_dp->ew.work, sdebug_q_cmd_wq_complete); 6390 6390 6391 6391 sqcp->scmd = scmd;