summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/pensando
diff options
context:
space:
mode:
authorLei Zhu <zhulei@kylinos.cn>2026-06-30 14:54:57 +0800
committerPaolo Abeni <pabeni@redhat.com>2026-07-02 11:13:05 +0200
commit09cfee6a80047850581ad373cffac6034fedf0be (patch)
tree0f226da1bc2f6af72e80733f482995c47bccb9d5 /drivers/net/ethernet/pensando
parent8c9c5b9a689612dcb92a04a4218c975cd19f19d8 (diff)
downloadlinux-next-09cfee6a80047850581ad373cffac6034fedf0be.tar.gz
linux-next-09cfee6a80047850581ad373cffac6034fedf0be.zip
ionic: Change list definition method
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. Signed-off-by: Lei Zhu <zhulei@kylinos.cn> Reviewed-by: Brett Creeley <brett.creeley@amd.com> Link: https://patch.msgid.link/20260630065457.160081-1-zhulei_szu@163.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net/ethernet/pensando')
-rw-r--r--drivers/net/ethernet/pensando/ionic/ionic_rx_filter.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_rx_filter.c b/drivers/net/ethernet/pensando/ionic/ionic_rx_filter.c
index 528114877677..c999754afb5f 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_rx_filter.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_rx_filter.c
@@ -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