From patchwork Thu Jun 15 01:50:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gustavo A. R. Silva" X-Patchwork-Id: 9787817 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 2E0C060231 for ; Thu, 15 Jun 2017 02:12:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D5D928627 for ; Thu, 15 Jun 2017 02:12:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 120422862C; Thu, 15 Jun 2017 02:12:33 +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 9821628627 for ; Thu, 15 Jun 2017 02:12:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751888AbdFOCMb (ORCPT ); Wed, 14 Jun 2017 22:12:31 -0400 Received: from gateway31.websitewelcome.com ([192.185.143.47]:44508 "EHLO gateway31.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752063AbdFOCMa (ORCPT ); Wed, 14 Jun 2017 22:12:30 -0400 X-Greylist: delayed 1317 seconds by postgrey-1.27 at vger.kernel.org; Wed, 14 Jun 2017 22:12:30 EDT Received: from cm15.websitewelcome.com (cm15.websitewelcome.com [100.42.49.9]) by gateway31.websitewelcome.com (Postfix) with ESMTP id A490513BC33 for ; Wed, 14 Jun 2017 20:50:30 -0500 (CDT) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id LJvzdo8HrA6vULJvzd3IAH; Wed, 14 Jun 2017 20:50:55 -0500 Received: from [189.152.189.231] (port=41756 helo=embeddedgus) by gator4166.hostgator.com with esmtpa (Exim 4.87) (envelope-from ) id 1dLJva-003x41-ET; Wed, 14 Jun 2017 20:50:30 -0500 Date: Wed, 14 Jun 2017 20:50:29 -0500 From: "Gustavo A. R. Silva" To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" Subject: [PATCH] USB: gtco: remove unnecessary variable assignments Message-ID: <20170615015029.GA5601@embeddedgus> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 189.152.189.231 X-Exim-ID: 1dLJva-003x41-ET X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedgus) [189.152.189.231]:41756 X-Source-Auth: garsilva@embeddedor.com X-Email-Count: 2 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove unnecessary variable assignments. Variable _val_ is overwritten before the value stored in it can be used. Addresses-Coverity-ID: 1397695 Signed-off-by: Gustavo A. R. Silva --- drivers/input/tablet/gtco.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/input/tablet/gtco.c b/drivers/input/tablet/gtco.c index b796e89..d9de13c 100644 --- a/drivers/input/tablet/gtco.c +++ b/drivers/input/tablet/gtco.c @@ -652,8 +652,6 @@ static void gtco_urb_callback(struct urb *urbinfo) switch (device->buffer[0]) { case 5: /* Pressure is 9 bits */ - val = ((u16)(device->buffer[8]) << 1); - val |= (u16)(device->buffer[7] >> 7); input_report_abs(inputdev, ABS_PRESSURE, device->buffer[8]);