* [PATCH -next v2] misc: bcm-vk: use list_move_tail instead of list_del/list_add_tail in bcm_vk_msg.c
@ 2021-06-09 7:14 Baokun Li
2021-06-09 15:59 ` Scott Branden
0 siblings, 1 reply; 2+ messages in thread
From: Baokun Li @ 2021-06-09 7:14 UTC (permalink / raw)
To: linux-kernel, Scott Branden, Arnd Bergmann, Greg Kroah-Hartman
Cc: weiyongjun1, yuehaibing, yangjihong1, yukuai3, libaokun1,
bcm-kernel-feedback-list, kernel-janitors, Hulk Robot
Using list_move_tail() instead of list_del() + list_add_tail() in bcm_vk_msg.c.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Baokun Li <libaokun1@huawei.com>
---
V1->V2:
CC mailist
drivers/misc/bcm-vk/bcm_vk_msg.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/misc/bcm-vk/bcm_vk_msg.c b/drivers/misc/bcm-vk/bcm_vk_msg.c
index 6efc52b49af6..066b9ef7fcd7 100644
--- a/drivers/misc/bcm-vk/bcm_vk_msg.c
+++ b/drivers/misc/bcm-vk/bcm_vk_msg.c
@@ -354,8 +354,7 @@ static void bcm_vk_drain_all_pend(struct device *dev,
for (num = 0; num < chan->q_nr; num++) {
list_for_each_entry_safe(entry, tmp, &chan->pendq[num], node) {
if ((!ctx) || (entry->ctx->idx == ctx->idx)) {
- list_del(&entry->node);
- list_add_tail(&entry->node, &del_q);
+ list_move_tail(&entry->node, &del_q);
}
}
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next v2] misc: bcm-vk: use list_move_tail instead of list_del/list_add_tail in bcm_vk_msg.c
2021-06-09 7:14 [PATCH -next v2] misc: bcm-vk: use list_move_tail instead of list_del/list_add_tail in bcm_vk_msg.c Baokun Li
@ 2021-06-09 15:59 ` Scott Branden
0 siblings, 0 replies; 2+ messages in thread
From: Scott Branden @ 2021-06-09 15:59 UTC (permalink / raw)
To: Baokun Li, linux-kernel, Arnd Bergmann, Greg Kroah-Hartman
Cc: weiyongjun1, yuehaibing, yangjihong1, yukuai3,
bcm-kernel-feedback-list, kernel-janitors, Hulk Robot,
desmond.yan
[-- Attachment #1: Type: text/plain, Size: 1002 bytes --]
On 2021-06-09 12:14 a.m., Baokun Li wrote:
> Using list_move_tail() instead of list_del() + list_add_tail() in bcm_vk_msg.c.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Baokun Li <libaokun1@huawei.com>
Acked-by: Scott Branden <scott.branden@broadcom.com>
> ---
> V1->V2:
> CC mailist
>
> drivers/misc/bcm-vk/bcm_vk_msg.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/misc/bcm-vk/bcm_vk_msg.c b/drivers/misc/bcm-vk/bcm_vk_msg.c
> index 6efc52b49af6..066b9ef7fcd7 100644
> --- a/drivers/misc/bcm-vk/bcm_vk_msg.c
> +++ b/drivers/misc/bcm-vk/bcm_vk_msg.c
> @@ -354,8 +354,7 @@ static void bcm_vk_drain_all_pend(struct device *dev,
> for (num = 0; num < chan->q_nr; num++) {
> list_for_each_entry_safe(entry, tmp, &chan->pendq[num], node) {
> if ((!ctx) || (entry->ctx->idx == ctx->idx)) {
> - list_del(&entry->node);
> - list_add_tail(&entry->node, &del_q);
> + list_move_tail(&entry->node, &del_q);
> }
> }
> }
>
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4212 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-09 15:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-09 7:14 [PATCH -next v2] misc: bcm-vk: use list_move_tail instead of list_del/list_add_tail in bcm_vk_msg.c Baokun Li
2021-06-09 15:59 ` Scott Branden
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).