<div dir="ltr"><div><div>I compiled the code and nothing was broken.<br></div>There is no difference between compiling with and without first argument.<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 29 September 2014 22:12, Daniel Baluta <span dir="ltr"><<a href="mailto:daniel.baluta@gmail.com" target="_blank">daniel.baluta@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, Sep 29, 2014 at 10:11 PM, Georgiana Chelu<br>
<<a href="mailto:georgiana.chelu93@gmail.com">georgiana.chelu93@gmail.com</a>> wrote:<br>
> This fixes the following <a href="http://checkpatch.pl" target="_blank">checkpatch.pl</a> warnings:<br>
> WARNING: min() should probably be min_t(u32, iBufSize, ep->ep.maxpacket)<br>
> WARNING: min() should probably be min_t(u32, data_size, ep->ep.maxpacket)<br>
> WARNING: min() should probably be min_t(u16, udc->ctrl.wLength, sizeof(status_data))<br>
<br>
</span>Please try to compile your code. As you can see min_t expects 3<br>
parameters, but in your<br>
code it only gets 2.<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
> Signed-off-by: Georgiana Chelu <<a href="mailto:georgiana.chelu93@gmail.com">georgiana.chelu93@gmail.com</a>><br>
> ---<br>
>  drivers/staging/emxx_udc/emxx_udc.c | 6 +++---<br>
>  1 file changed, 3 insertions(+), 3 deletions(-)<br>
><br>
> diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c<br>
> index 57a9bf2..edb4112 100644<br>
> --- a/drivers/staging/emxx_udc/emxx_udc.c<br>
> +++ b/drivers/staging/emxx_udc/emxx_udc.c<br>
> @@ -971,7 +971,7 @@ static int _nbu2ss_epn_out_data(<br>
>                 && (iBufSize  >= sizeof(u32))) {<br>
>                 nret = _nbu2ss_out_dma(udc, req, num, iBufSize);<br>
>         } else {<br>
> -               iBufSize = min(iBufSize, (u32)ep->ep.maxpacket);<br>
> +               iBufSize = min_t(iBufSize, (u32)ep->ep.maxpacket);<br>
>                 nret = _nbu2ss_epn_out_pio(udc, ep, req, iBufSize);<br>
>         }<br>
><br>
> @@ -1185,7 +1185,7 @@ static int _nbu2ss_epn_in_data(<br>
>                 && (data_size >= sizeof(u32))) {<br>
>                 nret = _nbu2ss_in_dma(udc, ep, req, num, data_size);<br>
>         } else {<br>
> -               data_size = min(data_size, (u32)ep->ep.maxpacket);<br>
> +               data_size = min_t(data_size, (u32)ep->ep.maxpacket);<br>
>                 nret = _nbu2ss_epn_in_pio(udc, ep, req, data_size);<br>
>         }<br>
><br>
> @@ -1604,7 +1604,7 @@ static int std_req_get_status(struct nbu2ss_udc *udc)<br>
>                 return result;<br>
>         }<br>
><br>
> -       length = min(udc->ctrl.wLength, (u16)sizeof(status_data));<br>
> +       length = min_t(udc->ctrl.wLength, (u16)sizeof(status_data));<br>
><br>
>         switch (recipient) {<br>
>         case USB_RECIP_DEVICE:<br>
> --<br>
> 1.9.1<br>
><br>
><br>
<br>
</div></div></blockquote></div><br></div>