From patchwork Wed May 29 19:14:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 53862 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4CFE81B999; Wed, 29 May 2019 21:15:16 +0200 (CEST) Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by dpdk.org (Postfix) with ESMTP id 337121B953 for ; Wed, 29 May 2019 21:15:09 +0200 (CEST) Received: by mail-pf1-f195.google.com with SMTP id q17so2248529pfq.8 for ; Wed, 29 May 2019 12:15:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=s7vmQUF3Ia1WsYHftA0Q+nc0H6hkv0pN8jH33OGAGjI=; b=T/IprvQFDloejYT/s1bX1wzEq09bckSLgnxVf2fmSy5XjYKquszCaH5Qi6BZOwruDl qPts2tHpO3JO5GOnhclfC02AskNkpbG6gPqwO9f1kS0vMEuDOCCCSmXlN8cffHIj/i1Y SfD2T85mdziFj0fxMzdZ/F7Aq8z1zQ8rHFZUpk2pDnOm3DIGCrZm1EpdUA30+emcpCov k3oDqGh8mS0Xp6eGMm4symEw9RHiE7Y/8uH0Te7MG70irRQoArCMI6axTD9R7xoS1sZ0 8bfb1NB65vW/nhbQL95iFbwHVA08Q4q9+KTdb43RSB+ipHjD/1Gccw9L7kGuI7bMWtXB 9k8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=s7vmQUF3Ia1WsYHftA0Q+nc0H6hkv0pN8jH33OGAGjI=; b=KEaJQSzJvoNFoWsSItZSdBgFLoj3BSbT/S+VsjP8Zq+4eg45XIGm/FmYkD2HxZFgEZ wPqt9HCTYi3VrqFDSA+6dAR3binCquCjJ6iOLeVXx852kOtXCeN+zk5738s6KGRFzIqq e9evXgmuu54GchrEomm3B/Rj1G4RpdH0M/xpPTfQk7tf46QTJsjdIvZ8KyXL7kAcErep 4yYystdhIbL3eJJmIAK/Zk4yWRXh1zOCb/2tEiloW/LoX1so9NvpQj+d8dKI1V7Ij6y9 /2C9gaROcWozcq2rscjuU6yQvXfaB/9+9Jwie0t8VljMFVQeN5K7+NO6h2K8lBxMcNZ3 t9Sw== X-Gm-Message-State: APjAAAW0J7vZ8nMLFwCNLf+l8MEF6Q4jbndVBnNFnkYPi/v67tRFsCcI Gw7XJs9ksADT0KoYYEH3ejeDtJfo+Q4= X-Google-Smtp-Source: APXvYqxeOI7deTDcToIjvyXKHkLiimXFe2gI3EtzEV6cssvgpkwHeEbDa22kCERoKA1bSjmo8xuFrQ== X-Received: by 2002:a63:3dcf:: with SMTP id k198mr141835519pga.60.1559157307499; Wed, 29 May 2019 12:15:07 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id t18sm142943pgm.69.2019.05.29.12.15.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 May 2019 12:15:06 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Wed, 29 May 2019 12:14:53 -0700 Message-Id: <20190529191501.19053-5-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190529191501.19053-1-stephen@networkplumber.org> References: <20190529191501.19053-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 04/12] net/bnxt: remove unnecessary cast X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The device private pointer (dev_private) is of type void * therefore no cast is necessary in C. Signed-off-by: Stephen Hemminger Acked-by: Lance Richardson --- drivers/net/bnxt/bnxt_ethdev.c | 86 ++++++++++++++++----------------- drivers/net/bnxt/bnxt_flow.c | 10 ++-- drivers/net/bnxt/bnxt_irq.c | 2 +- drivers/net/bnxt/bnxt_rxq.c | 6 +-- drivers/net/bnxt/bnxt_stats.c | 6 +-- drivers/net/bnxt/bnxt_txq.c | 2 +- drivers/net/bnxt/bnxt_txr.c | 4 +- drivers/net/bnxt/rte_pmd_bnxt.c | 32 ++++++------ 8 files changed, 74 insertions(+), 74 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index b0244d6d19ea..be9cd318ec87 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -441,7 +441,7 @@ static int bnxt_init_nic(struct bnxt *bp) static void bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *dev_info) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; uint16_t max_vnics, i, j, vpool, vrxq; unsigned int max_rx_rings; @@ -537,7 +537,7 @@ static void bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev, /* Configure the device based on the configuration provided */ static int bnxt_dev_configure_op(struct rte_eth_dev *eth_dev) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; uint64_t rx_offloads = eth_dev->data->dev_conf.rxmode.offloads; int rc; @@ -626,7 +626,7 @@ static int bnxt_dev_lsc_intr_setup(struct rte_eth_dev *eth_dev) static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; uint64_t rx_offloads = eth_dev->data->dev_conf.rxmode.offloads; int vlan_mask = 0; int rc; @@ -664,7 +664,7 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev) static int bnxt_dev_set_link_up_op(struct rte_eth_dev *eth_dev) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; int rc = 0; if (!bp->link_info.link_up) @@ -678,7 +678,7 @@ static int bnxt_dev_set_link_up_op(struct rte_eth_dev *eth_dev) static int bnxt_dev_set_link_down_op(struct rte_eth_dev *eth_dev) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; eth_dev->data->dev_link.link_status = 0; bnxt_set_hwrm_link_config(bp, false); @@ -690,7 +690,7 @@ static int bnxt_dev_set_link_down_op(struct rte_eth_dev *eth_dev) /* Unload the driver, release resources */ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; bp->flags &= ~BNXT_FLAG_INIT_DONE; if (bp->eth_dev->data->dev_started) { @@ -707,7 +707,7 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev) static void bnxt_dev_close_op(struct rte_eth_dev *eth_dev) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; if (bp->dev_stopped == 0) bnxt_dev_stop_op(eth_dev); @@ -727,7 +727,7 @@ static void bnxt_dev_close_op(struct rte_eth_dev *eth_dev) static void bnxt_mac_addr_remove_op(struct rte_eth_dev *eth_dev, uint32_t index) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; uint64_t pool_mask = eth_dev->data->mac_pool_sel[index]; struct bnxt_vnic_info *vnic; struct bnxt_filter_info *filter, *temp_filter; @@ -763,7 +763,7 @@ static int bnxt_mac_addr_add_op(struct rte_eth_dev *eth_dev, struct rte_ether_addr *mac_addr, uint32_t index, uint32_t pool) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; struct bnxt_vnic_info *vnic = &bp->vnic_info[pool]; struct bnxt_filter_info *filter; @@ -798,7 +798,7 @@ static int bnxt_mac_addr_add_op(struct rte_eth_dev *eth_dev, int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete) { int rc = 0; - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; struct rte_eth_link new; unsigned int cnt = BNXT_LINK_WAIT_CNT; @@ -838,7 +838,7 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete) static void bnxt_promiscuous_enable_op(struct rte_eth_dev *eth_dev) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; struct bnxt_vnic_info *vnic; if (bp->vnic_info == NULL) @@ -852,7 +852,7 @@ static void bnxt_promiscuous_enable_op(struct rte_eth_dev *eth_dev) static void bnxt_promiscuous_disable_op(struct rte_eth_dev *eth_dev) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; struct bnxt_vnic_info *vnic; if (bp->vnic_info == NULL) @@ -866,7 +866,7 @@ static void bnxt_promiscuous_disable_op(struct rte_eth_dev *eth_dev) static void bnxt_allmulticast_enable_op(struct rte_eth_dev *eth_dev) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; struct bnxt_vnic_info *vnic; if (bp->vnic_info == NULL) @@ -880,7 +880,7 @@ static void bnxt_allmulticast_enable_op(struct rte_eth_dev *eth_dev) static void bnxt_allmulticast_disable_op(struct rte_eth_dev *eth_dev) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; struct bnxt_vnic_info *vnic; if (bp->vnic_info == NULL) @@ -896,7 +896,7 @@ static int bnxt_reta_update_op(struct rte_eth_dev *eth_dev, struct rte_eth_rss_reta_entry64 *reta_conf, uint16_t reta_size) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; struct rte_eth_conf *dev_conf = &bp->eth_dev->data->dev_conf; struct bnxt_vnic_info *vnic; int i; @@ -923,7 +923,7 @@ static int bnxt_reta_query_op(struct rte_eth_dev *eth_dev, struct rte_eth_rss_reta_entry64 *reta_conf, uint16_t reta_size) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; struct bnxt_vnic_info *vnic = &bp->vnic_info[0]; struct rte_intr_handle *intr_handle = &bp->pdev->intr_handle; @@ -954,7 +954,7 @@ static int bnxt_reta_query_op(struct rte_eth_dev *eth_dev, static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev, struct rte_eth_rss_conf *rss_conf) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; struct rte_eth_conf *dev_conf = &bp->eth_dev->data->dev_conf; struct bnxt_vnic_info *vnic; uint16_t hash_type = 0; @@ -1010,7 +1010,7 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev, static int bnxt_rss_hash_conf_get_op(struct rte_eth_dev *eth_dev, struct rte_eth_rss_conf *rss_conf) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; struct bnxt_vnic_info *vnic = &bp->vnic_info[0]; int len; uint32_t hash_types; @@ -1068,7 +1068,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) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct rte_eth_link link_info; int rc; @@ -1100,7 +1100,7 @@ static int bnxt_flow_ctrl_get_op(struct rte_eth_dev *dev, static int bnxt_flow_ctrl_set_op(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; if (!BNXT_SINGLE_PF(bp) || BNXT_VF(bp)) { PMD_DRV_LOG(ERR, "Flow Control Settings cannot be modified\n"); @@ -1156,7 +1156,7 @@ static int bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev, struct rte_eth_udp_tunnel *udp_tunnel) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; uint16_t tunnel_type = 0; int rc = 0; @@ -1204,7 +1204,7 @@ static int bnxt_udp_tunnel_port_del_op(struct rte_eth_dev *eth_dev, struct rte_eth_udp_tunnel *udp_tunnel) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; uint16_t tunnel_type = 0; uint16_t port = 0; int rc = 0; @@ -1404,7 +1404,7 @@ static int bnxt_add_vlan_filter(struct bnxt *bp, uint16_t vlan_id) static int bnxt_vlan_filter_set_op(struct rte_eth_dev *eth_dev, uint16_t vlan_id, int on) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; /* These operations apply to ALL existing MAC/VLAN filters */ if (on) @@ -1416,7 +1416,7 @@ static int bnxt_vlan_filter_set_op(struct rte_eth_dev *eth_dev, static int bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; uint64_t rx_offloads = dev->data->dev_conf.rxmode.offloads; unsigned int i; @@ -1454,7 +1454,7 @@ static int bnxt_set_default_mac_addr_op(struct rte_eth_dev *dev, struct rte_ether_addr *addr) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; /* Default Filter is tied to VNIC 0 */ struct bnxt_vnic_info *vnic = &bp->vnic_info[0]; struct bnxt_filter_info *filter; @@ -1493,7 +1493,7 @@ bnxt_dev_set_mc_addr_list_op(struct rte_eth_dev *eth_dev, struct rte_ether_addr *mc_addr_set, uint32_t nb_mc_addr) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; char *mc_addr_list = (char *)mc_addr_set; struct bnxt_vnic_info *vnic; uint32_t off = 0, i = 0; @@ -1522,7 +1522,7 @@ bnxt_dev_set_mc_addr_list_op(struct rte_eth_dev *eth_dev, static int bnxt_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; uint8_t fw_major = (bp->fw_ver >> 24) & 0xff; uint8_t fw_minor = (bp->fw_ver >> 16) & 0xff; uint8_t fw_updt = (bp->fw_ver >> 8) & 0xff; @@ -1632,7 +1632,7 @@ static int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu) static int bnxt_vlan_pvid_set_op(struct rte_eth_dev *dev, uint16_t pvid, int on) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; uint16_t vlan = bp->vlan; int rc; @@ -1652,7 +1652,7 @@ bnxt_vlan_pvid_set_op(struct rte_eth_dev *dev, uint16_t pvid, int on) static int bnxt_dev_led_on_op(struct rte_eth_dev *dev) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; return bnxt_hwrm_port_led_cfg(bp, true); } @@ -1660,7 +1660,7 @@ bnxt_dev_led_on_op(struct rte_eth_dev *dev) static int bnxt_dev_led_off_op(struct rte_eth_dev *dev) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; return bnxt_hwrm_port_led_cfg(bp, false); } @@ -1852,7 +1852,7 @@ bnxt_ethertype_filter(struct rte_eth_dev *dev, enum rte_filter_op filter_op, void *arg) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct rte_eth_ethertype_filter *efilter = (struct rte_eth_ethertype_filter *)arg; struct bnxt_filter_info *bfilter, *filter1; @@ -2156,7 +2156,7 @@ bnxt_ntuple_filter(struct rte_eth_dev *dev, enum rte_filter_op filter_op, void *arg) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; int ret; if (filter_op == RTE_ETH_FILTER_NOP) @@ -2473,7 +2473,7 @@ bnxt_fdir_filter(struct rte_eth_dev *dev, enum rte_filter_op filter_op, void *arg) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct rte_eth_fdir_filter *fdir = (struct rte_eth_fdir_filter *)arg; struct bnxt_filter_info *filter, *match; struct bnxt_vnic_info *vnic, *mvnic; @@ -2759,7 +2759,7 @@ static int bnxt_timesync_write_time(struct rte_eth_dev *dev, const struct timespec *ts) { uint64_t ns; - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct bnxt_ptp_cfg *ptp = bp->ptp_cfg; if (!ptp) @@ -2776,7 +2776,7 @@ static int bnxt_timesync_read_time(struct rte_eth_dev *dev, struct timespec *ts) { uint64_t ns, systime_cycles; - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct bnxt_ptp_cfg *ptp = bp->ptp_cfg; if (!ptp) @@ -2791,7 +2791,7 @@ bnxt_timesync_read_time(struct rte_eth_dev *dev, struct timespec *ts) static int bnxt_timesync_enable(struct rte_eth_dev *dev) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct bnxt_ptp_cfg *ptp = bp->ptp_cfg; uint32_t shift = 0; @@ -2827,7 +2827,7 @@ bnxt_timesync_enable(struct rte_eth_dev *dev) static int bnxt_timesync_disable(struct rte_eth_dev *dev) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct bnxt_ptp_cfg *ptp = bp->ptp_cfg; if (!ptp) @@ -2849,7 +2849,7 @@ bnxt_timesync_read_rx_timestamp(struct rte_eth_dev *dev, struct timespec *timestamp, uint32_t flags __rte_unused) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct bnxt_ptp_cfg *ptp = bp->ptp_cfg; uint64_t rx_tstamp_cycles = 0; uint64_t ns; @@ -2867,7 +2867,7 @@ static int bnxt_timesync_read_tx_timestamp(struct rte_eth_dev *dev, struct timespec *timestamp) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct bnxt_ptp_cfg *ptp = bp->ptp_cfg; uint64_t tx_tstamp_cycles = 0; uint64_t ns; @@ -2885,7 +2885,7 @@ bnxt_timesync_read_tx_timestamp(struct rte_eth_dev *dev, static int bnxt_timesync_adjust_time(struct rte_eth_dev *dev, int64_t delta) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct bnxt_ptp_cfg *ptp = bp->ptp_cfg; if (!ptp) @@ -2899,7 +2899,7 @@ bnxt_timesync_adjust_time(struct rte_eth_dev *dev, int64_t delta) static int bnxt_get_eeprom_length_op(struct rte_eth_dev *dev) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; int rc; uint32_t dir_entries; uint32_t entry_length; @@ -2919,7 +2919,7 @@ static int bnxt_get_eeprom_op(struct rte_eth_dev *dev, struct rte_dev_eeprom_info *in_eeprom) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; uint32_t index; uint32_t offset; @@ -2990,7 +2990,7 @@ static int bnxt_set_eeprom_op(struct rte_eth_dev *dev, struct rte_dev_eeprom_info *in_eeprom) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; uint8_t index, dir_op; uint16_t type, ext, ordinal, attr; diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c index bb7f672fcf2a..6f92e3de5cd1 100644 --- a/drivers/net/bnxt/bnxt_flow.c +++ b/drivers/net/bnxt/bnxt_flow.c @@ -715,7 +715,7 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev, { const struct rte_flow_action *act = bnxt_flow_non_void_action(actions); - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; const struct rte_flow_action_queue *act_q; const struct rte_flow_action_vf *act_vf; struct bnxt_vnic_info *vnic, *vnic0; @@ -900,7 +900,7 @@ bnxt_flow_validate(struct rte_eth_dev *dev, const struct rte_flow_action actions[], struct rte_flow_error *error) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct bnxt_filter_info *filter; int ret = 0; @@ -999,7 +999,7 @@ bnxt_flow_create(struct rte_eth_dev *dev, const struct rte_flow_action actions[], struct rte_flow_error *error) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct bnxt_filter_info *filter; struct bnxt_vnic_info *vnic = NULL; bool update_flow = false; @@ -1100,7 +1100,7 @@ bnxt_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow, struct rte_flow_error *error) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct bnxt_filter_info *filter = flow->filter; struct bnxt_vnic_info *vnic = flow->vnic; int ret = 0; @@ -1129,7 +1129,7 @@ bnxt_flow_destroy(struct rte_eth_dev *dev, static int bnxt_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct bnxt_vnic_info *vnic; struct rte_flow *flow; unsigned int i; diff --git a/drivers/net/bnxt/bnxt_irq.c b/drivers/net/bnxt/bnxt_irq.c index 7ef7023eb607..e03766b41f35 100644 --- a/drivers/net/bnxt/bnxt_irq.c +++ b/drivers/net/bnxt/bnxt_irq.c @@ -20,7 +20,7 @@ static void bnxt_int_handler(void *param) { struct rte_eth_dev *eth_dev = (struct rte_eth_dev *)param; - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; struct bnxt_cp_ring_info *cpr = bp->def_cp_ring; struct cmpl_base *cmp; uint32_t raw_cons; diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c index f1ee9eedea37..cce5340595e9 100644 --- a/drivers/net/bnxt/bnxt_rxq.c +++ b/drivers/net/bnxt/bnxt_rxq.c @@ -288,7 +288,7 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev, const struct rte_eth_rxconf *rx_conf, struct rte_mempool *mp) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; uint64_t rx_offloads = eth_dev->data->dev_conf.rxmode.offloads; struct bnxt_rx_queue *rxq; int rc = 0; @@ -399,7 +399,7 @@ bnxt_rx_queue_intr_disable_op(struct rte_eth_dev *eth_dev, uint16_t queue_id) int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct rte_eth_conf *dev_conf = &bp->eth_dev->data->dev_conf; struct bnxt_rx_queue *rxq = bp->rx_queues[rx_queue_id]; struct bnxt_vnic_info *vnic = NULL; @@ -439,7 +439,7 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id) int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct rte_eth_conf *dev_conf = &bp->eth_dev->data->dev_conf; struct bnxt_vnic_info *vnic = NULL; struct bnxt_rx_queue *rxq = NULL; diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c index cae3b9ea27f7..ad28887743e7 100644 --- a/drivers/net/bnxt/bnxt_stats.c +++ b/drivers/net/bnxt/bnxt_stats.c @@ -387,7 +387,7 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev, void bnxt_stats_reset_op(struct rte_eth_dev *eth_dev) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; unsigned int i; if (!(bp->flags & BNXT_FLAG_INIT_DONE)) { @@ -406,7 +406,7 @@ void bnxt_stats_reset_op(struct rte_eth_dev *eth_dev) int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev, struct rte_eth_xstat *xstats, unsigned int n) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; unsigned int count, i; uint64_t tx_drop_pkts; @@ -532,7 +532,7 @@ int bnxt_dev_xstats_get_names_op(__rte_unused struct rte_eth_dev *eth_dev, void bnxt_dev_xstats_reset_op(struct rte_eth_dev *eth_dev) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; if (bp->flags & BNXT_FLAG_PORT_STATS && BNXT_SINGLE_PF(bp)) bnxt_hwrm_port_clr_stats(bp); diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c index 5a7bfaf3e769..665bfbc12629 100644 --- a/drivers/net/bnxt/bnxt_txq.c +++ b/drivers/net/bnxt/bnxt_txq.c @@ -80,7 +80,7 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev, unsigned int socket_id, const struct rte_eth_txconf *tx_conf) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; struct bnxt_tx_queue *txq; int rc = 0; diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c index 9de12e0d0f90..f460665ff6d6 100644 --- a/drivers/net/bnxt/bnxt_txr.c +++ b/drivers/net/bnxt/bnxt_txr.c @@ -475,7 +475,7 @@ uint16_t bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, int bnxt_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct bnxt_tx_queue *txq = bp->tx_queues[tx_queue_id]; dev->data->tx_queue_state[tx_queue_id] = RTE_ETH_QUEUE_STATE_STARTED; @@ -487,7 +487,7 @@ int bnxt_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id) int bnxt_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct bnxt_tx_queue *txq = bp->tx_queues[tx_queue_id]; /* Handle TX completions */ diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c index f0778967048f..fbd2dd493db9 100644 --- a/drivers/net/bnxt/rte_pmd_bnxt.c +++ b/drivers/net/bnxt/rte_pmd_bnxt.c @@ -54,7 +54,7 @@ int rte_pmd_bnxt_set_tx_loopback(uint16_t port, uint8_t on) if (!is_bnxt_supported(eth_dev)) return -ENOTSUP; - bp = (struct bnxt *)eth_dev->data->dev_private; + bp = eth_dev->data->dev_private; if (!BNXT_PF(bp)) { PMD_DRV_LOG(ERR, @@ -96,7 +96,7 @@ int rte_pmd_bnxt_set_all_queues_drop_en(uint16_t port, uint8_t on) if (!is_bnxt_supported(eth_dev)) return -ENOTSUP; - bp = (struct bnxt *)eth_dev->data->dev_private; + bp = eth_dev->data->dev_private; if (!BNXT_PF(bp)) { PMD_DRV_LOG(ERR, @@ -146,7 +146,7 @@ int rte_pmd_bnxt_set_vf_mac_addr(uint16_t port, uint16_t vf, return -ENOTSUP; rte_eth_dev_info_get(port, &dev_info); - bp = (struct bnxt *)dev->data->dev_private; + bp = dev->data->dev_private; if (vf >= dev_info.max_vfs || mac_addr == NULL) return -EINVAL; @@ -180,7 +180,7 @@ int rte_pmd_bnxt_set_vf_rate_limit(uint16_t port, uint16_t vf, return -ENOTSUP; rte_eth_dev_info_get(port, &dev_info); - bp = (struct bnxt *)eth_dev->data->dev_private; + bp = eth_dev->data->dev_private; if (!bp->pf.active_vfs) return -EINVAL; @@ -231,7 +231,7 @@ int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf, uint8_t on) return -ENOTSUP; rte_eth_dev_info_get(port, &dev_info); - bp = (struct bnxt *)dev->data->dev_private; + bp = dev->data->dev_private; if (!BNXT_PF(bp)) { PMD_DRV_LOG(ERR, @@ -283,7 +283,7 @@ int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf, uint8_t on) return -ENOTSUP; rte_eth_dev_info_get(port, &dev_info); - bp = (struct bnxt *)dev->data->dev_private; + bp = dev->data->dev_private; if (!BNXT_PF(bp)) { PMD_DRV_LOG(ERR, @@ -333,7 +333,7 @@ rte_pmd_bnxt_set_vf_vlan_stripq(uint16_t port, uint16_t vf, uint8_t on) return -ENOTSUP; rte_eth_dev_info_get(port, &dev_info); - bp = (struct bnxt *)dev->data->dev_private; + bp = dev->data->dev_private; if (vf >= dev_info.max_vfs) return -EINVAL; @@ -370,7 +370,7 @@ int rte_pmd_bnxt_set_vf_rxmode(uint16_t port, uint16_t vf, return -ENOTSUP; rte_eth_dev_info_get(port, &dev_info); - bp = (struct bnxt *)dev->data->dev_private; + bp = dev->data->dev_private; if (!bp->pf.vf_info) return -EINVAL; @@ -462,7 +462,7 @@ int rte_pmd_bnxt_set_vf_vlan_filter(uint16_t port, uint16_t vlan, if (!is_bnxt_supported(dev)) return -ENOTSUP; - bp = (struct bnxt *)dev->data->dev_private; + bp = dev->data->dev_private; if (!bp->pf.vf_info) return -EINVAL; @@ -551,7 +551,7 @@ int rte_pmd_bnxt_get_vf_stats(uint16_t port, return -ENOTSUP; rte_eth_dev_info_get(port, &dev_info); - bp = (struct bnxt *)dev->data->dev_private; + bp = dev->data->dev_private; if (vf_id >= dev_info.max_vfs) return -EINVAL; @@ -578,7 +578,7 @@ int rte_pmd_bnxt_reset_vf_stats(uint16_t port, return -ENOTSUP; rte_eth_dev_info_get(port, &dev_info); - bp = (struct bnxt *)dev->data->dev_private; + bp = dev->data->dev_private; if (vf_id >= dev_info.max_vfs) return -EINVAL; @@ -604,7 +604,7 @@ int rte_pmd_bnxt_get_vf_rx_status(uint16_t port, uint16_t vf_id) return -ENOTSUP; rte_eth_dev_info_get(port, &dev_info); - bp = (struct bnxt *)dev->data->dev_private; + bp = dev->data->dev_private; if (vf_id >= dev_info.max_vfs) return -EINVAL; @@ -631,7 +631,7 @@ int rte_pmd_bnxt_get_vf_tx_drop_count(uint16_t port, uint16_t vf_id, return -ENOTSUP; rte_eth_dev_info_get(port, &dev_info); - bp = (struct bnxt *)dev->data->dev_private; + bp = dev->data->dev_private; if (vf_id >= dev_info.max_vfs) return -EINVAL; @@ -663,7 +663,7 @@ int rte_pmd_bnxt_mac_addr_add(uint16_t port, struct rte_ether_addr *addr, return -ENOTSUP; rte_eth_dev_info_get(port, &dev_info); - bp = (struct bnxt *)dev->data->dev_private; + bp = dev->data->dev_private; if (vf_id >= dev_info.max_vfs) return -EINVAL; @@ -739,7 +739,7 @@ rte_pmd_bnxt_set_vf_vlan_insert(uint16_t port, uint16_t vf, return -ENOTSUP; rte_eth_dev_info_get(port, &dev_info); - bp = (struct bnxt *)dev->data->dev_private; + bp = dev->data->dev_private; if (vf >= dev_info.max_vfs) return -EINVAL; @@ -776,7 +776,7 @@ int rte_pmd_bnxt_set_vf_persist_stats(uint16_t port, uint16_t vf, uint8_t on) dev = &rte_eth_devices[port]; rte_eth_dev_info_get(port, &dev_info); - bp = (struct bnxt *)dev->data->dev_private; + bp = dev->data->dev_private; if (!BNXT_PF(bp)) { PMD_DRV_LOG(ERR,