Kees Cook
e84a2ac9ff
net: neterion: Convert timers to use timer_setup()
...
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: Jon Mason <jdmason@kudzu.us >
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:40:26 +01:00
Kees Cook
d28bb967aa
net: usb: Convert timers to use timer_setup()
...
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: Woojung Huh <woojung.huh@microchip.com >
Cc: Microchip Linux Driver Support <UNGLinuxDriver@microchip.com >
Cc: "David S. Miller" <davem@davemloft.net >
Cc: Ben Hutchings <ben@decadent.org.uk >
Cc: Philippe Reynes <tremyfr@gmail.com >
Cc: Jarod Wilson <jarod@redhat.com >
Cc: Arvind Yadav <arvind.yadav.cs@gmail.com >
Cc: "Bjørn Mork" <bjorn@mork.no >
Cc: "Stefan Brüns" <stefan.bruens@rwth-aachen.de >
Cc: Alexey Dobriyan <adobriyan@gmail.com >
Cc: Greg Ungerer <gerg@linux-m68k.org >
Cc: linux-usb@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:40:26 +01:00
Kees Cook
dfc5700494
net/ethernet/sgi: Convert timers to use timer_setup()
...
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: Ralf Baechle <ralf@linux-mips.org >
Cc: linux-mips@linux-mips.org
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:40:26 +01:00
Kees Cook
41e9475c32
hamradio/scc: Convert timers to use timer_setup()
...
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: Joerg Reuter <jreuter@yaina.de >
Cc: linux-hams@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:40:26 +01:00
Kees Cook
6fd9c53f71
net: seeq: Convert timers to use timer_setup()
...
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: Russell King <linux@armlinux.org.uk >
Cc: linux-arm-kernel@lists.infradead.org
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:40:26 +01:00
Kees Cook
0822c5d94e
net: ethernet: sun: Convert timers to use timer_setup()
...
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: "David S. Miller" <davem@davemloft.net >
Cc: Philippe Reynes <tremyfr@gmail.com >
Cc: Jarod Wilson <jarod@redhat.com >
Cc: Shannon Nelson <shannon.nelson@oracle.com >
Cc: Rob Herring <robh@kernel.org >
Cc: chris hyser <chris.hyser@oracle.com >
Cc: Tushar Dave <tushar.n.dave@oracle.com >
Cc: Tobias Klauser <tklauser@distanz.ch >
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Acked-by: Shannon Nelson <shannon.nelson@oracle.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:40:26 +01:00
Kees Cook
de892f8f2c
net: ethernet: apple: Convert timers to use timer_setup()
...
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: "David S. Miller" <davem@davemloft.net >
Cc: Johannes Berg <johannes.berg@intel.com >
Cc: Jarod Wilson <jarod@redhat.com >
Cc: Rob Herring <robh@kernel.org >
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:40:25 +01:00
Kees Cook
1128612532
isdnloop: Convert timers to use timer_setup()
...
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. Added missing initialization for
rb_timer.
Cc: Karsten Keil <isdn@linux-pingi.de >
Cc: "David S. Miller" <davem@davemloft.net >
Cc: Al Viro <viro@zeniv.linux.org.uk >
Cc: Stephen Hemminger <stephen@networkplumber.org >
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Johannes Berg <johannes.berg@intel.com >
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:40:25 +01:00
Kees Cook
5f2585d4e5
drivers/net/appletalk: Convert timers to use timer_setup()
...
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. Adds a static variable to hold the
polled net_device.
Cc: David Howells <dhowells@redhat.com >
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:55 +01:00
Kees Cook
9ba650a4eb
appletalk: Remove unneeded synchronization
...
The use of del_timer_sync() will make sure a timer is not rescheduled.
As such, there is no need to add external signals to kill timers. In
preparation for switching the timer callback argument to the timer
pointer, this drops the .data argument since it doesn't serve a meaningful
purpose here.
Cc: David Howells <dhowells@redhat.com >
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:55 +01:00
Kees Cook
d26c089e78
hdlc: Convert timers to use timer_setup()
...
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. This adds a pointer back to the
net_device, and drops needless open-coded resetting of the .function and
.data fields.
Cc: David S. Miller <davem@davemloft.net >
Cc: Krzysztof Halasa <khc@pm.waw.pl >
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:55 +01:00
Kees Cook
9f12a77e46
net/core: Collapse redundant sk_timer callback data assignments
...
The core sk_timer initializer can provide the common .data assignment
instead of it being set separately in users.
Cc: "David S. Miller" <davem@davemloft.net >
Cc: Ralf Baechle <ralf@linux-mips.org >
Cc: Andrew Hendry <andrew.hendry@gmail.com >
Cc: Eric Dumazet <edumazet@google.com >
Cc: Paolo Abeni <pabeni@redhat.com >
Cc: David Howells <dhowells@redhat.com >
Cc: Colin Ian King <colin.king@canonical.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: linzhang <xiaolou4617@gmail.com >
Cc: netdev@vger.kernel.org
Cc: linux-hams@vger.kernel.org
Cc: linux-x25@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:55 +01:00
Kees Cook
78802011fb
inet: frags: Convert timers to use timer_setup()
...
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: Alexander Aring <alex.aring@gmail.com >
Cc: Stefan Schmidt <stefan@osg.samsung.com >
Cc: "David S. Miller" <davem@davemloft.net >
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru >
Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org >
Cc: Pablo Neira Ayuso <pablo@netfilter.org >
Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu >
Cc: Florian Westphal <fw@strlen.de >
Cc: linux-wpan@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: netfilter-devel@vger.kernel.org
Cc: coreteam@netfilter.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Acked-by: Stefan Schmidt <stefan@osg.samsung.com > # for ieee802154
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:55 +01:00
Kees Cook
59f379f904
inet/connection_sock: Convert timers to use timer_setup()
...
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: "David S. Miller" <davem@davemloft.net >
Cc: Gerrit Renker <gerrit@erg.abdn.ac.uk >
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru >
Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org >
Cc: netdev@vger.kernel.org
Cc: dccp@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:55 +01:00
Kees Cook
a92c5751b9
netfilter: ipset: Convert timers to use timer_setup()
...
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. This introduces a pointer back to the
struct ip_set, which is used instead of the struct timer_list .data field.
Cc: Pablo Neira Ayuso <pablo@netfilter.org >
Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu >
Cc: Florian Westphal <fw@strlen.de >
Cc: "David S. Miller" <davem@davemloft.net >
Cc: Stephen Hemminger <stephen@networkplumber.org >
Cc: simran singhal <singhalsimran0@gmail.com >
Cc: Muhammad Falak R Wani <falakreyaz@gmail.com >
Cc: netfilter-devel@vger.kernel.org
Cc: coreteam@netfilter.org
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:54 +01:00
Kees Cook
cdeabbb881
net: sched: Convert timers to use timer_setup()
...
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. Add pointer back to Qdisc.
Cc: Jamal Hadi Salim <jhs@mojatatu.com >
Cc: Cong Wang <xiyou.wangcong@gmail.com >
Cc: Jiri Pirko <jiri@resnulli.us >
Cc: "David S. Miller" <davem@davemloft.net >
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:54 +01:00
Kees Cook
4cfea08e62
isdn/gigaset: Convert timers to use timer_setup()
...
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: Paul Bolle <pebolle@tiscali.nl >
Cc: Karsten Keil <isdn@linux-pingi.de >
Cc: "David S. Miller" <davem@davemloft.net >
Cc: Johan Hovold <johan@kernel.org >
Cc: gigaset307x-common@lists.sourceforge.net
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:39 +01:00
Kees Cook
c788dd2c64
isdn/gigaset: Use kzalloc instead of open-coded field zeroing
...
This replaces a kmalloc followed by a bunch of per-field zeroing with a
single kzalloc call, reducing the lines of code.
Cc: Paul Bolle <pebolle@tiscali.nl >
Cc: Karsten Keil <isdn@linux-pingi.de >
Cc: "David S. Miller" <davem@davemloft.net >
Cc: Johan Hovold <johan@kernel.org >
Cc: gigaset307x-common@lists.sourceforge.net
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:39 +01:00
Kees Cook
e313ac12eb
mISDN: Convert timers to use timer_setup()
...
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: Geliang Tang <geliangtang@gmail.com >
Cc: "David S. Miller" <davem@davemloft.net >
Cc: Masahiro Yamada <yamada.masahiro@socionext.com >
Cc: Andrew Morton <akpm@linux-foundation.org >
Cc: Anton Vasilyev <vasilyev@ispras.ru >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:39 +01:00
Kees Cook
d99356797a
forcedeth: Convert timers to use timer_setup()
...
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: "David S. Miller" <davem@davemloft.net >
Cc: Zhu Yanjun <yanjun.zhu@oracle.com >
Cc: Philippe Reynes <tremyfr@gmail.com >
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:39 +01:00
Kees Cook
11dd894e4a
net: ksz884x: Convert timers to use timer_setup()
...
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: "David S. Miller" <davem@davemloft.net >
Cc: Johannes Berg <johannes.berg@intel.com >
Cc: Jarod Wilson <jarod@redhat.com >
Cc: Masahiro Yamada <yamada.masahiro@socionext.com >
Cc: Philippe Reynes <tremyfr@gmail.com >
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:39 +01:00
Kees Cook
6fa35bd0e9
net: dl2k: Convert timers to use timer_setup()
...
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: "David S. Miller" <davem@davemloft.net >
Cc: Jarod Wilson <jarod@redhat.com >
Cc: Tobias Klauser <tklauser@distanz.ch >
Cc: Philippe Reynes <tremyfr@gmail.com >
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Reviewed-by: Tobias Klauser <tklauser@distanz.ch >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:39 +01:00
Kees Cook
b09064b78f
bna: Convert timers to use timer_setup()
...
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: Rasesh Mody <rasesh.mody@cavium.com >
Cc: Sudarsana Kalluru <sudarsana.kalluru@cavium.com >
Cc: Dept-GELinuxNICDev@cavium.com
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:38 +01:00
Kees Cook
495ad9864f
net: amd8111e: Convert timers to use timer_setup()
...
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: "David S. Miller" <davem@davemloft.net >
Cc: Eric Dumazet <edumazet@google.com >
Cc: Jarod Wilson <jarod@redhat.com >
Cc: Philippe Reynes <tremyfr@gmail.com >
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:38 +01:00
Kees Cook
cacd2b3fb9
chelsio: Convert timers to use timer_setup()
...
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: "David S. Miller" <davem@davemloft.net >
Cc: Johannes Berg <johannes.berg@intel.com >
Cc: Eric Dumazet <edumazet@google.com >
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:38 +01:00
Kees Cook
7974c0f362
drivers/net/3com: Convert timers to use timer_setup()
...
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: Steffen Klassert <klassert@mathematik.tu-chemnitz.de >
Cc: "David S. Miller" <davem@davemloft.net >
Cc: Jarod Wilson <jarod@redhat.com >
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:38 +01:00
Kees Cook
1fccb565e8
net: can: Convert timers to use timer_setup()
...
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: Oliver Hartkopp <socketcan@hartkopp.net >
Cc: Marc Kleine-Budde <mkl@pengutronix.de >
Cc: "David S. Miller" <davem@davemloft.net >
Cc: linux-can@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:38 +01:00
Kees Cook
a8c22a2bbc
net: tulip: Convert timers to use timer_setup()
...
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: "David S. Miller" <davem@davemloft.net >
Cc: David Howells <dhowells@redhat.com >
Cc: Jarod Wilson <jarod@redhat.com >
Cc: Stephen Hemminger <stephen@networkplumber.org >
Cc: Johannes Berg <johannes.berg@intel.com >
Cc: Eric Dumazet <edumazet@google.com >
Cc: Philippe Reynes <tremyfr@gmail.com >
Cc: "yuval.shaia@oracle.com " <yuval.shaia@oracle.com >
Cc: netdev@vger.kernel.org
Cc: linux-parisc@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:38 +01:00
Kees Cook
3d2ceaa63b
atm: idt77252: Convert timers to use timer_setup()
...
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. This required adding a pointer back
to vc_map, and adjusting the locking around removal a bit.
Cc: Chas Williams <3chas3@gmail.com >
Cc: linux-atm-general@lists.sourceforge.net
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:38 +01:00
Kees Cook
847f03ee16
drivers/atm/suni: Convert timers to use timer_setup()
...
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. Passes NULL timer when doing non-
timer call.
Cc: Chas Williams <3chas3@gmail.com >
Cc: linux-atm-general@lists.sourceforge.net
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:38 +01:00
Kees Cook
5a3a896203
net: vxge: Convert timers to use timer_setup()
...
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: Jon Mason <jdmason@kudzu.us >
Cc: "David S. Miller" <davem@davemloft.net >
Cc: Miroslav Lichvar <mlichvar@redhat.com >
Cc: Jarod Wilson <jarod@redhat.com >
Cc: Eric Dumazet <edumazet@google.com >
Cc: stephen hemminger <stephen@networkplumber.org >
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:38 +01:00
Kees Cook
d3e99b2d19
net/cw1200: Convert timers to use timer_setup()
...
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: Solomon Peachy <pizza@shaftnet.org >
Cc: Kalle Valo <kvalo@codeaurora.org >
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:38 +01:00
Kees Cook
abec4be3ee
net: ethernet: stmmac: Convert timers to use timer_setup()
...
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: Giuseppe Cavallaro <peppe.cavallaro@st.com >
Cc: Alexandre Torgue <alexandre.torgue@st.com >
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:37 +01:00
Kees Cook
80c5a20b53
pcmcia/electra_cf: Convert timers to use timer_setup()
...
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: Michael Ellerman <mpe@ellerman.id.au >
Cc: linux-pcmcia@lists.infradead.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:37 +01:00
Kees Cook
41fce7034b
net: tulip: de2104x: Convert timers to use timer_setup()
...
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: "David S. Miller" <davem@davemloft.net >
Cc: "yuval.shaia@oracle.com " <yuval.shaia@oracle.com >
Cc: Tobias Klauser <tklauser@distanz.ch >
Cc: Jarod Wilson <jarod@redhat.com >
Cc: Philippe Reynes <tremyfr@gmail.com >
Cc: netdev@vger.kernel.org
Cc: linux-parisc@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Reviewed-by: Tobias Klauser <tklauser@distanz.ch >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:37 +01:00
Kees Cook
eb8c6b5b44
ethernet/broadcom: Convert timers to use timer_setup()
...
In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
helper to pass the timer pointer explicitly.
Cc: Florian Fainelli <f.fainelli@gmail.com >
Cc: bcm-kernel-feedback-list@broadcom.com
Cc: "David S. Miller" <davem@davemloft.net >
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Jarod Wilson <jarod@redhat.com >
Cc: netdev@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:37 +01:00
Kees Cook
c3aed70953
xfrm: Convert timers to use timer_setup()
...
In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
helper to pass the timer pointer explicitly.
Cc: Steffen Klassert <steffen.klassert@secunet.com >
Cc: Herbert Xu <herbert@gondor.apana.org.au >
Cc: "David S. Miller" <davem@davemloft.net >
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:37 +01:00
Kees Cook
8e763de0b9
net/hamradio/6pack: Convert timers to use timer_setup()
...
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: Andreas Koensgen <ajk@comnets.uni-bremen.de >
Cc: linux-hams@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:37 +01:00
Kees Cook
5e8b824d91
isdn/hisax: Convert timers to use timer_setup()
...
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: Geliang Tang <geliangtang@gmail.com >
Cc: "David S. Miller" <davem@davemloft.net >
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:37 +01:00
Kees Cook
d8eb7e262d
net/wireless/ray_cs: Convert timers to use timer_setup()
...
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: Kalle Valo <kvalo@codeaurora.org >
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:37 +01:00
Kees Cook
2183c1a61c
net/usb/usbnet: Convert timers to use timer_setup()
...
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. Since the callback is called from
both a timer and a tasklet, adjust the tasklet to pass the timer address
too. When tasklets have their .data field removed, this can be refactored
to call a central function after resolving the correct container_of() for a
separate callback function for timer and tasklet.
Cc: Oliver Neukum <oneukum@suse.com >
Cc: netdev@vger.kernel.org
Cc: linux-usb@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Acked-by: Oliver Neukum <oneukum@suse.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:37 +01:00
Kees Cook
0010e3f8b3
net/ti/tlan: Convert timers to use timer_setup()
...
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: Samuel Chessman <chessman@tux.org >
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:36 +01:00
Kees Cook
4966babd90
net/rose: Convert timers to use timer_setup()
...
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: Ralf Baechle <ralf@linux-mips.org >
Cc: "David S. Miller" <davem@davemloft.net >
Cc: linux-hams@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:36 +01:00
Kees Cook
83a37b3292
net/lapb: Convert timers to use timer_setup()
...
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: "David S. Miller" <davem@davemloft.net >
Cc: Hans Liljestrand <ishkamiel@gmail.com >
Cc: "Reshetova, Elena" <elena.reshetova@intel.com >
Cc: linux-x25@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:36 +01:00
Kees Cook
eb4ddaf474
net/decnet: Convert timers to use timer_setup()
...
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: "David S. Miller" <davem@davemloft.net >
Cc: Johannes Berg <johannes.berg@intel.com >
Cc: David Ahern <dsa@cumulusnetworks.com >
Cc: linux-decnet-user@lists.sourceforge.net
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:39:36 +01:00
David S. Miller
1bbc728988
Merge branch 'dsa-master-and-slave-helpers'
...
Vivien Didelot says:
====================
net: dsa: master and slave helpers
This patch series adds a few helpers to DSA core for clarity and
readability but brings no functional changes.
A dsa_slave_notify helper calls the DSA notifiers when (un)registering a
slave device.
Most of the DSA slave code only needs to access the dsa_port structure,
not the dsa_slave_priv (which only contains a few PHY-specific members).
Thus a dsa_slave_to_port helper returns a dsa_port structure of a slave
device.
A dsa_slave_to_master returns the master device of a slave device.
After that the netdev member of the dsa_port structure is split into two
explicit master and slave members to avoid confusion, and a dsa_to_port
helper is added for switch drivers to get a const reference to a port.
Changes in v2:
- prefer dsa_slave_to_master instead of dsa_slave_get_master
- rename dsa_master_get_slave to dsa_master_find_slave
- pack master and slave net devices into an anonymous union
- add dsa_to_port public helper for switch drivers
- add Reviewed-by tags from Florian
====================
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:24:34 +01:00
Vivien Didelot
c8652c83bc
net: dsa: add dsa_to_port helper
...
The dsa_port structure is part of DSA core data and must only be updated
by the later. It is OK and sometimes necessary for the DSA drivers to
access this data, but this has to be read only.
For that purpose, add a dsa_to_port() helper which returns a const
pointer to a dsa_port structure which must be used by DSA drivers from
now on instead of digging into ds->ports[] themselves.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:24:33 +01:00
Vivien Didelot
f8b8b1cd5a
net: dsa: split dsa_port's netdev member
...
The dsa_port structure has a "netdev" member, which can be used for
either the master device, or the slave device, depending on its type.
It is true that today, CPU port are not exposed to userspace, thus the
port's netdev member can be used to point to its master interface.
But it is still slightly confusing, so split it into more explicit
"master" and "slave" members inside an anonymous union.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:24:33 +01:00
Vivien Didelot
2231c43b56
net: dsa: rename dsa_master_get_slave
...
The dsa_master_get_slave is slightly confusing since the idiomatic "get"
term often suggests reference counting, in symmetry to "put".
Rename it to dsa_master_find_slave to make the look up operation clear.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:24:33 +01:00
Vivien Didelot
d0006b0022
net: dsa: add slave to master helper
...
Many part of the DSA slave code require to get the master device
assigned to a slave device. Remove dsa_master_netdev() in favor of a
dsa_slave_to_master() helper which does that.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com >
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-10-18 12:24:33 +01:00