ionic: Change list definition method
Subsystems (3)
PATCH v2 1/1 ionic: Change list definition method
From: Lei Zhu <[email protected]>
The LIST_HEAD macro can both define a linked list and initialize it in one step. To simplify code, we replace the separate operations of linked list definition and manual initialization with the LIST_HEAD macro.
---
Changes in v2:
- Order the variable declaration lines longest to shortest
drivers/net/ethernet/pensando/ionic/ionic_rx_filter.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/net/ethernet/pensando/ionic/ionic_rx_filter.c +2 -5
@@ -558,18 +558,15 @@ struct sync_item {void ionic_rx_filter_sync (struct ionic_lif *lif) {struct device *dev = lif->ionic->dev; -struct list_head sync_add_list; -struct list_head sync_del_list;struct sync_item *sync_item;struct ionic_rx_filter *f; +LIST_HEAD (sync_add_list); +LIST_HEAD (sync_del_list);struct hlist_head *head;struct hlist_node *tmp;struct sync_item *spos;unsigned int i; -INIT_LIST_HEAD (&sync_add_list); -INIT_LIST_HEAD (&sync_del_list); -clear_bit (IONIC_LIF_F_FILTER_SYNC_NEEDED , lif->state);/* Copy the filters to be added and deleted
Signature · 1 line
2.25.1
Quoted 32 lines · Lei Zhu
[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
From: Lei Zhu <[email protected]>
The
LIST_HEADmacro can both define a linked list and initialize it in one step. To simplify code, we replace the separate operations of linked list definition and manual initialization with theLIST_HEADmacro.Signed-off-by Lei Zhu <[email protected]>---
Changes in v2:
- Order the variable declaration lines longest to shortestdrivers/net/ethernet/pensando/ionic/ionic_rx_filter.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)drivers/net/ethernet/pensando/ionic/ionic_rx_filter.c +0
-2@@ -558,18 +558,15 @@ struct sync_item {void ionic_rx_filter_sync (struct ionic_lif *lif) {struct device *dev = lif->ionic->dev; -struct list_head sync_add_list; -struct list_head sync_del_list;struct sync_item *sync_item;struct ionic_rx_filter *f;
drivers/net/ethernet/pensando/ionic/ionic_rx_filter.c struct sync_item { · line 572
Quoted 10 lines
drivers/net/ethernet/pensando/ionic/ionic_rx_filter.c +2
-3+LIST_HEAD (sync_add_list); +LIST_HEAD (sync_del_list);struct hlist_head *head;struct hlist_node *tmp;struct sync_item *spos;unsigned int i; -INIT_LIST_HEAD (&sync_add_list); -INIT_LIST_HEAD (&sync_del_list); -
LGTM. Thanks for the patch.
Quoted 6 lines
drivers/net/ethernet/pensando/ionic/ionic_rx_filter.c +0
-1clear_bit (IONIC_LIF_F_FILTER_SYNC_NEEDED , lif->state);/* Copy the filters to be added and deleted -- 2.25.1
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:
Quoted 8 lines · On Tue, 30 Jun 2026 14:54:57 +0800 you wrote:
From: Lei Zhu <[email protected]>
The
LIST_HEADmacro can both define a linked list and initialize it in one step. To simplify code, we replace the separate operations of linked list definition and manual initialization with theLIST_HEADmacro.[...]
Here is the summary with links:
- [net-next,v2] ionic: Change list definition method
https://git.kernel.org/netdev/net-next/c/09cfee6a8004
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html