Skip to content

Commit 61ef170

Browse files
vincent-mailholgregkh
authored andcommitted
usb: isp1760: remove redundant max_packet() macro
The function usb_endpoint_maxp() (called by usb_maxpacket()) already does the sanitazation of the USB endpoint max packet size. The call to max_packet() does the same thing and is thus removed. The macro max_packet() not being used anymore also gets removed. Reviewed-by: Rui Miguel Silva <rui.silva@linaro.org> Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Link: https://lore.kernel.org/r/20220306075524.706660-3-mailhol.vincent@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 7f1697b commit 61ef170

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

drivers/usb/isp1760/isp1760-hcd.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1768,7 +1768,6 @@ static void qtd_list_free(struct list_head *qtd_list)
17681768
* Packetize urb->transfer_buffer into list of packets of size wMaxPacketSize.
17691769
* Also calculate the PID type (SETUP/IN/OUT) for each packet.
17701770
*/
1771-
#define max_packet(wMaxPacketSize) ((wMaxPacketSize) & 0x07ff)
17721771
static void packetize_urb(struct usb_hcd *hcd,
17731772
struct urb *urb, struct list_head *head, gfp_t flags)
17741773
{
@@ -1809,8 +1808,8 @@ static void packetize_urb(struct usb_hcd *hcd,
18091808
packet_type = IN_PID;
18101809
}
18111810

1812-
maxpacketsize = max_packet(usb_maxpacket(urb->dev, urb->pipe,
1813-
usb_pipeout(urb->pipe)));
1811+
maxpacketsize = usb_maxpacket(urb->dev, urb->pipe,
1812+
usb_pipeout(urb->pipe));
18141813

18151814
/*
18161815
* buffer gets wrapped in one or more qtds;

0 commit comments

Comments
 (0)