Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 841b86f3 authored by Kees Cook's avatar Kees Cook
Browse files

treewide: Remove TIMER_FUNC_TYPE and TIMER_DATA_TYPE casts



With all callbacks converted, and the timer callback prototype
switched over, the TIMER_FUNC_TYPE cast is no longer needed,
so remove it. Conversion was done with the following scripts:

    perl -pi -e 's|\(TIMER_FUNC_TYPE\)||g' \
        $(git grep TIMER_FUNC_TYPE | cut -d: -f1 | sort -u)

    perl -pi -e 's|\(TIMER_DATA_TYPE\)||g' \
        $(git grep TIMER_DATA_TYPE | cut -d: -f1 | sort -u)

The now unused macros are also dropped from include/linux/timer.h.

Signed-off-by: default avatarKees Cook <keescook@chromium.org>
parent 919b250f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -481,7 +481,7 @@ static bool wakeup_source_not_registered(struct wakeup_source *ws)
	 * Use timer struct to check if the given source is initialized
	 * by wakeup_source_add.
	 */
	return ws->timer.function != (TIMER_FUNC_TYPE)pm_wakeup_timer_fn;
	return ws->timer.function != pm_wakeup_timer_fn;
}

/*
+1 −1
Original line number Diff line number Diff line
@@ -1429,7 +1429,7 @@ aoecmd_ata_id(struct aoedev *d)

	d->rttavg = RTTAVG_INIT;
	d->rttdev = RTTDEV_INIT;
	d->timer.function = (TIMER_FUNC_TYPE)rexmit_timer;
	d->timer.function = rexmit_timer;

	skb = skb_clone(skb, GFP_ATOMIC);
	if (skb) {
+1 −1
Original line number Diff line number Diff line
@@ -397,7 +397,7 @@ static void set_timeout(struct floppy_state *fs, int nticks,
	if (fs->timeout_pending)
		del_timer(&fs->timeout);
	fs->timeout.expires = jiffies + nticks;
	fs->timeout.function = (TIMER_FUNC_TYPE)proc;
	fs->timeout.function = proc;
	add_timer(&fs->timeout);
	fs->timeout_pending = 1;
}
+1 −1
Original line number Diff line number Diff line
@@ -3819,7 +3819,7 @@ void nes_port_ibevent(struct nes_vnic *nesvnic)
	if (!nesvnic->event_timer.function) {
		ib_dispatch_event(&event);
		nesvnic->last_dispatched_event = event.event;
		nesvnic->event_timer.function = (TIMER_FUNC_TYPE)nes_handle_delayed_event;
		nesvnic->event_timer.function = nes_handle_delayed_event;
		nesvnic->event_timer.expires = jiffies + NES_EVENT_DELAY;
		add_timer(&nesvnic->event_timer);
	} else {
+1 −1
Original line number Diff line number Diff line
@@ -2047,7 +2047,7 @@ static void devm_input_device_unregister(struct device *dev, void *res)
 */
void input_enable_softrepeat(struct input_dev *dev, int delay, int period)
{
	dev->timer.function = (TIMER_FUNC_TYPE)input_repeat_key;
	dev->timer.function = input_repeat_key;
	dev->rep[REP_DELAY] = delay;
	dev->rep[REP_PERIOD] = period;
}
Loading