Skip to content

Commit 73295fe

Browse files
Wei Yongjungregkh
authored andcommitted
staging: gdm72xx: use list_move instead of list_del/list_add
Using list_move() instead of list_del() + list_add(). spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 84bda90 commit 73295fe

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎drivers/staging/gdm72xx/gdm_usb.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,7 @@ static struct usb_rx *get_rx_struct(struct rx_cxt *rx)
186186
/* Before this function is called, spin lock should be locked. */
187187
static void put_rx_struct(struct rx_cxt *rx, struct usb_rx *r)
188188
{
189-
list_del(&r->list);
190-
list_add(&r->list, &rx->free_list);
189+
list_move(&r->list, &rx->free_list);
191190
}
192191

193192
static int init_usb(struct usbwm_dev *udev)

0 commit comments

Comments
 (0)