From 3c557df67257c114401f18ee412f0b74091c3c6f Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Mon, 9 Oct 2017 17:10:32 -0700 Subject: timer: Remove meaningless .data/.function assignments Several timer users needlessly reset their .function/.data fields during their timer callback, but nothing else changes them. Some users do not use their .data field at all. Each instance is removed here. Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Acked-by: Greg Kroah-Hartman # for staging Acked-by: Krzysztof Halasa # for wan/hdlc* Acked-by: Jens Axboe # for amiflop Cc: devel@driverdev.osuosl.org Cc: netdev@vger.kernel.org Cc: linux-wireless@vger.kernel.org Cc: Jens Axboe Cc: Ganesh Krishna Cc: Aditya Shankar Link: https://lkml.kernel.org/r/20171010001032.GA119829@beast --- drivers/block/amiflop.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/block/amiflop.c') diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c index 49908c74bfcb..4e3fb9f104af 100644 --- a/drivers/block/amiflop.c +++ b/drivers/block/amiflop.c @@ -323,7 +323,7 @@ static void fd_deselect (int drive) } -static void motor_on_callback(unsigned long nr) +static void motor_on_callback(unsigned long ignored) { if (!(ciaa.pra & DSKRDY) || --on_attempts == 0) { complete_all(&motor_on_completion); @@ -344,7 +344,6 @@ static int fd_motor_on(int nr) fd_select(nr); reinit_completion(&motor_on_completion); - motor_on_timer.data = nr; mod_timer(&motor_on_timer, jiffies + HZ/2); on_attempts = 10; -- cgit