From patchwork Sat Jan 31 15:12:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 5754881 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 88BFB9F336 for ; Sat, 31 Jan 2015 15:09:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B39E42026D for ; Sat, 31 Jan 2015 15:09:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BE28A20263 for ; Sat, 31 Jan 2015 15:09:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753632AbbAaPJi (ORCPT ); Sat, 31 Jan 2015 10:09:38 -0500 Received: from mail-wi0-f170.google.com ([209.85.212.170]:41841 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752097AbbAaPJh (ORCPT ); Sat, 31 Jan 2015 10:09:37 -0500 Received: by mail-wi0-f170.google.com with SMTP id bs8so8018269wib.1 for ; Sat, 31 Jan 2015 07:09:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=V0+nUtVJpW4eNHDfyQKQGXc0msk90ZgrAL9Led6nWro=; b=ExNck96ciuMOVg2BCUiFZpsvtOGkxyXrna1u68UTBjD16yT3/CslkueGyagvk/eC1l kr98qWrkBJlzpOT38DZFbJOifoatX6hmWB/74jjG2/ceUf13oIu23aUNbb8sks1d0ix1 WpJ/kXaSI+I2anvlzUlQK1eiavZ4936gbLT8fbzjnc87NFy1bwOfKWQ+UbvYTBBWhduf qXo3G1GEcw8vz/He6l7nIMvE2HLlJA6JB+QeH2bv9TIVdoStnXi8UADT/Me70xABZGEE htN2rao3968Xgw+Fq4xAcSJ4JBWSavASSc90KIemwcxgHbnNAK1swcBb6Efph/c3ln1Y RCdg== X-Gm-Message-State: ALoCoQnpmtC+yZ98cj6fqKmTGUV+aacP8b02G/V1mW34+r9PR7pnH/oX0ful9JnSSf9Q0pBxhwZw X-Received: by 10.194.179.166 with SMTP id dh6mr23662568wjc.87.1422716976222; Sat, 31 Jan 2015 07:09:36 -0800 (PST) Received: from localhost.localdomain (h-246-111.a218.priv.bahnhof.se. [85.24.246.111]) by mx.google.com with ESMTPSA id bb2sm19562901wjc.43.2015.01.31.07.09.34 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 31 Jan 2015 07:09:35 -0800 (PST) From: Rickard Strandqvist To: Larry Finger , Jes Sorensen Cc: Rickard Strandqvist , Greg Kroah-Hartman , Joe Perches , linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: rtl8723au: hal: usb_ops_linux: Removed variables that is never used Date: Sat, 31 Jan 2015 16:12:57 +0100 Message-Id: <1422717177-5865-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Variable was assigned a value that was never used. I have also removed all the code that thereby serves no purpose. This was found using a static code analysis program called cppcheck Signed-off-by: Rickard Strandqvist --- drivers/staging/rtl8723au/hal/usb_ops_linux.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8723au/hal/usb_ops_linux.c b/drivers/staging/rtl8723au/hal/usb_ops_linux.c index a6d16ad..4ae0a8a 100644 --- a/drivers/staging/rtl8723au/hal/usb_ops_linux.c +++ b/drivers/staging/rtl8723au/hal/usb_ops_linux.c @@ -26,11 +26,10 @@ u8 rtl8723au_read8(struct rtw_adapter *padapter, u16 addr) { struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter); struct usb_device *udev = pdvobjpriv->pusbdev; - int len; u8 data; mutex_lock(&pdvobjpriv->usb_vendor_req_mutex); - len = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), + usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), REALTEK_USB_VENQT_CMD_REQ, REALTEK_USB_VENQT_READ, addr, 0, &pdvobjpriv->usb_buf.val8, sizeof(data), RTW_USB_CONTROL_MSG_TIMEOUT); @@ -45,11 +44,10 @@ u16 rtl8723au_read16(struct rtw_adapter *padapter, u16 addr) { struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter); struct usb_device *udev = pdvobjpriv->pusbdev; - int len; u16 data; mutex_lock(&pdvobjpriv->usb_vendor_req_mutex); - len = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), + usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), REALTEK_USB_VENQT_CMD_REQ, REALTEK_USB_VENQT_READ, addr, 0, &pdvobjpriv->usb_buf.val16, sizeof(data), RTW_USB_CONTROL_MSG_TIMEOUT); @@ -64,11 +62,10 @@ u32 rtl8723au_read32(struct rtw_adapter *padapter, u16 addr) { struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter); struct usb_device *udev = pdvobjpriv->pusbdev; - int len; u32 data; mutex_lock(&pdvobjpriv->usb_vendor_req_mutex); - len = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), + usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), REALTEK_USB_VENQT_CMD_REQ, REALTEK_USB_VENQT_READ, addr, 0, &pdvobjpriv->usb_buf.val32, sizeof(data), RTW_USB_CONTROL_MSG_TIMEOUT);