Skip to content

Commit

Permalink
Fix i40e compilation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
cardigliano committed May 30, 2024
1 parent 64e0f67 commit 389cfd8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
8 changes: 4 additions & 4 deletions drivers/intel/i40e/i40e-2.24.6-zc/src/i40e_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 i40e_allocate_dma_mem_d(struct i40e_hw *hw,
inline i40e_status i40e_allocate_dma_mem_d(struct i40e_hw *hw,
struct i40e_dma_mem *mem,
__always_unused enum i40e_memory_type mtype,
u64 size, u32 alignment)
Expand All @@ -40,7 +40,7 @@ inline int i40e_allocate_dma_mem_d(struct i40e_hw *hw,
* @hw: pointer to the HW structure
* @mem: ptr to mem struct to free
**/
inline int i40e_free_dma_mem_d(struct i40e_hw *hw, struct i40e_dma_mem *mem)
inline i40e_status i40e_free_dma_mem_d(struct i40e_hw *hw, struct i40e_dma_mem *mem)
{
struct i40e_pf *nf = (struct i40e_pf *)hw->back;

Expand All @@ -58,7 +58,7 @@ inline int i40e_free_dma_mem_d(struct i40e_hw *hw, struct i40e_dma_mem *mem)
* @mem: ptr to mem struct to fill out
* @size: size of memory requested
**/
inline int i40e_allocate_virt_mem_d(struct i40e_hw *hw,
inline i40e_status i40e_allocate_virt_mem_d(struct i40e_hw *hw,
struct i40e_virt_mem *mem,
u32 size)
{
Expand All @@ -76,7 +76,7 @@ inline int i40e_allocate_virt_mem_d(struct i40e_hw *hw,
* @hw: pointer to the HW structure
* @mem: ptr to mem struct to free
**/
inline int i40e_free_virt_mem_d(struct i40e_hw *hw, struct i40e_virt_mem *mem)
inline i40e_status i40e_free_virt_mem_d(struct i40e_hw *hw, struct i40e_virt_mem *mem)
{
/* it's ok to kfree a NULL pointer */
kfree(mem->va);
Expand Down
12 changes: 8 additions & 4 deletions drivers/intel/i40e/i40e-2.24.6-zc/src/i40e_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4790,6 +4790,12 @@ int i40e_add_del_cloud_filter(struct i40e_vsi *vsi,

#ifdef HAVE_PF_RING

int ring_is_not_empty(struct i40e_ring *rx_ring);
void i40e_update_enable_itr(struct i40e_vsi *vsi, struct i40e_q_vector *q_vector);
int wait_packet_function_ptr(void *data, int mode);
int wake_up_pfring_zc_socket(struct i40e_ring *rx_ring);
int notify_function_ptr(void *rx_data, void *tx_data, u_int8_t device_in_use);

#if 0
/**
* i40e_irq_dynamic_disable - Disable default interrupt generation settings
Expand Down Expand Up @@ -4846,8 +4852,6 @@ int ring_is_not_empty(struct i40e_ring *rx_ring) {
return 0;
}

void i40e_update_enable_itr(struct i40e_vsi *vsi, struct i40e_q_vector *q_vector);

int wait_packet_function_ptr(void *data, int mode)
{
struct i40e_ring *rx_ring = (struct i40e_ring*) data;
Expand Down Expand Up @@ -8212,7 +8216,7 @@ static int i40e_up_complete(struct i40e_vsi *vsi)
rx_ring->netdev,
rx_ring->dev, /* for DMA mapping */
intel_i40e,
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 @@ -8446,7 +8450,7 @@ void i40e_down(struct i40e_vsi *vsi)
rx_ring->netdev,
rx_ring->dev, /* for DMA mapping */
intel_i40e,
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

0 comments on commit 389cfd8

Please sign in to comment.