提交 d7e18a9f 编写于 作者: M Michal Nazarewicz 提交者: Greg Kroah-Hartman

USB: g_mass_storage: min(...) warning fixed

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: NStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: NMichal Nazarewicz <m.nazarewicz@samsung.com>
Cc: Marek Szyprowski <m.nazarewicz@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 08e6c972
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册