drivers/net: remove unnecessary macro for unused variables
authorFerruh Yigit <ferruh.yigit@intel.com>
Fri, 12 May 2017 10:33:03 +0000 (11:33 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 12 Jun 2017 09:41:25 +0000 (10:41 +0100)
remove __rte_unused instances that are not required.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Allain Legacy <allain.legacy@windriver.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
25 files changed:
drivers/net/af_packet/rte_eth_af_packet.c
drivers/net/avp/avp_ethdev.c
drivers/net/bnx2x/bnx2x_ethdev.c
drivers/net/bnxt/bnxt_ethdev.c
drivers/net/bnxt/bnxt_rxq.c
drivers/net/bonding/rte_eth_bond_args.c
drivers/net/bonding/rte_eth_bond_private.h
drivers/net/e1000/igb_ethdev.c
drivers/net/ena/ena_ethdev.c
drivers/net/enic/enic.h
drivers/net/fm10k/fm10k_ethdev.c
drivers/net/i40e/i40e_ethdev.h
drivers/net/i40e/i40e_ethdev_vf.c
drivers/net/i40e/i40e_flow.c
drivers/net/i40e/i40e_pf.h
drivers/net/i40e/i40e_rxtx_vec_sse.c
drivers/net/ixgbe/ixgbe_ethdev.c
drivers/net/ixgbe/ixgbe_flow.c
drivers/net/ixgbe/ixgbe_pf.c
drivers/net/qede/qede_ethdev.c
drivers/net/qede/qede_rxtx.h
drivers/net/sfc/sfc_ev.c
drivers/net/tap/rte_eth_tap.c
drivers/net/virtio/virtio_ethdev.c
drivers/net/vmxnet3/vmxnet3_rxtx.c

index 68de45c..a03966a 100644 (file)
@@ -565,7 +565,12 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,
        int rc, tpver, discard;
        int qsockfd = -1;
        unsigned int i, q, rdsize;
-       int fanout_arg __rte_unused, bypass __rte_unused;
+#if defined(PACKET_FANOUT)
+       int fanout_arg;
+#endif
+#if defined(PACKET_QDISC_BYPASS)
+       int bypass;
+#endif
 
        for (k_idx = 0; k_idx < kvlist->count; k_idx++) {
                pair = &kvlist->pairs[k_idx];
index fe6849f..b08dbaa 100644 (file)
@@ -71,8 +71,7 @@ static void avp_dev_close(struct rte_eth_dev *dev);
 static void avp_dev_info_get(struct rte_eth_dev *dev,
                             struct rte_eth_dev_info *dev_info);
 static void avp_vlan_offload_set(struct rte_eth_dev *dev, int mask);
-static int avp_dev_link_update(struct rte_eth_dev *dev,
-                              __rte_unused int wait_to_complete);
+static int avp_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete);
 static void avp_dev_promiscuous_enable(struct rte_eth_dev *dev);
 static void avp_dev_promiscuous_disable(struct rte_eth_dev *dev);
 
index 6d7c002..b6d13c2 100644 (file)
@@ -119,7 +119,7 @@ bnx2x_interrupt_action(struct rte_eth_dev *dev)
                bnx2x_link_update(dev);
 }
 
-static __rte_unused void
+static void
 bnx2x_interrupt_handler(void *param)
 {
        struct rte_eth_dev *dev = (struct rte_eth_dev *)param;
@@ -439,7 +439,7 @@ bnx2x_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 }
 
 static void
-bnx2x_dev_infos_get(struct rte_eth_dev *dev, __rte_unused struct rte_eth_dev_info *dev_info)
+bnx2x_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 {
        struct bnx2x_softc *sc = dev->data->dev_private;
        dev_info->pci_dev = RTE_DEV_TO_PCI(dev->device);
index 81711e4..176bb5e 100644 (file)
@@ -918,7 +918,7 @@ static int bnxt_rss_hash_conf_get_op(struct rte_eth_dev *eth_dev,
 }
 
 static int bnxt_flow_ctrl_get_op(struct rte_eth_dev *dev,
-                              struct rte_eth_fc_conf *fc_conf __rte_unused)
+                              struct rte_eth_fc_conf *fc_conf)
 {
        struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
        struct rte_eth_link link_info;
index cddf17d..7625fb1 100644 (file)
@@ -213,7 +213,7 @@ err_out:
        return rc;
 }
 
-static void bnxt_rx_queue_release_mbufs(struct bnxt_rx_queue *rxq __rte_unused)
+static void bnxt_rx_queue_release_mbufs(struct bnxt_rx_queue *rxq)
 {
        struct bnxt_sw_rx_bd *sw_ring;
        uint16_t i;
index e3bdad9..3155fca 100644 (file)
@@ -134,7 +134,7 @@ parse_port_id(const char *port_str)
 }
 
 int
-bond_ethdev_parse_slave_port_kvarg(const char *key __rte_unused,
+bond_ethdev_parse_slave_port_kvarg(const char *key,
                const char *value, void *extra_args)
 {
        struct bond_ethdev_slave_ports *slave_ports;
index c8db090..b76385f 100644 (file)
@@ -268,31 +268,31 @@ bond_ethdev_lsc_event_callback(uint8_t port_id, enum rte_eth_event_type type,
                void *param);
 
 int
-bond_ethdev_parse_slave_port_kvarg(const char *key __rte_unused,
+bond_ethdev_parse_slave_port_kvarg(const char *key,
                const char *value, void *extra_args);
 
 int
-bond_ethdev_parse_slave_mode_kvarg(const char *key __rte_unused,
+bond_ethdev_parse_slave_mode_kvarg(const char *key,
                const char *value, void *extra_args);
 
 int
-bond_ethdev_parse_socket_id_kvarg(const char *key __rte_unused,
+bond_ethdev_parse_socket_id_kvarg(const char *key,
                const char *value, void *extra_args);
 
 int
-bond_ethdev_parse_primary_slave_port_id_kvarg(const char *key __rte_unused,
+bond_ethdev_parse_primary_slave_port_id_kvarg(const char *key,
                const char *value, void *extra_args);
 
 int
-bond_ethdev_parse_balance_xmit_policy_kvarg(const char *key __rte_unused,
+bond_ethdev_parse_balance_xmit_policy_kvarg(const char *key,
                const char *value, void *extra_args);
 
 int
-bond_ethdev_parse_bond_mac_addr_kvarg(const char *key __rte_unused,
+bond_ethdev_parse_bond_mac_addr_kvarg(const char *key,
                const char *value, void *extra_args);
 
 int
-bond_ethdev_parse_time_ms_kvarg(const char *key __rte_unused,
+bond_ethdev_parse_time_ms_kvarg(const char *key,
                const char *value, void *extra_args);
 
 void
index 5af3ac8..0957b9b 100644 (file)
@@ -3081,7 +3081,7 @@ eth_igb_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
 #define E1000_RAH_POOLSEL_SHIFT      (18)
 static int
 eth_igb_rar_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr,
-               uint32_t index, __rte_unused uint32_t pool)
+               uint32_t index, uint32_t pool)
 {
        struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
        uint32_t rah;
index 806073c..d6e85b6 100644 (file)
@@ -213,12 +213,12 @@ static void ena_tx_queue_release(void *queue);
 static void ena_rx_queue_release_bufs(struct ena_ring *ring);
 static void ena_tx_queue_release_bufs(struct ena_ring *ring);
 static int ena_link_update(struct rte_eth_dev *dev,
-                          __rte_unused int wait_to_complete);
+                          int wait_to_complete);
 static int ena_queue_restart(struct ena_ring *ring);
 static int ena_queue_restart_all(struct rte_eth_dev *dev,
                                 enum ena_ring_type ring_type);
 static void ena_stats_restart(struct rte_eth_dev *dev);
-static void ena_infos_get(__rte_unused struct rte_eth_dev *dev,
+static void ena_infos_get(struct rte_eth_dev *dev,
                          struct rte_eth_dev_info *dev_info);
 static int ena_rss_reta_update(struct rte_eth_dev *dev,
                               struct rte_eth_rss_reta_entry64 *reta_conf,
index d17a35f..2358a7f 100644 (file)
@@ -293,9 +293,9 @@ extern int enic_clsf_init(struct enic *enic);
 extern void enic_clsf_destroy(struct enic *enic);
 uint16_t enic_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
                        uint16_t nb_pkts);
-uint16_t enic_dummy_recv_pkts(__rte_unused void *rx_queue,
-                             __rte_unused struct rte_mbuf **rx_pkts,
-                             __rte_unused uint16_t nb_pkts);
+uint16_t enic_dummy_recv_pkts(void *rx_queue,
+                             struct rte_mbuf **rx_pkts,
+                             uint16_t nb_pkts);
 uint16_t enic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
                               uint16_t nb_pkts);
 int enic_set_mtu(struct enic *enic, uint16_t new_mtu);
@@ -303,7 +303,7 @@ int enic_link_update(struct enic *enic);
 void enic_fdir_info(struct enic *enic);
 void enic_fdir_info_get(struct enic *enic, struct rte_eth_fdir_info *stats);
 void copy_fltr_v1(struct filter_v2 *fltr, struct rte_eth_fdir_input *input,
-                 __rte_unused struct rte_eth_fdir_masks *masks);
+                 struct rte_eth_fdir_masks *masks);
 void copy_fltr_v2(struct filter_v2 *fltr, struct rte_eth_fdir_input *input,
                  struct rte_eth_fdir_masks *masks);
 #endif /* _ENIC_H_ */
index 7363def..511c398 100644 (file)
@@ -1588,7 +1588,7 @@ fm10k_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
 }
 
 static void
-fm10k_vlan_offload_set(__rte_unused struct rte_eth_dev *dev, int mask)
+fm10k_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 {
        if (mask & ETH_VLAN_STRIP_MASK) {
                if (!dev->data->dev_conf.rxmode.hw_vlan_strip)
index 2ff8282..677c214 100644 (file)
@@ -817,8 +817,7 @@ int i40e_vsi_delete_mac(struct i40e_vsi *vsi, struct ether_addr *addr);
 void i40e_update_vsi_stats(struct i40e_vsi *vsi);
 void i40e_pf_disable_irq0(struct i40e_hw *hw);
 void i40e_pf_enable_irq0(struct i40e_hw *hw);
-int i40e_dev_link_update(struct rte_eth_dev *dev,
-                        __rte_unused int wait_to_complete);
+int i40e_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete);
 void i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi);
 void i40e_vsi_queues_unbind_intr(struct i40e_vsi *vsi);
 int i40e_vsi_vlan_pvid_set(struct i40e_vsi *vsi,
index 6e5839d..1cf8c33 100644 (file)
@@ -108,7 +108,7 @@ static void i40evf_dev_stop(struct rte_eth_dev *dev);
 static void i40evf_dev_info_get(struct rte_eth_dev *dev,
                                struct rte_eth_dev_info *dev_info);
 static int i40evf_dev_link_update(struct rte_eth_dev *dev,
-                                 __rte_unused int wait_to_complete);
+                                 int wait_to_complete);
 static void i40evf_dev_stats_get(struct rte_eth_dev *dev,
                                struct rte_eth_stats *stats);
 static int i40evf_dev_xstats_get(struct rte_eth_dev *dev,
@@ -159,7 +159,7 @@ static int
 i40evf_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id);
 static int
 i40evf_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id);
-static void i40evf_handle_pf_event(__rte_unused struct rte_eth_dev *dev,
+static void i40evf_handle_pf_event(struct rte_eth_dev *dev,
                                   uint8_t *msg,
                                   uint16_t msglen);
 
@@ -1318,9 +1318,8 @@ i40evf_uninit_vf(struct rte_eth_dev *dev)
 }
 
 static void
-i40evf_handle_pf_event(__rte_unused struct rte_eth_dev *dev,
-                          uint8_t *msg,
-                          __rte_unused uint16_t msglen)
+i40evf_handle_pf_event(struct rte_eth_dev *dev, uint8_t *msg,
+               __rte_unused uint16_t msglen)
 {
        struct i40e_virtchnl_pf_event *pf_msg =
                        (struct i40e_virtchnl_pf_event *)msg;
index 24e1c65..8d1fcde 100644 (file)
@@ -135,7 +135,7 @@ i40e_flow_parse_qinq_filter(struct rte_eth_dev *dev,
                              struct rte_flow_error *error,
                              union i40e_filter_t *filter);
 static int
-i40e_flow_parse_qinq_pattern(__rte_unused struct rte_eth_dev *dev,
+i40e_flow_parse_qinq_pattern(struct rte_eth_dev *dev,
                              const struct rte_flow_item *pattern,
                              struct rte_flow_error *error,
                              struct i40e_tunnel_filter_conf *filter);
index b4c2287..0961f06 100644 (file)
@@ -114,7 +114,7 @@ struct i40e_virtchnl_pvid_info {
 int i40e_pf_host_vf_reset(struct i40e_pf_vf *vf, bool do_hw_reset);
 void i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev,
                                uint16_t abs_vf_id, uint32_t opcode,
-                               __rte_unused uint32_t retval,
+                               uint32_t retval,
                                uint8_t *msg, uint16_t msglen);
 int i40e_pf_host_init(struct rte_eth_dev *dev);
 int i40e_pf_host_uninit(struct rte_eth_dev *dev);
index a439b1e..2dc53a9 100644 (file)
@@ -119,7 +119,7 @@ i40e_rxq_rearm(struct i40e_rx_queue *rxq)
 }
 
 static inline void
-desc_to_olflags_v(struct i40e_rx_queue *rxq, __m128i descs[4] __rte_unused,
+desc_to_olflags_v(struct i40e_rx_queue *rxq, __m128i descs[4],
        struct rte_mbuf **rx_pkts)
 {
        const __m128i mbuf_init = _mm_set_epi64x(0, rxq->mbuf_initializer);
index aeaa432..a8238c4 100644 (file)
@@ -187,13 +187,13 @@ ixgbe_dev_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
                uint64_t *values, unsigned int n);
 static void ixgbe_dev_stats_reset(struct rte_eth_dev *dev);
 static void ixgbe_dev_xstats_reset(struct rte_eth_dev *dev);
-static int ixgbe_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
+static int ixgbe_dev_xstats_get_names(struct rte_eth_dev *dev,
        struct rte_eth_xstat_name *xstats_names,
-       __rte_unused unsigned int size);
-static int ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
-       struct rte_eth_xstat_name *xstats_names, __rte_unused unsigned limit);
+       unsigned int size);
+static int ixgbevf_dev_xstats_get_names(struct rte_eth_dev *dev,
+       struct rte_eth_xstat_name *xstats_names, unsigned limit);
 static int ixgbe_dev_xstats_get_names_by_id(
-       __rte_unused struct rte_eth_dev *dev,
+       struct rte_eth_dev *dev,
        struct rte_eth_xstat_name *xstats_names,
        const uint64_t *ids,
        unsigned int limit);
@@ -3194,7 +3194,7 @@ static int ixgbe_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
 }
 
 static int ixgbe_dev_xstats_get_names_by_id(
-       __rte_unused struct rte_eth_dev *dev,
+       struct rte_eth_dev *dev,
        struct rte_eth_xstat_name *xstats_names,
        const uint64_t *ids,
        unsigned int limit)
index da7b1cc..29e5ddc 100644 (file)
@@ -2583,7 +2583,7 @@ out:
  * the HW. Because there can be no enough room for the rule.
  */
 static int
-ixgbe_flow_validate(__rte_unused struct rte_eth_dev *dev,
+ixgbe_flow_validate(struct rte_eth_dev *dev,
                const struct rte_flow_attr *attr,
                const struct rte_flow_item pattern[],
                const struct rte_flow_action actions[],
index d88832e..6f30c42 100644 (file)
@@ -511,7 +511,7 @@ ixgbe_vf_set_mac_addr(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
 }
 
 static int
-ixgbe_vf_set_multicast(struct rte_eth_dev *dev, __rte_unused uint32_t vf, uint32_t *msgbuf)
+ixgbe_vf_set_multicast(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
 {
        struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
        struct ixgbe_vf_info *vfinfo =
index 9fae40b..5585404 100644 (file)
@@ -1241,7 +1241,7 @@ qede_get_xstats_count(struct qede_dev *qdev) {
 }
 
 static int
-qede_get_xstats_names(__rte_unused struct rte_eth_dev *dev,
+qede_get_xstats_names(struct rte_eth_dev *dev,
                      struct rte_eth_xstat_name *xstats_names,
                      __rte_unused unsigned int limit)
 {
index a1bbd25..edbd923 100644 (file)
@@ -258,9 +258,9 @@ uint16_t qede_xmit_prep_pkts(void *p_txq, struct rte_mbuf **tx_pkts,
 uint16_t qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts,
                        uint16_t nb_pkts);
 
-uint16_t qede_rxtx_pkts_dummy(__rte_unused void *p_rxq,
-                             __rte_unused struct rte_mbuf **pkts,
-                             __rte_unused uint16_t nb_pkts);
+uint16_t qede_rxtx_pkts_dummy(void *p_rxq,
+                             struct rte_mbuf **pkts,
+                             uint16_t nb_pkts);
 
 /* Fastpath resource alloc/dealloc helpers */
 int qede_alloc_fp_resc(struct qede_dev *qdev);
index 160d39f..a16dc27 100644 (file)
@@ -237,8 +237,7 @@ sfc_ev_dp_tx(void *arg, __rte_unused uint32_t label, uint32_t id)
 }
 
 static boolean_t
-sfc_ev_exception(void *arg, __rte_unused uint32_t code,
-                __rte_unused uint32_t data)
+sfc_ev_exception(void *arg, uint32_t code, __rte_unused uint32_t data)
 {
        struct sfc_evq *evq = arg;
 
index 49549b4..e6261e7 100644 (file)
@@ -591,7 +591,7 @@ tap_stats_reset(struct rte_eth_dev *dev)
 }
 
 static void
-tap_dev_close(struct rte_eth_dev *dev __rte_unused)
+tap_dev_close(struct rte_eth_dev *dev)
 {
        int i;
        struct pmd_internals *internals = dev->data->dev_private;
index 45f9bca..37512e6 100644 (file)
@@ -71,7 +71,7 @@ static void virtio_dev_allmulticast_disable(struct rte_eth_dev *dev);
 static void virtio_dev_info_get(struct rte_eth_dev *dev,
                                struct rte_eth_dev_info *dev_info);
 static int virtio_dev_link_update(struct rte_eth_dev *dev,
-       __rte_unused int wait_to_complete);
+       int wait_to_complete);
 
 static void virtio_set_hwaddr(struct virtio_hw *hw);
 static void virtio_get_hwaddr(struct virtio_hw *hw);
@@ -89,16 +89,16 @@ static int virtio_vlan_filter_set(struct rte_eth_dev *dev,
                                uint16_t vlan_id, int on);
 static int virtio_mac_addr_add(struct rte_eth_dev *dev,
                                struct ether_addr *mac_addr,
-                               uint32_t index, uint32_t vmdq __rte_unused);
+                               uint32_t index, uint32_t vmdq);
 static void virtio_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index);
 static void virtio_mac_addr_set(struct rte_eth_dev *dev,
                                struct ether_addr *mac_addr);
 
 static int virtio_dev_queue_stats_mapping_set(
-       __rte_unused struct rte_eth_dev *eth_dev,
-       __rte_unused uint16_t queue_id,
-       __rte_unused uint8_t stat_idx,
-       __rte_unused uint8_t is_rx);
+       struct rte_eth_dev *eth_dev,
+       uint16_t queue_id,
+       uint8_t stat_idx,
+       uint8_t is_rx);
 
 /*
  * The set of PCI devices this driver supports
index e865c67..d8713a1 100644 (file)
@@ -901,7 +901,7 @@ vmxnet3_dev_tx_queue_setup(struct rte_eth_dev *dev,
                           uint16_t queue_idx,
                           uint16_t nb_desc,
                           unsigned int socket_id,
-                          __rte_unused const struct rte_eth_txconf *tx_conf)
+                          const struct rte_eth_txconf *tx_conf)
 {
        struct vmxnet3_hw *hw = dev->data->dev_private;
        const struct rte_memzone *mz;