On Wed, Jun 14, 2023 at 04:05:08AM +0200, Ben Hutchings wrote: > On Mon, 2023-06-12 at 12:26 +0200, Greg Kroah-Hartman wrote: > > Not upstream as it was fixed in a much larger api change in newer > > kernels. > > > > gcc-13 rightfully complains that enum is not the same as an int, so fix > > up the function prototypes in i40e_alloc.h to be correct, solving a > > bunch of build warnings. > > > > Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> > > --- > > drivers/net/ethernet/intel/i40e/i40e_alloc.h | 17 ++++++----------- > > 1 file changed, 6 insertions(+), 11 deletions(-) > > > > --- a/drivers/net/ethernet/intel/i40e/i40e_alloc.h > > +++ b/drivers/net/ethernet/intel/i40e/i40e_alloc.h > > @@ -20,16 +20,11 @@ enum i40e_memory_type { > > }; > > > > /* prototype for functions used for dynamic memory allocation */ > > -i40e_status i40e_allocate_dma_mem(struct i40e_hw *hw, > > - struct i40e_dma_mem *mem, > > - enum i40e_memory_type type, > > - u64 size, u32 alignment); > > -i40e_status i40e_free_dma_mem(struct i40e_hw *hw, > > - struct i40e_dma_mem *mem); > > -i40e_status i40e_allocate_virt_mem(struct i40e_hw *hw, > > - struct i40e_virt_mem *mem, > > - u32 size); > > -i40e_status i40e_free_virt_mem(struct i40e_hw *hw, > > - struct i40e_virt_mem *mem); > > +int i40e_allocate_dma_mem(struct i40e_hw *hw, struct i40e_dma_mem *mem, > > + enum i40e_memory_type type, u64 size, u32 alignment); > > +int i40e_free_dma_mem(struct i40e_hw *hw, struct i40e_dma_mem *mem); > > +int i40e_allocate_virt_mem(struct i40e_hw *hw, struct i40e_virt_mem *mem, > > + u32 size); > > +int i40e_free_virt_mem(struct i40e_hw *hw, struct i40e_virt_mem *mem); > > All these function names are actually macro names, which seems a very > strange way to declare functions. > > Shouldn't the declarations use the actual function names, which have > "_d" suffixes? Probably, yes, I was just trying to do the least-ammount-of-work-needed to fix up a bunch of obvious errors that were causing build warnings on newer versions of gcc :) All of this is fixed differently in Linus's tree, but those changes were way too messy to backport. thanks, greg k-h