From patchwork Thu Oct 5 00:53:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 9986223 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 20717605A8 for ; Thu, 5 Oct 2017 00:58:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1315828C43 for ; Thu, 5 Oct 2017 00:58:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 07F2E28C45; Thu, 5 Oct 2017 00:58:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B47428C43 for ; Thu, 5 Oct 2017 00:58:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751322AbdJEA6O (ORCPT ); Wed, 4 Oct 2017 20:58:14 -0400 Received: from mail-pf0-f182.google.com ([209.85.192.182]:54615 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752959AbdJEAxQ (ORCPT ); Wed, 4 Oct 2017 20:53:16 -0400 Received: by mail-pf0-f182.google.com with SMTP id m28so2192284pfi.11 for ; Wed, 04 Oct 2017 17:53:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=7uK64DoXte0UWfjZqOZRQdlWMTaQh0sK5IknrRJ0Geo=; b=cQLAQzmVAjVSjH6LgISmN4fH8tQFnOq75FiRVraXxTQsKGJ7v7LcCvMbJNnSj8e3S8 kIOP6rjuAHG2IlpvaP41w4C0OxQlctawDAHYkBuwrEvlyCnG/ThR9wrmJgcnqXXKqMnB mgTQObJGIeLZtL8sucunrBvgYO/ChcXhk/kMY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=7uK64DoXte0UWfjZqOZRQdlWMTaQh0sK5IknrRJ0Geo=; b=n1BQOF+wet4ZrQvSYhugSFPPV2KeRyi0pG/xrPRsDkgD61jAUCceF2UTapVBjaDUIK 5dUF8CORwVKDOyhnewrjJxLJ/ynmgZ7IJ/sCnnCys+drDT+PXe+9/8rTB7aDH812hPeL rEoV1TPIZoH2p04D7vcEcgpRIwJIccuw4gwiC9Q7ytKdXdrGn0EaAoyFiXOrdfSonsT3 dZtH1ZOxiJ4PhAx+a0sU9oVD/Rb41eoEAc8h94YjeuQK58cE6aBPl2ScwwwudmCgHYmF i6ddWXOn/pJ0M+n+lMHdX0glRYi290IZztVVbDWRORWLauNoxoSRaxCTNagPwH/Caga7 AeKw== X-Gm-Message-State: AMCzsaVlobkPtdQmvwFUc+viM474Ojc02ygYgFDHn8qfQjD7mgQiaeLy 84KKR0M0WSa3AeV71ZucD8z/wnufTKw= X-Google-Smtp-Source: AOwi7QCnbMC3jZMiK7ZxwEN0yu2xpI5x/pmLOf1+XrqHsJok+Tu110Po7cPBAa6fw8E6BluleFlapA== X-Received: by 10.98.36.82 with SMTP id r79mr10661476pfj.148.1507164796132; Wed, 04 Oct 2017 17:53:16 -0700 (PDT) Received: from www.outflux.net (173-164-112-133-Oregon.hfc.comcastbusiness.net. [173.164.112.133]) by smtp.gmail.com with ESMTPSA id s76sm29095801pfj.119.2017.10.04.17.53.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Oct 2017 17:53:15 -0700 (PDT) Date: Wed, 4 Oct 2017 17:53:14 -0700 From: Kees Cook To: linux-kernel@vger.kernel.org Cc: Sean Young , Mauro Carvalho Chehab , linux-media@vger.kernel.org, Thomas Gleixner Subject: [PATCH] media: serial_ir: Convert timers to use timer_setup() Message-ID: <20171005005314.GA23724@beast> MIME-Version: 1.0 Content-Disposition: inline Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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: Sean Young Cc: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. --- drivers/media/rc/serial_ir.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/rc/serial_ir.c b/drivers/media/rc/serial_ir.c index 8b66926bc16a..8bf5637b3a69 100644 --- a/drivers/media/rc/serial_ir.c +++ b/drivers/media/rc/serial_ir.c @@ -470,7 +470,7 @@ static int hardware_init_port(void) return 0; } -static void serial_ir_timeout(unsigned long arg) +static void serial_ir_timeout(struct timer_list *unused) { DEFINE_IR_RAW_EVENT(ev); @@ -540,8 +540,7 @@ static int serial_ir_probe(struct platform_device *dev) serial_ir.rcdev = rcdev; - setup_timer(&serial_ir.timeout_timer, serial_ir_timeout, - (unsigned long)&serial_ir); + timer_setup(&serial_ir.timeout_timer, serial_ir_timeout, 0); result = devm_request_irq(&dev->dev, irq, serial_ir_irq_handler, share_irq ? IRQF_SHARED : 0,