enic: remove dead code
Subsystems (2)
PATCH 1/2 enic: remove dead code
This driver seems to have lots of leftover dead code that is defined globally but never used.
Compile tested only.
--- drivers/net/enic/enic_res.c | 16 ----- drivers/net/enic/enic_res.h | 2 drivers/net/enic/vnic_dev.c | 128 ------------------------------------------- drivers/net/enic/vnic_dev.h | 10 --- drivers/net/enic/vnic_intr.c | 5 - 5 files changed, 161 deletions(-)
drivers/net/enic/enic_res.c +0 -16
@@ -149,22 +149,6 @@ int enic_set_nic_cfg(struct enic *enic,return vnic_dev_cmd (enic->vdev,CMD_NIC_CFG , &a0, &a1, wait); } -int enic_set_rss_key (struct enic *enic,dma_addr_t key_pa,u64 len) -{ -u64 a0 = (u64 )key_pa, a1 = len; -int wait =1000 ; - -return vnic_dev_cmd (enic->vdev,CMD_RSS_KEY , &a0, &a1, wait); -} - -int enic_set_rss_cpu (struct enic *enic,dma_addr_t cpu_pa,u64 len) -{ -u64 a0 = (u64 )cpu_pa, a1 = len; -int wait =1000 ; - -return vnic_dev_cmd (enic->vdev,CMD_RSS_CPU , &a0, &a1, wait); -} -void enic_free_vnic_resources (struct enic *enic) {unsigned int i;
drivers/net/enic/enic_res.h +0 -2
@@ -137,8 +137,6 @@ int enic_del_vlan(struct enic *enic, u16int enic_set_nic_cfg (struct enic *enic,u8 rss_default_cpu,u8 rss_hash_type,u8 rss_hash_bits,u8 rss_base_cpu,u8 rss_enable,u8 tso_ipid_split_en,u8 ig_vlan_strip_en); -int enic_set_rss_key (struct enic *enic,dma_addr_t key_pa,u64 len); -int enic_set_rss_cpu (struct enic *enic,dma_addr_t cpu_pa,u64 len);void enic_get_res_counts (struct enic *enic);void enic_init_vnic_resources (struct enic *enic);int enic_alloc_vnic_resources (struct enic *);
drivers/net/enic/vnic_dev.c +0 -128
176 lines not on this page · raw message
drivers/net/enic/vnic_dev.h +0 -10
@@ -84,8 +84,6 @@ unsigned int vnic_dev_get_res_count(stru enum vnic_res_type type);void __iomem *vnic_dev_get_res (struct vnic_dev *vdev,enum vnic_res_type type,unsigned int index); -dma_addr_t vnic_dev_get_res_bus_addr (struct vnic_dev *vdev, -enum vnic_res_type type,unsigned int index);unsigned int vnic_dev_desc_ring_size (struct vnic_dev_ring *ring,unsigned int desc_count,unsigned int desc_size);void vnic_dev_clear_desc_ring (struct vnic_dev_ring *ring);
@@ -95,21 +93,16 @@ void vnic_dev_free_desc_ring(struct vnic struct vnic_dev_ring *ring);int vnic_dev_cmd (struct vnic_dev *vdev,enum vnic_devcmd_cmd cmd,u64 *a0,u64 *a1,int wait); -void vnic_dev_cmd_proxy_by_bdf_start (struct vnic_dev *vdev,u16 bdf); -void vnic_dev_cmd_proxy_end (struct vnic_dev *vdev);int vnic_dev_fw_info (struct vnic_dev *vdev,struct vnic_devcmd_fw_info **fw_info);int vnic_dev_hw_version (struct vnic_dev *vdev,enum vnic_dev_hw_version *hw_ver);int vnic_dev_spec (struct vnic_dev *vdev,unsigned int offset,unsigned int size,void *value); -int vnic_dev_stats_clear (struct vnic_dev *vdev);int vnic_dev_stats_dump (struct vnic_dev *vdev,struct vnic_stats **stats);int vnic_dev_hang_notify (struct vnic_dev *vdev);int vnic_dev_packet_filter (struct vnic_dev *vdev,int directed,int multicast,int broadcast,int promisc,int allmulti); -int vnic_dev_packet_filter_all (struct vnic_dev *vdev,int directed, -int multicast,int broadcast,int promisc,int allmulti);int vnic_dev_add_addr (struct vnic_dev *vdev,u8 *addr);int vnic_dev_del_addr (struct vnic_dev *vdev,u8 *addr);int vnic_dev_mac_addr (struct vnic_dev *vdev,u8 *mac_addr);
@@ -124,11 +117,8 @@ u32 vnic_dev_port_speed(struct vnic_devu32 vnic_dev_msg_lvl (struct vnic_dev *vdev);u32 vnic_dev_mtu (struct vnic_dev *vdev);u32 vnic_dev_link_down_cnt (struct vnic_dev *vdev); -u32 vnic_dev_notify_status (struct vnic_dev *vdev); -u32 vnic_dev_uif (struct vnic_dev *vdev);int vnic_dev_close (struct vnic_dev *vdev);int vnic_dev_enable (struct vnic_dev *vdev); -int vnic_dev_enable_wait (struct vnic_dev *vdev);int vnic_dev_disable (struct vnic_dev *vdev);int vnic_dev_open (struct vnic_dev *vdev,int arg);int vnic_dev_open_done (struct vnic_dev *vdev,int *done);
drivers/net/enic/vnic_intr.c +0 -5
@@ -65,8 +65,3 @@ void vnic_intr_clean(struct vnic_intr *i {iowrite32 (0 , &intr->ctrl->int_credits); } - -void vnic_intr_raise (struct vnic_intr *intr) -{ -vnic_dev_raise_intr (intr->vdev, (u16 )intr->index); -}
Quoted 13 lines · On Wed, 29 Sep 2010 17:10:00 -0700 "Vasanthy Kolluri (vkolluri)"…
Hi Stephen,
Thanks a lot for submitting this patch. However, I have got few concerns:
1. Need to retain
vnic_dev_soft_resetandvnic_dev_soft_reset_done
as they are used invnic_dev_hang_resetandvnic_dev_hang_reset_donerespectively
Quoted 7 lines
2. Want to retain
enic_set_rss_keyandenic_set_rss_cpuas we will
be using those in the near future for adding multi rq functionality to enic.3. Additional cleanup in
vnic_rss.h. FYI, the struct defines invnic_rss.hare currently not in use. But I retained them for the same reason as in #2.
Ok, but Linux tree is not the repository for "possible future enhancements". Do it or remove it.
David Miller
maintainerFrom: Stephen Hemminger <[email protected]>
Date: Thu, 30 Sep 2010 11:49:58 +0900
Quoted 2 lines
Ok, but Linux tree is not the repository for "possible future enhancements". Do it or remove it.
Agreed, remove it now and add it back when you submit the patches that use the code.
The code is in the repository history so it's not like it's lost.
Thanks. I'll remove it.
-Vasanthy
-----Original Message-----
From: David Miller [mailto:[email protected]]
Sent: Wednesday, September 29, 2010 7:57 PM
To: [email protected]
Cc: Vasanthy Kolluri (vkolluri); [email protected]; Scott Feldman (scofeldm); Roopa Prabhu (roprabhu)
Subject: Re: [PATCH net-next 1/2] enic: remove dead code
From: Stephen Hemminger <[email protected]>
Date: Thu, 30 Sep 2010 11:49:58 +0900
Quoted 1 line
Ok, but Linux tree is not the repository for "possible future
enhancements".
Quoted 1 line
Do it or remove it.
Agreed, remove it now and add it back when you submit the patches that use the code.
The code is in the repository history so it's not like it's lost.