From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rcdn-iport-4.cisco.com (rcdn-iport-4.cisco.com [173.37.86.75]) by dpdk.org (Postfix) with ESMTP id 444587EB0 for ; Wed, 3 Dec 2014 15:52:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=17399; q=dns/txt; s=iport; t=1417618376; x=1418827976; h=from:to:subject:date:message-id:references:in-reply-to: content-id:content-transfer-encoding:mime-version; bh=5ZlGsn72ra5Dj31O4JeHgAw5fJfx6JHCGhxCjHQ1oDg=; b=QpdyRSIIuwY6WiJN9c/0qsl7cFbBsooJpO0AoNATu5m1HPF5e2XbYawj th+zLyfRyp6E1mWvzsbgRuGGy1TAyGCzsaIGwAEfc8k2OH7Raxlao8MuR xd6AqK9k85ikuhWbQzw1y2QBH8L2N441CuadMEcqzqZO/9AkpgtxiEchZ Q=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkEFAGgBf1StJV2Z/2dsb2JhbABagwaBKgTMXAKBFRYBAQEBAX2EAwEBBCcTTwIBCDYQMiUCBAESiD7WDAEBAQEBAQQBAQEBAQEBG5BthEIFhWmKJopKlBaDeG+BRYEAAQEB X-IronPort-AV: E=Sophos;i="5.07,508,1413244800"; d="scan'208";a="377295235" Received: from rcdn-core-2.cisco.com ([173.37.93.153]) by rcdn-iport-4.cisco.com with ESMTP; 03 Dec 2014 14:52:54 +0000 Received: from xhc-rcd-x01.cisco.com (xhc-rcd-x01.cisco.com [173.37.183.75]) by rcdn-core-2.cisco.com (8.14.5/8.14.5) with ESMTP id sB3EqsGw020545 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Wed, 3 Dec 2014 14:52:54 GMT Received: from xmb-aln-x07.cisco.com ([169.254.2.173]) by xhc-rcd-x01.cisco.com ([173.37.183.75]) with mapi id 14.03.0195.001; Wed, 3 Dec 2014 08:52:54 -0600 From: "Sujith Sankar (ssujith)" To: Thomas Monjalon , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] enic: fix warnings Thread-Index: AQHQDkCuktcPIMZrUki/JI7pjsyY85x+tewA Date: Wed, 3 Dec 2014 14:52:53 +0000 Message-ID: References: <1417532360-8568-1-git-send-email-thomas.monjalon@6wind.com> In-Reply-To: <1417532360-8568-1-git-send-email-thomas.monjalon@6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.3.9.131030 x-originating-ip: [10.65.35.154] Content-Type: text/plain; charset="us-ascii" Content-ID: <61A0F126CA9163469C0B8096111030E6@emea.cisco.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] enic: fix warnings X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Dec 2014 14:52:56 -0000 On 02/12/14 8:29 pm, "Thomas Monjalon" wrote: >A lot of warnings were not seen because $(WERROR_FLAGS) was not set >in the Makefile. But they appear with toolchains that enforce more checks. > >-Wno-deprecated seems useless. >-Wno-strict-aliasing is added to avoid false positives. > >This patch cleans up unused variable, unused functions, wrong types, >static declarations, etc. A lot of functions have unused parameters; >it suggests that more clean-up could be needed. I shall look at it when I pull these changes to my repo. What other toolchains did you check with? > >Signed-off-by: Thomas Monjalon >--- > lib/librte_pmd_enic/Makefile | 3 +- > lib/librte_pmd_enic/enic.h | 4 +- > lib/librte_pmd_enic/enic_ethdev.c | 20 ++++----- > lib/librte_pmd_enic/enic_main.c | 81 >+++++++++++------------------------- > lib/librte_pmd_enic/vnic/vnic_cq.h | 1 - > lib/librte_pmd_enic/vnic/vnic_dev.c | 22 +++------- > lib/librte_pmd_enic/vnic/vnic_dev.h | 4 +- > lib/librte_pmd_enic/vnic/vnic_intr.c | 5 --- > 8 files changed, 46 insertions(+), 94 deletions(-) > >diff --git a/lib/librte_pmd_enic/Makefile b/lib/librte_pmd_enic/Makefile >index 948ec96..a2a623f 100644 >--- a/lib/librte_pmd_enic/Makefile >+++ b/lib/librte_pmd_enic/Makefile >@@ -39,7 +39,8 @@ LIB =3D librte_pmd_enic.a >=20 > CFLAGS +=3D -I$(RTE_SDK)/lib/librte_pmd_enic/vnic/ > CFLAGS +=3D -I$(RTE_SDK)/lib/librte_pmd_enic/ >-CFLAGS +=3D -O3 -Wno-deprecated >+CFLAGS +=3D -O3 >+CFLAGS +=3D $(WERROR_FLAGS) -Wno-strict-aliasing >=20 > VPATH +=3D $(RTE_SDK)/lib/librte_pmd_enic/src >=20 >diff --git a/lib/librte_pmd_enic/enic.h b/lib/librte_pmd_enic/enic.h >index f128e64..c43417c 100644 >--- a/lib/librte_pmd_enic/enic.h >+++ b/lib/librte_pmd_enic/enic.h >@@ -134,7 +134,7 @@ struct enic { > unsigned int intr_count; > }; >=20 >-static inline unsigned int enic_cq_rq(struct enic *enic, unsigned int rq) >+static inline unsigned int enic_cq_rq(__rte_unused struct enic *enic, >unsigned int rq) > { > return rq; > } >@@ -144,7 +144,7 @@ static inline unsigned int enic_cq_wq(struct enic >*enic, unsigned int wq) > return enic->rq_count + wq; > } >=20 >-static inline unsigned int enic_msix_err_intr(struct enic *enic) >+static inline unsigned int enic_msix_err_intr(__rte_unused struct enic >*enic) > { > return 0; > } >diff --git a/lib/librte_pmd_enic/enic_ethdev.c >b/lib/librte_pmd_enic/enic_ethdev.c >index f582152..9cb6666 100644 >--- a/lib/librte_pmd_enic/enic_ethdev.c >+++ b/lib/librte_pmd_enic/enic_ethdev.c >@@ -67,7 +67,7 @@ RTE_PCI_DEV_ID_DECL_ENIC(PCI_VENDOR_ID_CISCO, >PCI_DEVICE_ID_CISCO_VIC_ENET_VF) >=20 > static int enicpmd_fdir_remove_perfect_filter(struct rte_eth_dev >*eth_dev, > struct rte_fdir_filter *fdir_filter, >- uint16_t soft_id) >+ __rte_unused uint16_t soft_id) > { > struct enic *enic =3D pmd_priv(eth_dev); >=20 >@@ -76,7 +76,7 @@ static int enicpmd_fdir_remove_perfect_filter(struct >rte_eth_dev *eth_dev, > } >=20 > static int enicpmd_fdir_add_perfect_filter(struct rte_eth_dev *eth_dev, >- struct rte_fdir_filter *fdir_filter, uint16_t soft_id, >+ struct rte_fdir_filter *fdir_filter, __rte_unused uint16_t soft_id, > uint8_t queue, uint8_t drop) > { > struct enic *enic =3D pmd_priv(eth_dev); >@@ -103,7 +103,7 @@ static void enicpmd_dev_tx_queue_release(void *txq) > static int enicpmd_dev_setup_intr(struct enic *enic) > { > int ret; >- int index; >+ unsigned int index; >=20 > ENICPMD_FUNC_TRACE(); >=20 >@@ -134,7 +134,7 @@ static int enicpmd_dev_tx_queue_setup(struct >rte_eth_dev *eth_dev, > uint16_t queue_idx, > uint16_t nb_desc, > unsigned int socket_id, >- const struct rte_eth_txconf *tx_conf) >+ __rte_unused const struct rte_eth_txconf *tx_conf) > { > int ret; > struct enic *enic =3D pmd_priv(eth_dev); >@@ -215,7 +215,7 @@ static int enicpmd_dev_rx_queue_setup(struct >rte_eth_dev *eth_dev, > uint16_t queue_idx, > uint16_t nb_desc, > unsigned int socket_id, >- const struct rte_eth_rxconf *rx_conf, >+ __rte_unused const struct rte_eth_rxconf *rx_conf, > struct rte_mempool *mp) > { > int ret; >@@ -334,7 +334,7 @@ static void enicpmd_dev_close(struct rte_eth_dev >*eth_dev) > } >=20 > static int enicpmd_dev_link_update(struct rte_eth_dev *eth_dev, >- int wait_to_complete) >+ __rte_unused int wait_to_complete) > { > struct enic *enic =3D pmd_priv(eth_dev); > int ret; >@@ -428,7 +428,7 @@ static void enicpmd_dev_allmulticast_disable(struct >rte_eth_dev *eth_dev) >=20 > static void enicpmd_add_mac_addr(struct rte_eth_dev *eth_dev, > struct ether_addr *mac_addr, >- uint32_t index, uint32_t pool) >+ __rte_unused uint32_t index, __rte_unused uint32_t pool) > { > struct enic *enic =3D pmd_priv(eth_dev); >=20 >@@ -436,7 +436,7 @@ static void enicpmd_add_mac_addr(struct rte_eth_dev >*eth_dev, > enic_set_mac_address(enic, mac_addr->addr_bytes); > } >=20 >-static void enicpmd_remove_mac_addr(struct rte_eth_dev *eth_dev, >uint32_t index) >+static void enicpmd_remove_mac_addr(struct rte_eth_dev *eth_dev, >__rte_unused uint32_t index) > { > struct enic *enic =3D pmd_priv(eth_dev); >=20 >@@ -457,7 +457,6 @@ static uint16_t enicpmd_xmit_pkts(void *tx_queue, >struct rte_mbuf **tx_pkts, > struct rte_mbuf *tx_pkt; > struct vnic_wq *wq =3D (struct vnic_wq *)tx_queue; > struct enic *enic =3D vnic_dev_priv(wq->vdev); >- unsigned char *buf; > unsigned short vlan_id; > unsigned short ol_flags; >=20 >@@ -595,7 +594,8 @@ static struct eth_driver rte_enic_pmd =3D { > * Invoked once at EAL init time. > * Register as the [Poll Mode] Driver of Cisco ENIC device. > */ >-int rte_enic_pmd_init(const char *name __rte_unused, >+static int >+rte_enic_pmd_init(const char *name __rte_unused, > const char *params __rte_unused) > { > ENICPMD_FUNC_TRACE(); >diff --git a/lib/librte_pmd_enic/enic_main.c >b/lib/librte_pmd_enic/enic_main.c >index 4bbf1e4..e4f43c5 100644 >--- a/lib/librte_pmd_enic/enic_main.c >+++ b/lib/librte_pmd_enic/enic_main.c >@@ -90,32 +90,12 @@ enic_rxmbuf_alloc(struct rte_mempool *mp) > return m; > } >=20 >-static const struct rte_memzone *ring_dma_zone_reserve( >- struct rte_eth_dev *dev, const char *ring_name, >- uint16_t queue_id, uint32_t ring_size, int socket_id) >-{ >- char z_name[RTE_MEMZONE_NAMESIZE]; >- const struct rte_memzone *mz; >- >- snprintf(z_name, sizeof(z_name), "%s_%s_%d_%d", >- dev->driver->pci_drv.name, ring_name, >- dev->data->port_id, queue_id); >- >- mz =3D rte_memzone_lookup(z_name); >- if (mz) >- return mz; >- >- return rte_memzone_reserve_aligned((const char *)z_name, >- (uint64_t) ring_size, >- socket_id, RTE_MEMZONE_1GB, ENIC_ALIGN); >-} >- > void enic_set_hdr_split_size(struct enic *enic, u16 split_hdr_size) > { > vnic_set_hdr_split_size(enic->vdev, split_hdr_size); > } >=20 >-static void enic_free_wq_buf(struct vnic_wq *wq, struct vnic_wq_buf *buf) >+static void enic_free_wq_buf(__rte_unused struct vnic_wq *wq, struct >vnic_wq_buf *buf) > { > struct rte_mbuf *mbuf =3D (struct rte_mbuf *)buf->os_buf; >=20 >@@ -124,13 +104,15 @@ static void enic_free_wq_buf(struct vnic_wq *wq, >struct vnic_wq_buf *buf) > } >=20 > static void enic_wq_free_buf(struct vnic_wq *wq, >- struct cq_desc *cq_desc, struct vnic_wq_buf *buf, void *opaque) >+ __rte_unused struct cq_desc *cq_desc, >+ struct vnic_wq_buf *buf, >+ __rte_unused void *opaque) > { > enic_free_wq_buf(wq, buf); > } >=20 > static int enic_wq_service(struct vnic_dev *vdev, struct cq_desc >*cq_desc, >- u8 type, u16 q_number, u16 completed_index, void *opaque) >+ __rte_unused u8 type, u16 q_number, u16 completed_index, void *opaque) > { > struct enic *enic =3D vnic_dev_priv(vdev); >=20 >@@ -178,11 +160,8 @@ int enic_send_pkt(struct enic *enic, struct vnic_wq >*wq, > { > struct wq_enet_desc *desc =3D vnic_wq_next_desc(wq); > uint16_t mss =3D 0; >- uint16_t header_length =3D 0; > uint8_t cq_entry =3D eop; > uint8_t vlan_tag_insert =3D 0; >- unsigned char *buf =3D (unsigned char *)(tx_pkt->buf_addr) + >- RTE_PKTMBUF_HEADROOM; > uint64_t bus_addr =3D (dma_addr_t) > (tx_pkt->buf_physaddr + RTE_PKTMBUF_HEADROOM); >=20 >@@ -282,10 +261,9 @@ void enic_set_mac_address(struct enic *enic, uint8_t >*mac_addr) > } > } >=20 >-static void enic_free_rq_buf(struct vnic_rq *rq, struct vnic_rq_buf *buf) >+static void >+enic_free_rq_buf(__rte_unused struct vnic_rq *rq, struct vnic_rq_buf >*buf) > { >- struct enic *enic =3D vnic_dev_priv(rq->vdev); >- > if (!buf->os_buf) > return; >=20 >@@ -297,8 +275,7 @@ void enic_init_vnic_resources(struct enic *enic) > { > unsigned int error_interrupt_enable =3D 1; > unsigned int error_interrupt_offset =3D 0; >- int index =3D 0; >- unsigned int cq_index =3D 0; >+ unsigned int index =3D 0; >=20 > for (index =3D 0; index < enic->rq_count; index++) { > vnic_rq_init(&enic->rq[index], >@@ -340,11 +317,9 @@ void enic_init_vnic_resources(struct enic *enic) > static int enic_rq_alloc_buf(struct vnic_rq *rq) > { > struct enic *enic =3D vnic_dev_priv(rq->vdev); >- void *buf; > dma_addr_t dma_addr; > struct rq_enet_desc *desc =3D vnic_rq_next_desc(rq); > uint8_t type =3D RQ_ENET_TYPE_ONLY_SOP; >- uint16_t len =3D ENIC_MAX_MTU + VLAN_ETH_HLEN; > u16 split_hdr_size =3D vnic_get_hdr_split_size(enic->vdev); > struct rte_mbuf *mbuf =3D enic_rxmbuf_alloc(rq->mp); > struct rte_mbuf *hdr_mbuf =3D NULL; >@@ -368,7 +343,6 @@ static int enic_rq_alloc_buf(struct vnic_rq *rq) > } >=20 > hdr_mbuf->data_off =3D RTE_PKTMBUF_HEADROOM; >- buf =3D rte_pktmbuf_mtod(hdr_mbuf, void *); >=20 > hdr_mbuf->nb_segs =3D 2; > hdr_mbuf->port =3D rq->index; >@@ -390,7 +364,6 @@ static int enic_rq_alloc_buf(struct vnic_rq *rq) > } >=20 > mbuf->data_off =3D RTE_PKTMBUF_HEADROOM; >- buf =3D rte_pktmbuf_mtod(mbuf, void *); > mbuf->next =3D NULL; >=20 > dma_addr =3D (dma_addr_t) >@@ -525,7 +498,7 @@ static int enic_rq_indicate_buf(struct vnic_rq *rq, > } >=20 > static int enic_rq_service(struct vnic_dev *vdev, struct cq_desc >*cq_desc, >- u8 type, u16 q_number, u16 completed_index, void *opaque) >+ __rte_unused u8 type, u16 q_number, u16 completed_index, void *opaque) > { > struct enic *enic =3D vnic_dev_priv(vdev); >=20 >@@ -557,10 +530,10 @@ int enic_poll(struct vnic_rq *rq, struct rte_mbuf >**rx_pkts, > return err; > } >=20 >-void *enic_alloc_consistent(void *priv, size_t size, >+static void * >+enic_alloc_consistent(__rte_unused void *priv, size_t size, > dma_addr_t *dma_handle, u8 *name) > { >- struct enic *enic =3D (struct enic *)priv; > void *vaddr; > const struct rte_memzone *rz; > *dma_handle =3D 0; >@@ -579,13 +552,17 @@ void *enic_alloc_consistent(void *priv, size_t size, > return vaddr; > } >=20 >-void enic_free_consistent(struct rte_pci_device *hwdev, size_t size, >- void *vaddr, dma_addr_t dma_handle) >+static void >+enic_free_consistent(__rte_unused struct rte_pci_device *hwdev, >+ __rte_unused size_t size, >+ __rte_unused void *vaddr, >+ __rte_unused dma_addr_t dma_handle) > { > /* Nothing to be done */ > } >=20 >-void enic_intr_handler(__rte_unused struct rte_intr_handle *handle, >+static void >+enic_intr_handler(__rte_unused struct rte_intr_handle *handle, > void *arg) > { > struct enic *enic =3D pmd_priv((struct rte_eth_dev *)arg); >@@ -598,10 +575,7 @@ void enic_intr_handler(__rte_unused struct >rte_intr_handle *handle, >=20 > int enic_enable(struct enic *enic) > { >- int index; >- void *res; >- char mz_name[RTE_MEMZONE_NAMESIZE]; >- const struct rte_memzone *rmz; >+ unsigned int index; > struct rte_eth_dev *eth_dev =3D enic->rte_dev; >=20 > eth_dev->data->dev_link.link_speed =3D vnic_dev_port_speed(enic->vdev); >@@ -869,11 +843,11 @@ static int enic_set_rsskey(struct enic *enic) > { > dma_addr_t rss_key_buf_pa; > union vnic_rss_key *rss_key_buf_va =3D NULL; >- union vnic_rss_key rss_key =3D { >- .key[0].b =3D {85, 67, 83, 97, 119, 101, 115, 111, 109, 101}, >- .key[1].b =3D {80, 65, 76, 79, 117, 110, 105, 113, 117, 101}, >- .key[2].b =3D {76, 73, 78, 85, 88, 114, 111, 99, 107, 115}, >- .key[3].b =3D {69, 78, 73, 67, 105, 115, 99, 111, 111, 108}, >+ static union vnic_rss_key rss_key =3D { >+ .key[0] =3D {.b =3D {85, 67, 83, 97, 119, 101, 115, 111, 109, 101}}, >+ .key[1] =3D {.b =3D {80, 65, 76, 79, 117, 110, 105, 113, 117, 101}}, >+ .key[2] =3D {.b =3D {76, 73, 78, 85, 88, 114, 111, 99, 107, 115}}, >+ .key[3] =3D {.b =3D {69, 78, 73, 67, 105, 115, 99, 111, 111, 108}}, > }; > int err; > u8 name[NAME_MAX]; >@@ -900,7 +874,7 @@ static int enic_set_rsscpu(struct enic *enic, u8 >rss_hash_bits) > { > dma_addr_t rss_cpu_buf_pa; > union vnic_rss_cpu *rss_cpu_buf_va =3D NULL; >- unsigned int i; >+ int i; > int err; > u8 name[NAME_MAX]; >=20 >@@ -1105,7 +1079,6 @@ static void enic_clear_intr_mode(struct enic *enic) >=20 > static void enic_dev_deinit(struct enic *enic) > { >- unsigned int i; > struct rte_eth_dev *eth_dev =3D enic->rte_dev; >=20 > if (eth_dev->data->mac_addrs) >@@ -1140,7 +1113,6 @@ int enic_set_vnic_res(struct enic *enic) >=20 > static int enic_dev_init(struct enic *enic) > { >- unsigned int i; > int err; > struct rte_eth_dev *eth_dev =3D enic->rte_dev; >=20 >@@ -1189,10 +1161,7 @@ static int enic_dev_init(struct enic *enic) >=20 > int enic_probe(struct enic *enic) > { >- const char *bdf =3D enic->bdf_name; > struct rte_pci_device *pdev =3D enic->pdev; >- struct rte_eth_dev *eth_dev =3D enic->rte_dev; >- unsigned int i; > int err =3D -1; >=20 > dev_info(enic, " Initializing ENIC PMD version %s\n", DRV_VERSION); >diff --git a/lib/librte_pmd_enic/vnic/vnic_cq.h >b/lib/librte_pmd_enic/vnic/vnic_cq.h >index 9ed9b1d..0928d72 100644 >--- a/lib/librte_pmd_enic/vnic/vnic_cq.h >+++ b/lib/librte_pmd_enic/vnic/vnic_cq.h >@@ -103,7 +103,6 @@ static inline unsigned int vnic_cq_service(struct >vnic_cq *cq, > u8 type, color; > struct rte_mbuf **rx_pkts =3D opaque; > unsigned int ret; >- unsigned int split_hdr_size =3D vnic_get_hdr_split_size(cq->vdev); >=20 > cq_desc =3D (struct cq_desc *)((u8 *)cq->ring.descs + > cq->ring.desc_size * cq->to_clean); >diff --git a/lib/librte_pmd_enic/vnic/vnic_dev.c >b/lib/librte_pmd_enic/vnic/vnic_dev.c >index 682c9c9..21d5521 100644 >--- a/lib/librte_pmd_enic/vnic/vnic_dev.c >+++ b/lib/librte_pmd_enic/vnic/vnic_dev.c >@@ -267,7 +267,8 @@ void vnic_dev_clear_desc_ring(struct vnic_dev_ring >*ring) > memset(ring->descs, 0, ring->size); > } >=20 >-int vnic_dev_alloc_desc_ring(struct vnic_dev *vdev, struct vnic_dev_ring >*ring, >+int vnic_dev_alloc_desc_ring(__attribute__((unused)) struct vnic_dev >*vdev, >+ struct vnic_dev_ring *ring, > unsigned int desc_count, unsigned int desc_size, unsigned int socket_id, > char *z_name) > { >@@ -305,7 +306,8 @@ int vnic_dev_alloc_desc_ring(struct vnic_dev *vdev, >struct vnic_dev_ring *ring, > return 0; > } >=20 >-void vnic_dev_free_desc_ring(struct vnic_dev *vdev, struct vnic_dev_ring >*ring) >+void vnic_dev_free_desc_ring(__attribute__((unused)) struct vnic_dev >*vdev, >+ struct vnic_dev_ring *ring) > { > if (ring->descs) > ring->descs =3D NULL; >@@ -761,7 +763,7 @@ int vnic_dev_notify_setcmd(struct vnic_dev *vdev, >=20 > int vnic_dev_notify_set(struct vnic_dev *vdev, u16 intr) > { >- void *notify_addr; >+ void *notify_addr =3D NULL; > dma_addr_t notify_pa; > char name[NAME_MAX]; > static u32 instance; >@@ -973,20 +975,6 @@ struct rte_pci_device *vnic_dev_get_pdev(struct >vnic_dev *vdev) > return vdev->pdev; > } >=20 >-static int vnic_dev_cmd_status(struct vnic_dev *vdev, enum >vnic_devcmd_cmd cmd, >- int *status) >-{ >- u64 a0 =3D cmd, a1 =3D 0; >- int wait =3D 1000; >- int ret; >- >- ret =3D vnic_dev_cmd(vdev, CMD_STATUS, &a0, &a1, wait); >- if (!ret) >- *status =3D (int)a0; >- >- return ret; >-} >- > int vnic_dev_set_mac_addr(struct vnic_dev *vdev, u8 *mac_addr) > { > u64 a0, a1; >diff --git a/lib/librte_pmd_enic/vnic/vnic_dev.h >b/lib/librte_pmd_enic/vnic/vnic_dev.h >index 8cc036b..d1373a5 100644 >--- a/lib/librte_pmd_enic/vnic/vnic_dev.h >+++ b/lib/librte_pmd_enic/vnic/vnic_dev.h >@@ -48,14 +48,14 @@ > #ifndef readq > static inline u64 readq(void __iomem *reg) > { >- return ((u64)readl(reg + 0x4UL) << 32) | >+ return ((u64)readl((char *)reg + 0x4UL) << 32) | > (u64)readl(reg); > } >=20 > static inline void writeq(u64 val, void __iomem *reg) > { > writel(val & 0xffffffff, reg); >- writel(val >> 32, reg + 0x4UL); >+ writel(val >> 32, (char *)reg + 0x4UL); > } > #endif >=20 >diff --git a/lib/librte_pmd_enic/vnic/vnic_intr.c >b/lib/librte_pmd_enic/vnic/vnic_intr.c >index 9be3744..84368af 100644 >--- a/lib/librte_pmd_enic/vnic/vnic_intr.c >+++ b/lib/librte_pmd_enic/vnic/vnic_intr.c >@@ -76,8 +76,3 @@ void vnic_intr_clean(struct vnic_intr *intr) > { > iowrite32(0, &intr->ctrl->int_credits); > } >- >-void vnic_intr_raise(struct vnic_intr *intr) >-{ >- vnic_dev_raise_intr(intr->vdev, (u16)intr->index); >-} >--=20 >2.1.3 Acked-by: Sujith Sankar >