Skip to content

Commit

Permalink
Fix iavf compilation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
cardigliano committed May 30, 2024
1 parent 389cfd8 commit ee752d0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
8 changes: 4 additions & 4 deletions drivers/intel/iavf/iavf-4.9.5-zc/src/iavf_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* @size: size of memory requested
* @alignment: what to align the allocation to
**/
inline int iavf_allocate_dma_mem_d(struct iavf_hw *hw,
inline enum iavf_status iavf_allocate_dma_mem_d(struct iavf_hw *hw,
struct iavf_dma_mem *mem,
__always_unused enum iavf_memory_type mtype,
u64 size, u32 alignment)
Expand All @@ -40,7 +40,7 @@ inline int iavf_allocate_dma_mem_d(struct iavf_hw *hw,
* @hw: pointer to the HW structure
* @mem: ptr to mem struct to free
**/
inline int iavf_free_dma_mem_d(struct iavf_hw *hw, struct iavf_dma_mem *mem)
inline enum iavf_status iavf_free_dma_mem_d(struct iavf_hw *hw, struct iavf_dma_mem *mem)
{
struct iavf_adapter *nf = (struct iavf_adapter *)hw->back;

Expand All @@ -58,7 +58,7 @@ inline int iavf_free_dma_mem_d(struct iavf_hw *hw, struct iavf_dma_mem *mem)
* @mem: ptr to mem struct to fill out
* @size: size of memory requested
**/
inline int iavf_allocate_virt_mem_d(struct iavf_hw *hw,
inline enum iavf_status iavf_allocate_virt_mem_d(struct iavf_hw *hw,
struct iavf_virt_mem *mem,
u32 size)
{
Expand All @@ -76,7 +76,7 @@ inline int iavf_allocate_virt_mem_d(struct iavf_hw *hw,
* @hw: pointer to the HW structure
* @mem: ptr to mem struct to free
**/
inline int iavf_free_virt_mem_d(struct iavf_hw *hw, struct iavf_virt_mem *mem)
inline enum iavf_status iavf_free_virt_mem_d(struct iavf_hw *hw, struct iavf_virt_mem *mem)
{
/* it's ok to kfree a NULL pointer */
kfree(mem->va);
Expand Down
12 changes: 9 additions & 3 deletions drivers/intel/iavf/iavf-4.9.5-zc/src/iavf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1351,6 +1351,12 @@ static void iavf_napi_disable_all(struct iavf_adapter *adapter)

#ifdef HAVE_PF_RING

int ring_is_not_empty(struct iavf_ring *rx_ring);
int wait_packet_function_ptr(void *data, int mode);
int wake_up_pfring_zc_socket(struct iavf_ring *rx_ring);
int notify_function_ptr(void *rx_data, void *tx_data, u_int8_t device_in_use);
int get_stats_function_ptr(void *rx_adapter, u_int64_t *rx_missed);

int ring_is_not_empty(struct iavf_ring *rx_ring) {
union iavf_rx_desc *rx_desc;
u64 qword;
Expand Down Expand Up @@ -1649,7 +1655,7 @@ static void iavf_up_complete(struct iavf_adapter *adapter)
rx_ring->netdev,
rx_ring->dev, /* for DMA mapping */
intel_i40e_vf,
rx_ring->netdev->dev_addr,
(unsigned char *)rx_ring->netdev->dev_addr,
&rx_ring->pfring_zc.rx_tx.rx.packet_waitqueue,
&rx_ring->pfring_zc.rx_tx.rx.interrupt_received,
(void *) rx_ring,
Expand Down Expand Up @@ -1757,7 +1763,7 @@ void iavf_down(struct iavf_adapter *adapter)
rx_ring->netdev,
rx_ring->dev, /* for DMA mapping */
intel_i40e_vf,
rx_ring->netdev->dev_addr,
(unsigned char *)rx_ring->netdev->dev_addr,
&rx_ring->pfring_zc.rx_tx.rx.packet_waitqueue,
&rx_ring->pfring_zc.rx_tx.rx.interrupt_received,
(void*)rx_ring,
Expand Down Expand Up @@ -4506,7 +4512,7 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter,
BIT(FLOW_DISSECTOR_KEY_ENC_KEYID) |
#endif /* HAVE_TC_FLOWER_ENC */
BIT(FLOW_DISSECTOR_KEY_PORTS))) {
dev_err(&adapter->pdev->dev, "Unsupported key used: 0x%x\n",
dev_err(&adapter->pdev->dev, "Unsupported key used: 0x%llx\n",
dissector->used_keys);
return -EOPNOTSUPP;
}
Expand Down

0 comments on commit ee752d0

Please sign in to comment.