* [PATCH] mISDN: hfcpci: Convert timers to use timer_setup()
@ 2017-11-02 23:18 Kees Cook
2017-11-03 6:55 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Kees Cook @ 2017-11-02 23:18 UTC (permalink / raw)
To: David S. Miller
Cc: Karsten Keil, Arvind Yadav, Geliang Tang, netdev, linux-kernel
In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.
Cc: Karsten Keil <isdn@linux-pingi.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Arvind Yadav <arvind.yadav.cs@gmail.com>
Cc: Geliang Tang <geliangtang@gmail.com>
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
---
drivers/isdn/hardware/mISDN/hfcpci.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c
index d2e401a8090e..e4ebbee863a1 100644
--- a/drivers/isdn/hardware/mISDN/hfcpci.c
+++ b/drivers/isdn/hardware/mISDN/hfcpci.c
@@ -2265,7 +2265,7 @@ static struct pci_driver hfc_driver = {
};
static int
-_hfcpci_softirq(struct device *dev, void *arg)
+_hfcpci_softirq(struct device *dev, void *unused)
{
struct hfc_pci *hc = dev_get_drvdata(dev);
struct bchannel *bch;
@@ -2290,9 +2290,9 @@ _hfcpci_softirq(struct device *dev, void *arg)
}
static void
-hfcpci_softirq(void *arg)
+hfcpci_softirq(struct timer_list *unused)
{
- WARN_ON_ONCE(driver_for_each_device(&hfc_driver.driver, NULL, arg,
+ WARN_ON_ONCE(driver_for_each_device(&hfc_driver.driver, NULL, NULL,
_hfcpci_softirq) != 0);
/* if next event would be in the past ... */
@@ -2327,9 +2327,7 @@ HFC_init(void)
if (poll != HFCPCI_BTRANS_THRESHOLD) {
printk(KERN_INFO "%s: Using alternative poll value of %d\n",
__func__, poll);
- hfc_tl.function = (void *)hfcpci_softirq;
- hfc_tl.data = 0;
- init_timer(&hfc_tl);
+ timer_setup(&hfc_tl, hfcpci_softirq, 0);
hfc_tl.expires = jiffies + tics;
hfc_jiffies = hfc_tl.expires;
add_timer(&hfc_tl);
--
2.7.4
--
Kees Cook
Pixel Security
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mISDN: hfcpci: Convert timers to use timer_setup()
2017-11-02 23:18 [PATCH] mISDN: hfcpci: Convert timers to use timer_setup() Kees Cook
@ 2017-11-03 6:55 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-11-03 6:55 UTC (permalink / raw)
To: keescook; +Cc: isdn, arvind.yadav.cs, geliangtang, netdev, linux-kernel
From: Kees Cook <keescook@chromium.org>
Date: Thu, 2 Nov 2017 16:18:07 -0700
> In preparation for unconditionally passing the struct timer_list pointer to
> all timer callbacks, switch to using the new timer_setup() and from_timer()
> to pass the timer pointer explicitly.
>
> Cc: Karsten Keil <isdn@linux-pingi.de>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Arvind Yadav <arvind.yadav.cs@gmail.com>
> Cc: Geliang Tang <geliangtang@gmail.com>
> Cc: netdev@vger.kernel.org
> Signed-off-by: Kees Cook <keescook@chromium.org>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-03 6:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-02 23:18 [PATCH] mISDN: hfcpci: Convert timers to use timer_setup() Kees Cook
2017-11-03 6:55 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.