From f0f62c67dd53ce0ed26ad2940be1dfff5c3d7bd9 Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Mon, 16 Oct 2017 16:27:37 -0700 Subject: serial: m32r_sio: 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: Jiri Slaby Cc: linux-serial@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/m32r_sio.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'drivers/tty/serial/m32r_sio.c') diff --git a/drivers/tty/serial/m32r_sio.c b/drivers/tty/serial/m32r_sio.c index 5b3bd9511993..5f4003ad32b6 100644 --- a/drivers/tty/serial/m32r_sio.c +++ b/drivers/tty/serial/m32r_sio.c @@ -511,9 +511,9 @@ static void serial_unlink_irq_chain(struct uart_sio_port *up) /* * This function is used to handle ports that do not have an interrupt. */ -static void m32r_sio_timeout(unsigned long data) +static void m32r_sio_timeout(struct timer_list *t) { - struct uart_sio_port *up = (struct uart_sio_port *)data; + struct uart_sio_port *up = from_timer(up, t, timer); unsigned int timeout; unsigned int sts; @@ -907,8 +907,7 @@ static void __init m32r_sio_register_ports(struct uart_driver *drv) up->port.line = i; up->port.ops = &m32r_sio_pops; - init_timer(&up->timer); - up->timer.function = m32r_sio_timeout; + timer_setup(&up->timer, m32r_sio_timeout, 0); uart_add_one_port(drv, &up->port); } -- cgit v1.2.2 From 4fefcbff8be52c7e68feefa0c96fb8e06923aab3 Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Tue, 24 Oct 2017 02:59:40 -0700 Subject: serial: m32r_sio: Drop redundant .data assignment With the timer converted to using the new timer_setup()/from_timer() API, setting the .data field is redundant (and the field will be removed soon), so drop it. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-serial@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/m32r_sio.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/tty/serial/m32r_sio.c') diff --git a/drivers/tty/serial/m32r_sio.c b/drivers/tty/serial/m32r_sio.c index 5f4003ad32b6..0bc548adae52 100644 --- a/drivers/tty/serial/m32r_sio.c +++ b/drivers/tty/serial/m32r_sio.c @@ -576,7 +576,6 @@ static int m32r_sio_startup(struct uart_port *port) timeout = timeout > 6 ? (timeout / 2 - 2) : 1; - up->timer.data = (unsigned long)up; mod_timer(&up->timer, jiffies + timeout); } else { retval = serial_link_irq_chain(up); -- cgit v1.2.2 From e3b3d0f549c1d19b94e6ac55c66643166ea649ef Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 6 Nov 2017 18:11:51 +0100 Subject: tty: add SPDX identifiers to all remaining files in drivers/tty/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/tty files files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Jiri Slaby Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Chris Metcalf Cc: Jiri Kosina Cc: David Sterba Cc: James Hogan Cc: Rob Herring Cc: Eric Anholt Cc: Stefan Wahren Cc: Florian Fainelli Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: Joachim Eastwood Cc: Matthias Brugger Cc: Masahiro Yamada Cc: Tobias Klauser Cc: Russell King Cc: Vineet Gupta Cc: Richard Genoud Cc: Alexander Shiyan Cc: Baruch Siach Cc: "Maciej W. Rozycki" Cc: "Uwe Kleine-König" Cc: Pat Gefre Cc: "Guilherme G. Piccoli" Cc: Jason Wessel Cc: Vladimir Zapolskiy Cc: Sylvain Lemieux Cc: Carlo Caione Cc: Kevin Hilman Cc: Liviu Dudau Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Andy Gross Cc: David Brown Cc: "Andreas Färber" Cc: Kevin Cernekee Cc: Laxman Dewangan Cc: Thierry Reding Cc: Jonathan Hunter Cc: Barry Song Cc: Patrice Chotard Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: "David S. Miller" Cc: Peter Korsgaard Cc: Timur Tabi Cc: Tony Prisk Cc: Michal Simek Cc: "Sören Brinkmann" Cc: Thomas Gleixner Cc: Kate Stewart Cc: Philippe Ombredanne Cc: Jiri Slaby Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/m32r_sio.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/tty/serial/m32r_sio.c') diff --git a/drivers/tty/serial/m32r_sio.c b/drivers/tty/serial/m32r_sio.c index 0bc548adae52..62fdeabf8fb6 100644 --- a/drivers/tty/serial/m32r_sio.c +++ b/drivers/tty/serial/m32r_sio.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * m32r_sio.c * -- cgit v1.2.2 From 4793f2ebff1c890386a514998606205a2948011c Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 6 Nov 2017 18:11:52 +0100 Subject: tty: serial: Remove redundant license text MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now that the SPDX tag is in all tty files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Jiri Slaby Cc: Eric Anholt Cc: Stefan Wahren Cc: Florian Fainelli Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: Joachim Eastwood Cc: Matthias Brugger Cc: Masahiro Yamada Cc: Tobias Klauser Cc: Russell King Cc: Vineet Gupta Cc: Richard Genoud Cc: Alexander Shiyan Cc: Baruch Siach Cc: Pat Gefre Cc: "Guilherme G. Piccoli" Cc: Jason Wessel Cc: Vladimir Zapolskiy Cc: Sylvain Lemieux Cc: Carlo Caione Cc: Kevin Hilman Cc: Liviu Dudau Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Andy Gross Cc: David Brown Cc: "Andreas Färber" Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Kevin Cernekee Cc: Laxman Dewangan Cc: Thierry Reding Cc: Jonathan Hunter Cc: Barry Song Cc: Patrice Chotard Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: Chris Metcalf Cc: Peter Korsgaard Cc: Timur Tabi Cc: Tony Prisk Cc: Michal Simek Cc: "Sören Brinkmann" Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/m32r_sio.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'drivers/tty/serial/m32r_sio.c') diff --git a/drivers/tty/serial/m32r_sio.c b/drivers/tty/serial/m32r_sio.c index 62fdeabf8fb6..7b83a8aab495 100644 --- a/drivers/tty/serial/m32r_sio.c +++ b/drivers/tty/serial/m32r_sio.c @@ -9,11 +9,6 @@ * * Copyright (C) 2001 Russell King. * Copyright (C) 2004 Hirokazu Takata - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. */ /* -- cgit v1.2.2