lib: sbi: Remove unnecessary SBI_INIT_LIST_HEAD

No need to initialise the nodes to be added to the linked list

Signed-off-by: Xiang W <wxjstz@126.com>
Reviewed-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20250319123944.505756-1-wxjstz@126.com
Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Xiang W
2025-03-19 20:39:38 +08:00
committed by Anup Patel
parent 169b4b8ae2
commit 190979b4fc
5 changed files with 0 additions and 6 deletions

View File

@@ -415,7 +415,6 @@ int fdt_register_general_fixup(struct fdt_general_fixup *fixup)
return SBI_EALREADY;
}
SBI_INIT_LIST_HEAD(&fixup->head);
sbi_list_add_tail(&fixup->head, &fixup_list);
return 0;

View File

@@ -34,7 +34,6 @@ int mbox_controller_add(struct mbox_controller *mbox)
if (mbox_controller_find(mbox->id))
return SBI_EALREADY;
SBI_INIT_LIST_HEAD(&mbox->node);
ATOMIC_INIT(&mbox->xfer_next_seq, 0);
SBI_INIT_LIST_HEAD(&mbox->chan_list);
sbi_list_add(&mbox->node, &mbox_list);
@@ -80,7 +79,6 @@ struct mbox_chan *mbox_controller_request_chan(struct mbox_controller *mbox,
if (!ret)
return NULL;
SBI_INIT_LIST_HEAD(&ret->node);
ret->mbox = mbox;
sbi_memcpy(ret->chan_args, chan_args, sizeof(ret->chan_args));
sbi_list_add(&ret->node, &mbox->chan_list);