Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

irda: Removed all unused timeval variables

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 <zhang.chunyan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Chunyan Zhang and committed by
David S. Miller
270d73c1 f3cd7a26

-16
-3
drivers/net/irda/au1k_ir.c
··· 24 24 #include <linux/interrupt.h> 25 25 #include <linux/platform_device.h> 26 26 #include <linux/slab.h> 27 - #include <linux/time.h> 28 27 #include <linux/types.h> 29 28 #include <linux/ioport.h> 30 29 ··· 162 163 iobuff_t rx_buff; 163 164 164 165 struct net_device *netdev; 165 - struct timeval stamp; 166 - struct timeval now; 167 166 struct qos_info qos; 168 167 struct irlap_cb *irlap; 169 168
-3
drivers/net/irda/kingsun-sir.c
··· 114 114 (usually 8) */ 115 115 116 116 iobuff_t rx_buff; /* receive unwrap state machine */ 117 - struct timeval rx_time; 118 117 spinlock_t lock; 119 118 int receiving; 120 119 ··· 234 235 &kingsun->netdev->stats, 235 236 &kingsun->rx_buff, bytes[i]); 236 237 } 237 - do_gettimeofday(&kingsun->rx_time); 238 238 kingsun->receiving = 239 239 (kingsun->rx_buff.state != OUTSIDE_FRAME) 240 240 ? 1 : 0; ··· 271 273 272 274 skb_reserve(kingsun->rx_buff.skb, 1); 273 275 kingsun->rx_buff.head = kingsun->rx_buff.skb->data; 274 - do_gettimeofday(&kingsun->rx_time); 275 276 276 277 kingsun->rx_urb = usb_alloc_urb(0, GFP_KERNEL); 277 278 if (!kingsun->rx_urb)
-3
drivers/net/irda/ks959-sir.c
··· 187 187 __u8 *rx_buf; 188 188 __u8 rx_variable_xormask; 189 189 iobuff_t rx_unwrap_buff; 190 - struct timeval rx_time; 191 190 192 191 struct usb_ctrlrequest *speed_setuprequest; 193 192 struct urb *speed_urb; ··· 475 476 bytes[i]); 476 477 } 477 478 } 478 - do_gettimeofday(&kingsun->rx_time); 479 479 kingsun->receiving = 480 480 (kingsun->rx_unwrap_buff.state != OUTSIDE_FRAME) ? 1 : 0; 481 481 } ··· 512 514 513 515 skb_reserve(kingsun->rx_unwrap_buff.skb, 1); 514 516 kingsun->rx_unwrap_buff.head = kingsun->rx_unwrap_buff.skb->data; 515 - do_gettimeofday(&kingsun->rx_time); 516 517 517 518 kingsun->rx_urb = usb_alloc_urb(0, GFP_KERNEL); 518 519 if (!kingsun->rx_urb)
-2
drivers/net/irda/mcs7780.c
··· 722 722 723 723 skb_reserve(mcs->rx_buff.skb, 1); 724 724 mcs->rx_buff.head = mcs->rx_buff.skb->data; 725 - do_gettimeofday(&mcs->rx_time); 726 725 727 726 /* 728 727 * Now that everything should be initialized properly, ··· 798 799 mcs_unwrap_fir(mcs, urb->transfer_buffer, 799 800 urb->actual_length); 800 801 } 801 - do_gettimeofday(&mcs->rx_time); 802 802 } 803 803 804 804 ret = usb_submit_urb(urb, GFP_ATOMIC);
-1
drivers/net/irda/mcs7780.h
··· 116 116 __u8 *fifo_status; 117 117 118 118 iobuff_t rx_buff; /* receive unwrap state machine */ 119 - struct timeval rx_time; 120 119 spinlock_t lock; 121 120 int receiving; 122 121
-4
drivers/net/irda/via-ircc.h
··· 29 29 ********************************************************************/ 30 30 #ifndef via_IRCC_H 31 31 #define via_IRCC_H 32 - #include <linux/time.h> 33 32 #include <linux/spinlock.h> 34 33 #include <linux/pm.h> 35 34 #include <linux/types.h> ··· 104 105 dma_addr_t rx_buff_dma; 105 106 106 107 __u8 ier; /* Interrupt enable register */ 107 - 108 - struct timeval stamp; 109 - struct timeval now; 110 108 111 109 spinlock_t lock; /* For serializing operations */ 112 110