From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761503AbdJQMN4 (ORCPT ); Tue, 17 Oct 2017 08:13:56 -0400 Received: from 20pmail.ess.barracuda.com ([64.235.150.247]:41195 "EHLO 20pmail.ess.barracuda.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758186AbdJQMNz (ORCPT ); Tue, 17 Oct 2017 08:13:55 -0400 X-Greylist: delayed 58242 seconds by postgrey-1.27 at vger.kernel.org; Tue, 17 Oct 2017 08:13:53 EDT Date: Tue, 17 Oct 2017 13:12:27 +0100 From: James Hogan To: Kees Cook CC: Greg Kroah-Hartman , Jiri Slaby , , Subject: Re: [PATCH] tty: metag_da: Convert timers to use timer_setup() Message-ID: <20171017121226.GN15235@jhogan-linux> References: <20171016232836.GA101212@beast> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hTKW8p8tUZ/8vLMe" Content-Disposition: inline In-Reply-To: <20171016232836.GA101212@beast> User-Agent: Mutt/1.7.2 (2016-11-26) X-Originating-IP: [192.168.154.110] X-BESS-ID: 1508242341-637137-14023-422824-2 X-BESS-VER: 2017.12-r1710102214 X-BESS-Apparent-Source-IP: 12.201.5.28 X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.186053 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS59374 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --hTKW8p8tUZ/8vLMe Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 16, 2017 at 04:28:36PM -0700, Kees Cook wrote: > 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. >=20 > Cc: James Hogan > Cc: Greg Kroah-Hartman > Cc: Jiri Slaby > Cc: linux-metag@vger.kernel.org > Signed-off-by: Kees Cook Looks good to me and seems to work. Acked-by: James Hogan Cheers James > --- > drivers/tty/metag_da.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) >=20 > diff --git a/drivers/tty/metag_da.c b/drivers/tty/metag_da.c > index 25ccef2fe748..82ccf3982b25 100644 > --- a/drivers/tty/metag_da.c > +++ b/drivers/tty/metag_da.c > @@ -309,7 +309,7 @@ static int put_data(void *arg) > /* > * This gets called every DA_TTY_POLL and polls the channels for data > */ > -static void dashtty_timer(unsigned long ignored) > +static void dashtty_timer(struct timer_list *poll_timer) > { > int channel; > =20 > @@ -323,12 +323,12 @@ static void dashtty_timer(unsigned long ignored) > if (channel >=3D 0) > fetch_data(channel); > =20 > - mod_timer(&poll_timer, jiffies + DA_TTY_POLL); > + mod_timer(poll_timer, jiffies + DA_TTY_POLL); > } > =20 > static void add_poll_timer(struct timer_list *poll_timer) > { > - setup_pinned_timer(poll_timer, dashtty_timer, 0); > + timer_setup(poll_timer, dashtty_timer, TIMER_PINNED); > poll_timer->expires =3D jiffies + DA_TTY_POLL; > =20 > /* > @@ -461,7 +461,7 @@ static void dashtty_hangup(struct tty_struct *tty) > * buffers. It is used to delay the expensive writeout until the writer = has > * stopped writing. > */ > -static void dashtty_put_timer(unsigned long ignored) > +static void dashtty_put_timer(struct timer_list *unused) > { > if (atomic_read(&dashtty_xmit_cnt)) > wake_up_interruptible(&dashtty_waitqueue); > @@ -603,7 +603,7 @@ static int __init dashtty_init(void) > complete(&dport->xmit_empty); > } > =20 > - setup_timer(&put_timer, dashtty_put_timer, 0); > + timer_setup(&put_timer, dashtty_put_timer, 0); > =20 > init_waitqueue_head(&dashtty_waitqueue); > dashtty_thread =3D kthread_create(put_data, NULL, "ttyDA"); > --=20 > 2.7.4 >=20 >=20 > --=20 > Kees Cook > Pixel Security --hTKW8p8tUZ/8vLMe Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEd80NauSabkiESfLYbAtpk944dnoFAlnl86MACgkQbAtpk944 dnq4Og/8DazzMsRD0kdPG5QREzTBIuMOQ+2aIeexf4d2t+OoFmACxUYu5BTgiUvu L8+UeYuSI+uNxRC/4rND1C71C6IFb12GWUxOQp0EfEqfnB73ryoGahLzpx3Kb8ME 6ypmlHZ8ho7htZsMigXSksGTD8sXShthNEki27ASjJFoc5KtN9EM0HeTthg3u4eU 4dL1ObP44ygxV/rXEODnVibTD4b9qSuK3Au3wqP9GmiZwteSMGOEJs2IpU15KEKA piIIKMAmK8H4OCFeVNSvR82yPa4tNHVL69X0omdVdXohlL7RpJ0GnWgZTWEytDsC dP5xL84URildg6AgWyxFrGUKgmGbcmxQD+9lgWNeY6ZNvttNzmJeUnP4PX+T+48h pUSvwiiy12izTkq061SoTUy9HbLj1JaLkkDQiuKdQZJYxolMJR15rzt3zKVPSD2w w0HhCe+itTB9ocZNF6U1AnpmkvQ8/i/AoG7V39acys9NWBlPAVr63nIEkhdaIkhW xXbS3EJ/g3nKXBB1K7P0JtyN7ryajLbs8Bd6JvxtRE9+LWRdLSACzEGWtkyKSgyk ih1Nve7EZHbZLqd3q2Nnq7agr1dBCFSUpc6AA/vjFuQ8VFz55wdKSmiuhrhEfeau 9vXcyzwXU9gWAhYhqgN4FkGrk/ZVqxR00bOs3M8QTv0szjHUznU= =bmwr -----END PGP SIGNATURE----- --hTKW8p8tUZ/8vLMe--