From d7e18a9f2c506467ec7a9c066da45a0f60c6f5a6 Mon Sep 17 00:00:00 2001 From: Michal Nazarewicz Date: Wed, 3 Feb 2010 11:37:17 +0100 Subject: 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: Stephen Rothwell Signed-off-by: Michal Nazarewicz Cc: Marek Szyprowski Cc: Kyungmin Park Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/f_mass_storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/usb') diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c index 3c835503ffb..0553d9a5536 100644 --- a/drivers/usb/gadget/f_mass_storage.c +++ b/drivers/usb/gadget/f_mass_storage.c @@ -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); -- cgit v1.2.3