lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <b00184c264b6b6e765122dc14f5e2d7be6db4803.1490341686.git.geliangtang@gmail.com>
Date:   Fri, 24 Mar 2017 22:15:13 +0800
From:   Geliang Tang <geliangtang@...il.com>
To:     Jens Axboe <axboe@...com>,
        Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
        Mike Christie <mchristi@...hat.com>
Cc:     Geliang Tang <geliangtang@...il.com>, linux-kernel@...r.kernel.org
Subject: [PATCH] mg_disk: use setup_timer

Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@...il.com>
---
 drivers/block/mg_disk.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/block/mg_disk.c b/drivers/block/mg_disk.c
index 286f276..e88e7b0 100644
--- a/drivers/block/mg_disk.c
+++ b/drivers/block/mg_disk.c
@@ -989,9 +989,7 @@ static int mg_probe(struct platform_device *plat_dev)
 	blk_queue_max_hw_sectors(host->breq, MG_MAX_SECTS);
 	blk_queue_logical_block_size(host->breq, MG_SECTOR_SIZE);
 
-	init_timer(&host->timer);
-	host->timer.function = mg_times_out;
-	host->timer.data = (unsigned long)host;
+	setup_timer(&host->timer, mg_times_out, (unsigned long)host);
 
 	host->gd = alloc_disk(MG_DISK_MAX_PART);
 	if (!host->gd) {
-- 
2.9.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ