lkml.org 
[lkml]   [2022]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4] net: ethernet: mtk_eth_soc: fix misuse of mem alloc interface netdev[napi]_alloc_frag
On Tue,  7 Jun 2022 07:39:11 +0800 Chen Lin wrote:
> +static inline void *mtk_max_lro_buf_alloc(gfp_t gfp_mask)

No need for inline, compiler will inline this anyway.

> +{
> + void *data;

unsigned long data; then you can move the cast from the long line to
the return statement, saving us from the strange indentation.

> + data = (void *)__get_free_pages(gfp_mask |
> + __GFP_COMP | __GFP_NOWARN,
> + get_order(mtk_max_frag_size(MTK_MAX_LRO_RX_LENGTH)));
> +
> + return data;
> +}

\
 
 \ /
  Last update: 2022-06-08 04:55    [W:0.305 / U:0.756 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site