Message ID | 1435733589-27295-1-git-send-email-alistair@popple.id.au |
---|---|
State | Accepted |
Headers | show |
On 07/01/2015 12:23 PM, Alistair Popple wrote: > We will soon expose the dequeue message function which deletes > previously queued messages from the message queue. It could help catch > a few bugs by doing some extra checks. > > Signed-off-by: Alistair Popple <alistair@popple.id.au> Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> > --- > hw/bt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/bt.c b/hw/bt.c > index 0c89d9f..e81498f 100644 > --- a/hw/bt.c > +++ b/hw/bt.c > @@ -490,7 +490,7 @@ static int bt_del_ipmi_msg(struct ipmi_msg *ipmi_msg) > struct bt_msg *bt_msg = container_of(ipmi_msg, struct bt_msg, ipmi_msg); > > lock(&bt.lock); > - list_del(&bt_msg->link); > + list_del_from(&bt.msgq, &bt_msg->link); > bt.queue_len--; > bt_send_and_unlock(); > return 0;
diff --git a/hw/bt.c b/hw/bt.c index 0c89d9f..e81498f 100644 --- a/hw/bt.c +++ b/hw/bt.c @@ -490,7 +490,7 @@ static int bt_del_ipmi_msg(struct ipmi_msg *ipmi_msg) struct bt_msg *bt_msg = container_of(ipmi_msg, struct bt_msg, ipmi_msg); lock(&bt.lock); - list_del(&bt_msg->link); + list_del_from(&bt.msgq, &bt_msg->link); bt.queue_len--; bt_send_and_unlock(); return 0;
We will soon expose the dequeue message function which deletes previously queued messages from the message queue. It could help catch a few bugs by doing some extra checks. Signed-off-by: Alistair Popple <alistair@popple.id.au> --- hw/bt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)