From: Cliff Cai <cliff.cai@xxxxxxxxxx> Current musb gadget dma code produces the warning: drivers/usb/musb/musb_gadget.c: In function 'txstate': drivers/usb/musb/musb_gadget.c:312: warning: comparison of distinct pointer types lacks a cast So switch to min_t(size_t, ...). Signed-off-by: Cliff Cai <cliff.cai@xxxxxxxxxx> Signed-off-by: Mike Frysinger <vapier@xxxxxxxxxx> Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxx> --- drivers/usb/musb/musb_gadget.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 4dea146..0c36925 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -309,7 +309,7 @@ static void txstate(struct musb *musb, struct musb_request *req) size_t request_size; /* setup DMA, then program endpoint CSR */ - request_size = min(request->length, + request_size = min_t(size_t, request->length, musb_ep->dma->max_len); if (request_size < musb_ep->packet_sz) musb_ep->dma->desired_mode = 0; -- 1.6.6.rc0 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html