Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Staging: usbip: switch to list_for_each_entry()

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Alexander Beregalov and committed by
Greg Kroah-Hartman
88a1e909 8cc59061

+1 -4
+1 -4
drivers/staging/usbip/stub_rx.c
··· 234 234 static int stub_recv_cmd_unlink(struct stub_device *sdev, 235 235 struct usbip_header *pdu) 236 236 { 237 - struct list_head *listhead = &sdev->priv_init; 238 - struct list_head *ptr; 239 237 unsigned long flags; 240 238 241 239 struct stub_priv *priv; ··· 241 243 242 244 spin_lock_irqsave(&sdev->priv_lock, flags); 243 245 244 - for (ptr = listhead->next; ptr != listhead; ptr = ptr->next) { 245 - priv = list_entry(ptr, struct stub_priv, list); 246 + list_for_each_entry(priv, &sdev->priv_init, list) { 246 247 if (priv->seqnum == pdu->u.cmd_unlink.seqnum) { 247 248 int ret; 248 249