提交 88a1e909 编写于 作者: A Alexander Beregalov 提交者: Greg Kroah-Hartman

Staging: usbip: switch to list_for_each_entry()

Signed-off-by: NAlexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 8cc59061
...@@ -234,8 +234,6 @@ static void tweak_special_requests(struct urb *urb) ...@@ -234,8 +234,6 @@ static void tweak_special_requests(struct urb *urb)
static int stub_recv_cmd_unlink(struct stub_device *sdev, static int stub_recv_cmd_unlink(struct stub_device *sdev,
struct usbip_header *pdu) struct usbip_header *pdu)
{ {
struct list_head *listhead = &sdev->priv_init;
struct list_head *ptr;
unsigned long flags; unsigned long flags;
struct stub_priv *priv; struct stub_priv *priv;
...@@ -243,8 +241,7 @@ static int stub_recv_cmd_unlink(struct stub_device *sdev, ...@@ -243,8 +241,7 @@ static int stub_recv_cmd_unlink(struct stub_device *sdev,
spin_lock_irqsave(&sdev->priv_lock, flags); spin_lock_irqsave(&sdev->priv_lock, flags);
for (ptr = listhead->next; ptr != listhead; ptr = ptr->next) { list_for_each_entry(priv, &sdev->priv_init, list) {
priv = list_entry(ptr, struct stub_priv, list);
if (priv->seqnum == pdu->u.cmd_unlink.seqnum) { if (priv->seqnum == pdu->u.cmd_unlink.seqnum) {
int ret; int ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册