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-next>] [day] [month] [year] [list]
Message-Id: <1445652944-2811-1-git-send-email-falakreyaz@gmail.com>
Date:	Sat, 24 Oct 2015 07:45:44 +0530
From:	Muhammad Falak R Wani <falakreyaz@...il.com>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Christian Gromm <christian.gromm@...rochip.com>,
	Andrey Shvetsov <andrey.shvetsov@....de>,
	Sudip Mukherjee <sudipm.mukherjee@...il.com>,
	Masanari Iida <standby24x7@...il.com>,
	Adrian Remonda <adrianremonda@...il.com>,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Cc:	Muhammad Falak R Wani <falakreyaz@...il.com>
Subject: [PATCH] staging: most: hdm-usb: Use setup_timer

Use the timer API function setup_timer instead of init_timer, removing
the structure field assignments.

<smpl>

@timer@
expression e1,e2,e3,fn_ptr;
@@
-init_timer(&e1);
+setup_timer(&e1, fn_ptr, e2);
... when != fn_ptr = e3
-e1.function = fn_ptr;
-e1.data = e2;

</smpl>

Signed-off-by: Muhammad Falak R Wani <falakreyaz@...il.com>
---
 drivers/staging/most/hdm-usb/hdm_usb.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/most/hdm-usb/hdm_usb.c b/drivers/staging/most/hdm-usb/hdm_usb.c
index 0bf38c4..2e07313 100644
--- a/drivers/staging/most/hdm-usb/hdm_usb.c
+++ b/drivers/staging/most/hdm-usb/hdm_usb.c
@@ -1235,11 +1235,10 @@ hdm_probe(struct usb_interface *interface, const struct usb_device_id *id)
 	num_endpoints = usb_iface_desc->desc.bNumEndpoints;
 	mutex_init(&mdev->io_mutex);
 	INIT_WORK(&mdev->poll_work_obj, wq_netinfo);
-	init_timer(&mdev->link_stat_timer);
+	setup_timer(&mdev->link_stat_timer, link_stat_timer_handler,
+		    (unsigned long)mdev);
 
 	mdev->usb_device = usb_dev;
-	mdev->link_stat_timer.function = link_stat_timer_handler;
-	mdev->link_stat_timer.data = (unsigned long)mdev;
 	mdev->link_stat_timer.expires = jiffies + (2 * HZ);
 
 	mdev->iface.mod = hdm_usb_fops.owner;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ