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

usb: core: Remove unused usb_unlink_anchored_urbs

usb_unlink_anchored_urbs() has been unused since it's last use was
removed in 2009 by
commit 9b9c5aaeedfd ("ar9170: xmit code revamp")

Remove it.

Signed-off-by: "Dr. David Alan Gilbert" <linux@treblig.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/r/20250608235617.200731-1-linux@treblig.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Dr. David Alan Gilbert and committed by
Greg Kroah-Hartman
47c83f95 227280ad

+3 -38
-11
Documentation/driver-api/usb/anchors.rst
··· 45 45 are called in the reverse temporal order they were submitted. 46 46 This way no data can be reordered. 47 47 48 - :c:func:`usb_unlink_anchored_urbs` 49 - ---------------------------------- 50 - 51 - 52 - This function unlinks all URBs associated with an anchor. The URBs 53 - are processed in the reverse temporal order they were submitted. 54 - This is similar to :c:func:`usb_kill_anchored_urbs`, but it will not sleep. 55 - Therefore no guarantee is made that the URBs have been unlinked when 56 - the call returns. They may be unlinked later but will be unlinked in 57 - finite time. 58 - 59 48 :c:func:`usb_scuttle_anchored_urbs` 60 49 ----------------------------------- 61 50
+3 -26
drivers/usb/core/urb.c
··· 597 597 * code). 598 598 * 599 599 * Drivers should not call this routine or related routines, such as 600 - * usb_kill_urb() or usb_unlink_anchored_urbs(), after their disconnect 601 - * method has returned. The disconnect function should synchronize with 602 - * a driver's I/O routines to insure that all URB-related activity has 603 - * completed before it returns. 600 + * usb_kill_urb(), after their disconnect method has returned. The 601 + * disconnect function should synchronize with a driver's I/O routines 602 + * to insure that all URB-related activity has completed before it returns. 604 603 * 605 604 * This request is asynchronous, however the HCD might call the ->complete() 606 605 * callback during unlink. Therefore when drivers call usb_unlink_urb(), they ··· 889 890 spin_unlock_irqrestore(&anchor->lock, flags); 890 891 } 891 892 EXPORT_SYMBOL_GPL(usb_unpoison_anchored_urbs); 892 - /** 893 - * usb_unlink_anchored_urbs - asynchronously cancel transfer requests en masse 894 - * @anchor: anchor the requests are bound to 895 - * 896 - * this allows all outstanding URBs to be unlinked starting 897 - * from the back of the queue. This function is asynchronous. 898 - * The unlinking is just triggered. It may happen after this 899 - * function has returned. 900 - * 901 - * This routine should not be called by a driver after its disconnect 902 - * method has returned. 903 - */ 904 - void usb_unlink_anchored_urbs(struct usb_anchor *anchor) 905 - { 906 - struct urb *victim; 907 - 908 - while ((victim = usb_get_from_anchor(anchor)) != NULL) { 909 - usb_unlink_urb(victim); 910 - usb_put_urb(victim); 911 - } 912 - } 913 - EXPORT_SYMBOL_GPL(usb_unlink_anchored_urbs); 914 893 915 894 /** 916 895 * usb_anchor_suspend_wakeups
-1
include/linux/usb.h
··· 1780 1780 extern void usb_kill_anchored_urbs(struct usb_anchor *anchor); 1781 1781 extern void usb_poison_anchored_urbs(struct usb_anchor *anchor); 1782 1782 extern void usb_unpoison_anchored_urbs(struct usb_anchor *anchor); 1783 - extern void usb_unlink_anchored_urbs(struct usb_anchor *anchor); 1784 1783 extern void usb_anchor_suspend_wakeups(struct usb_anchor *anchor); 1785 1784 extern void usb_anchor_resume_wakeups(struct usb_anchor *anchor); 1786 1785 extern void usb_anchor_urb(struct urb *urb, struct usb_anchor *anchor);