Skip to content

Commit

Permalink
usb-gadget: fix warning in ethernet
Browse files Browse the repository at this point in the history
Driver was taking max() of a size_t and u32 which causes complaint
about comparison of different types.

Stumbled on this accidently in my config, never used.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Stephen Hemminger authored and Greg Kroah-Hartman committed Mar 3, 2011
1 parent 962f3ff commit 45d1b7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/gadget/u_ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ rx_submit(struct eth_dev *dev, struct usb_request *req, gfp_t gfp_flags)
size -= size % out->maxpacket;

if (dev->port_usb->is_fixed)
size = max(size, dev->port_usb->fixed_out_len);
size = max_t(size_t, size, dev->port_usb->fixed_out_len);

skb = alloc_skb(size + NET_IP_ALIGN, gfp_flags);
if (skb == NULL) {
Expand Down

0 comments on commit 45d1b7a

Please sign in to comment.