Skip to content

Commit

Permalink
USB: g_mass_storage: min(...) warning fixed
Browse files Browse the repository at this point in the history
This patch fixes warning caused by calling min() macro
with arguments of different types:

  drivers/usb/gadget/f_mass_storage.c:623: warning: \
  comparison of distinct pointer types lacks a cast

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com>
Cc: Marek Szyprowski <m.nazarewicz@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Michal Nazarewicz authored and Greg Kroah-Hartman committed Mar 2, 2010
1 parent 08e6c97 commit d7e18a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/gadget/f_mass_storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ static int fsg_setup(struct usb_function *f,
*(u8 *) req->buf = fsg->common->nluns - 1;

/* Respond with data/status */
req->length = min(1, w_length);
req->length = min((u16)1, w_length);
fsg->common->ep0req_name =
ctrl->bRequestType & USB_DIR_IN ? "ep0-in" : "ep0-out";
return ep0_queue(fsg->common);
Expand Down

0 comments on commit d7e18a9

Please sign in to comment.