From patchwork Thu Jan 8 04:01:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chunyan Zhang X-Patchwork-Id: 42860 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f198.google.com (mail-we0-f198.google.com [74.125.82.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 092CD2055F for ; Thu, 8 Jan 2015 04:03:01 +0000 (UTC) Received: by mail-we0-f198.google.com with SMTP id q59sf205050wes.1 for ; Wed, 07 Jan 2015 20:03:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=UTQParlXBVjMZvkmSkp7rRBQdU1FexSIRdo9hzLxCf0=; b=krLqYuQ/MQLndldp6meWJpibMPWU2JZ62YjrPoy/RW7qDKznRFwjGJXtNyviUU8Mox uLAUIJcmDRFaOLOwzl6iUxFyP8uX0ZS763YsuR/sipHIM+nmprEC9vgJSiLU6/SY3t3l qzLhmfKd08xJsQwbs0j9mWp+oyiqqz3HnYINNrIqN9p3yExatYOfwVw6idBMZNguUF6V DyDUXlyLg7WCy005W87mxv+6Qh3R/vGkXfty0uBGKgjSUR4VdMCrep9FlpAskRqC6rwp VKo+bwz7ZoZ7FYbntTMx8YRL94RsY/WHXuENsfCAwn9JpipraA6/gTUVmWNSY68Y7dpf xQ2Q== X-Gm-Message-State: ALoCoQlYNGxTEaa9n3+qhvHybZJwFZgAhWK5r8Occy90+DQZ3Sca4g9M+R1G1F/A66RXfVHotX6L X-Received: by 10.112.160.41 with SMTP id xh9mr487lbb.12.1420689780188; Wed, 07 Jan 2015 20:03:00 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.134 with SMTP id ay6ls255813lab.107.gmail; Wed, 07 Jan 2015 20:02:59 -0800 (PST) X-Received: by 10.152.228.164 with SMTP id sj4mr9667682lac.98.1420689779945; Wed, 07 Jan 2015 20:02:59 -0800 (PST) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com. [209.85.217.181]) by mx.google.com with ESMTPS id dd11si577881lac.130.2015.01.07.20.02.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 07 Jan 2015 20:02:59 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) client-ip=209.85.217.181; Received: by mail-lb0-f181.google.com with SMTP id l4so893895lbv.12 for ; Wed, 07 Jan 2015 20:02:59 -0800 (PST) X-Received: by 10.112.159.136 with SMTP id xc8mr9933911lbb.98.1420689779491; Wed, 07 Jan 2015 20:02:59 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.9.200 with SMTP id c8csp145688lbb; Wed, 7 Jan 2015 20:02:58 -0800 (PST) X-Received: by 10.67.22.135 with SMTP id hs7mr11432153pad.29.1420689777584; Wed, 07 Jan 2015 20:02:57 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y5si6383327pdj.119.2015.01.07.20.02.56; Wed, 07 Jan 2015 20:02:57 -0800 (PST) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755699AbbAHECn (ORCPT + 27 others); Wed, 7 Jan 2015 23:02:43 -0500 Received: from mail-pd0-f180.google.com ([209.85.192.180]:63093 "EHLO mail-pd0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753352AbbAHECl (ORCPT ); Wed, 7 Jan 2015 23:02:41 -0500 Received: by mail-pd0-f180.google.com with SMTP id fl12so8674340pdb.11 for ; Wed, 07 Jan 2015 20:02:40 -0800 (PST) X-Received: by 10.66.166.171 with SMTP id zh11mr11155489pab.85.1420689760506; Wed, 07 Jan 2015 20:02:40 -0800 (PST) Received: from chunyanzhangubtpc.spreadtrum.com ([203.160.240.81]) by mx.google.com with ESMTPSA id mw3sm3067779pdb.70.2015.01.07.20.02.37 (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Jan 2015 20:02:39 -0800 (PST) From: Chunyan Zhang To: samuel@sortiz.org Cc: arnd@arndb.de, zhang.lyra@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/6] irda: Removed all unused timeval variables Date: Thu, 8 Jan 2015 12:01:27 +0800 Message-Id: <1420689692-8760-2-git-send-email-zhang.chunyan@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1420689692-8760-1-git-send-email-zhang.chunyan@linaro.org> References: <1420689692-8760-1-git-send-email-zhang.chunyan@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: zhang.chunyan@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , In the file au1k_ir.c & via-ircc.h, there were two unused definitions of the timeval type members, this commit therefore removes this unneeded code. In other three files, the same problem is the rx_time member is only ever written, never read, so removed it entirely. Signed-off-by: Chunyan Zhang Reviewed-by: Arnd Bergmann --- drivers/net/irda/au1k_ir.c | 3 --- drivers/net/irda/kingsun-sir.c | 3 --- drivers/net/irda/ks959-sir.c | 3 --- drivers/net/irda/mcs7780.c | 2 -- drivers/net/irda/mcs7780.h | 1 - drivers/net/irda/via-ircc.h | 4 ---- 6 files changed, 16 deletions(-) diff --git a/drivers/net/irda/au1k_ir.c b/drivers/net/irda/au1k_ir.c index e151205..44e4f38 100644 --- a/drivers/net/irda/au1k_ir.c +++ b/drivers/net/irda/au1k_ir.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include @@ -163,8 +162,6 @@ struct au1k_private { iobuff_t rx_buff; struct net_device *netdev; - struct timeval stamp; - struct timeval now; struct qos_info qos; struct irlap_cb *irlap; diff --git a/drivers/net/irda/kingsun-sir.c b/drivers/net/irda/kingsun-sir.c index e638893..fb5d162 100644 --- a/drivers/net/irda/kingsun-sir.c +++ b/drivers/net/irda/kingsun-sir.c @@ -114,7 +114,6 @@ struct kingsun_cb { (usually 8) */ iobuff_t rx_buff; /* receive unwrap state machine */ - struct timeval rx_time; spinlock_t lock; int receiving; @@ -235,7 +234,6 @@ static void kingsun_rcv_irq(struct urb *urb) &kingsun->netdev->stats, &kingsun->rx_buff, bytes[i]); } - do_gettimeofday(&kingsun->rx_time); kingsun->receiving = (kingsun->rx_buff.state != OUTSIDE_FRAME) ? 1 : 0; @@ -273,7 +271,6 @@ static int kingsun_net_open(struct net_device *netdev) skb_reserve(kingsun->rx_buff.skb, 1); kingsun->rx_buff.head = kingsun->rx_buff.skb->data; - do_gettimeofday(&kingsun->rx_time); kingsun->rx_urb = usb_alloc_urb(0, GFP_KERNEL); if (!kingsun->rx_urb) diff --git a/drivers/net/irda/ks959-sir.c b/drivers/net/irda/ks959-sir.c index e6b3804..8e6e0ed 100644 --- a/drivers/net/irda/ks959-sir.c +++ b/drivers/net/irda/ks959-sir.c @@ -187,7 +187,6 @@ struct ks959_cb { __u8 *rx_buf; __u8 rx_variable_xormask; iobuff_t rx_unwrap_buff; - struct timeval rx_time; struct usb_ctrlrequest *speed_setuprequest; struct urb *speed_urb; @@ -476,7 +475,6 @@ static void ks959_rcv_irq(struct urb *urb) bytes[i]); } } - do_gettimeofday(&kingsun->rx_time); kingsun->receiving = (kingsun->rx_unwrap_buff.state != OUTSIDE_FRAME) ? 1 : 0; } @@ -514,7 +512,6 @@ static int ks959_net_open(struct net_device *netdev) skb_reserve(kingsun->rx_unwrap_buff.skb, 1); kingsun->rx_unwrap_buff.head = kingsun->rx_unwrap_buff.skb->data; - do_gettimeofday(&kingsun->rx_time); kingsun->rx_urb = usb_alloc_urb(0, GFP_KERNEL); if (!kingsun->rx_urb) diff --git a/drivers/net/irda/mcs7780.c b/drivers/net/irda/mcs7780.c index e4d678f..bca6a1e 100644 --- a/drivers/net/irda/mcs7780.c +++ b/drivers/net/irda/mcs7780.c @@ -722,7 +722,6 @@ static int mcs_net_open(struct net_device *netdev) skb_reserve(mcs->rx_buff.skb, 1); mcs->rx_buff.head = mcs->rx_buff.skb->data; - do_gettimeofday(&mcs->rx_time); /* * Now that everything should be initialized properly, @@ -799,7 +798,6 @@ static void mcs_receive_irq(struct urb *urb) mcs_unwrap_fir(mcs, urb->transfer_buffer, urb->actual_length); } - do_gettimeofday(&mcs->rx_time); } ret = usb_submit_urb(urb, GFP_ATOMIC); diff --git a/drivers/net/irda/mcs7780.h b/drivers/net/irda/mcs7780.h index b10689b..a6e8f7d 100644 --- a/drivers/net/irda/mcs7780.h +++ b/drivers/net/irda/mcs7780.h @@ -116,7 +116,6 @@ struct mcs_cb { __u8 *fifo_status; iobuff_t rx_buff; /* receive unwrap state machine */ - struct timeval rx_time; spinlock_t lock; int receiving; diff --git a/drivers/net/irda/via-ircc.h b/drivers/net/irda/via-ircc.h index 7ce820e..ac15255 100644 --- a/drivers/net/irda/via-ircc.h +++ b/drivers/net/irda/via-ircc.h @@ -29,7 +29,6 @@ this program; if not, see . ********************************************************************/ #ifndef via_IRCC_H #define via_IRCC_H -#include #include #include #include @@ -106,9 +105,6 @@ struct via_ircc_cb { __u8 ier; /* Interrupt enable register */ - struct timeval stamp; - struct timeval now; - spinlock_t lock; /* For serializing operations */ __u32 flags; /* Interface flags */