From patchwork Thu Oct 13 16:43:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9375461 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 0C14760487 for ; Thu, 13 Oct 2016 16:45:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF3462A171 for ; Thu, 13 Oct 2016 16:45:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E3F882A173; Thu, 13 Oct 2016 16:45:18 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham 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 622DD2A172 for ; Thu, 13 Oct 2016 16:45:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933237AbcJMQpK (ORCPT ); Thu, 13 Oct 2016 12:45:10 -0400 Received: from mout.web.de ([212.227.15.4]:65058 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933289AbcJMQob (ORCPT ); Thu, 13 Oct 2016 12:44:31 -0400 Received: from [192.168.1.2] ([77.182.72.22]) by smtp.web.de (mrweb001) with ESMTPSA (Nemesis) id 0Lud4y-1av1ih3oDA-00zo8b; Thu, 13 Oct 2016 18:44:00 +0200 Subject: [PATCH 15/18] [media] RedRat3: Delete two variables in redrat3_set_timeout() To: linux-media@vger.kernel.org, Hans Verkuil , Mauro Carvalho Chehab , Sean Young , Wolfram Sang References: <566ABCD9.1060404@users.sourceforge.net> <81cef537-4ad0-3a74-8bde-94707dcd03f4@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: <13722bff-ec67-0282-b779-52c78b5667f8@users.sourceforge.net> Date: Thu, 13 Oct 2016 18:43:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <81cef537-4ad0-3a74-8bde-94707dcd03f4@users.sourceforge.net> X-Provags-ID: V03:K0:/aVvODky9PXdnjuX6Ix8e2UXGzThAldAq7eryPngc71X/MJ9YzM qyNZTG5eFgW/4LWIpiPoOjQPNhFm8EWQRNwE8ufzYhgfq3g0CqNevOTSCqamM4jNdVULtAq JpdNPbcFKtdJ58F7W+mkgjYtoxlNkueP/gByHZB43pEeinVxWXE9txlncbDKLMG7PG8zG6s bj/tNEW1DkvYPhx3zOk3A== X-UI-Out-Filterresults: notjunk:1; V01:K0:FCPXYxCBkfg=:ghHQzrX8AXMjPak4YXTEVP ATHxI15ZdBvzv7ENp4Q+05ftDRKUF/Jnxwswb1OcvySrBJiIqn8dpj5hDbcdiQMlZX0Ig2HSU NutwBBShcDGiqnr+vJYUrPj8bMK8Uzpfdpd1wLKUAoBWH56o5U2zKANxv+rJpfAWXlfcVrgrs SnbWDjGfePWfVMFX3ikUBFXxTtu0dCWvhZmZ+lIdLc6daF1qHKhE9VXqtExtSlhNT79yeuicH YsSxwOh5ZbUWpHXFXprkV3HmCXJHYhEt8TrJ8amJZtbLfE5QxHAknxuyrJk1MmaRXQDDUOhw+ mA9t9rvXs7oyxqpxKXDz5ZCbzmgAc9ujqUObiidaE/utpLMJIMTlWESC9a0icBdDOJM3xWbnx K6Nvy8WcDuStn+6+BtDcifjYo56EcANoXl1AF2+tCoRDheeyE5baYlBOXx2sRBogW+/C3CjnM JPR4tdfmByy1GI22g/WMJTc/fHmQC6eY12NUvh3oad08lxGqOMUeuZFzCJF+V4t9uOui5aoHj BYz4rBDKPleU4US4+Y+pSye9p9NhBD9EOQDQ1jUG9ksP3+aU1OVSs+zqsSkuaCRusfQGXfI8V YcL0G1Xz9f/Cq/i/kvPSwWj1uS/ZSd5OKZYitSSciltoZRmkAnfDYymxMnIYMjAoBb/stYxPJ 76BYcNkzWTTmofsYQDLB4PvaATrDKfeQUxUxNjcTjPtWdATEaqrkdov/ItZbBcIZrdUmr8fIZ rPkRD0zlrwUCNXT13F0NRiTVrtIyivbxkihwp6ilc9jWgZZH6BaiH6UQyXDtqeVePZgCDUWNt 4Q5qPpe 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 From: Markus Elfring Date: Thu, 13 Oct 2016 15:40:33 +0200 * Use the data structure members "dev" and "udev" directly without assigning them to intermediate variables. Thus delete the extra variable definitions at the beginning. * Fix indentation for the parameters of two function calls. Signed-off-by: Markus Elfring --- drivers/media/rc/redrat3.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/media/rc/redrat3.c b/drivers/media/rc/redrat3.c index 055f214..e46a92a 100644 --- a/drivers/media/rc/redrat3.c +++ b/drivers/media/rc/redrat3.c @@ -476,8 +476,6 @@ static u32 redrat3_get_timeout(struct redrat3_dev *rr3) static int redrat3_set_timeout(struct rc_dev *rc_dev, unsigned int timeoutns) { struct redrat3_dev *rr3 = rc_dev->priv; - struct usb_device *udev = rr3->udev; - struct device *dev = rr3->dev; __be32 *timeout; int ret; @@ -486,13 +484,17 @@ static int redrat3_set_timeout(struct rc_dev *rc_dev, unsigned int timeoutns) return -ENOMEM; *timeout = cpu_to_be32(redrat3_us_to_len(timeoutns / 1000)); - ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), RR3_SET_IR_PARAM, - USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT, - RR3_IR_IO_SIG_TIMEOUT, 0, timeout, sizeof(*timeout), - HZ * 25); - dev_dbg(dev, "set ir parm timeout %d ret 0x%02x\n", - be32_to_cpu(*timeout), ret); - + ret = usb_control_msg(rr3->udev, + usb_sndctrlpipe(rr3->udev, 0), + RR3_SET_IR_PARAM, + USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT, + RR3_IR_IO_SIG_TIMEOUT, + 0, + timeout, + sizeof(*timeout), + HZ * 25); + dev_dbg(rr3->dev, "set ir parm timeout %d ret 0x%02x\n", + be32_to_cpu(*timeout), ret); if (ret == sizeof(*timeout)) { rr3->hw_timeout = timeoutns / 1000; ret = 0;