mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-20 16:30:53 +00:00
staging: emxx_udc: Use min_t instead of min
Use min_t instead of min function in emxx_udc.c Fix checkpatch.pl warnings: WARNING: min() should probably be min_t(u32, iBufSize, ep->ep.maxpacket) WARNING: min() should probably be min_t(u32, data_size, ep->ep.maxpacket) WARNING: min() should probably be min_t(u16, udc->ctrl.wLength, sizeof(status_data)) Changes in v2: - Fixed min function call as min_t Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
fb71d24bdc
commit
77d966f4b0
@ -971,7 +971,7 @@ static int _nbu2ss_epn_out_data(
|
||||
&& (iBufSize >= sizeof(u32))) {
|
||||
nret = _nbu2ss_out_dma(udc, req, num, iBufSize);
|
||||
} else {
|
||||
iBufSize = min(iBufSize, (u32)ep->ep.maxpacket);
|
||||
iBufSize = min_t(u32, iBufSize, ep->ep.maxpacket);
|
||||
nret = _nbu2ss_epn_out_pio(udc, ep, req, iBufSize);
|
||||
}
|
||||
|
||||
@ -1185,7 +1185,7 @@ static int _nbu2ss_epn_in_data(
|
||||
&& (data_size >= sizeof(u32))) {
|
||||
nret = _nbu2ss_in_dma(udc, ep, req, num, data_size);
|
||||
} else {
|
||||
data_size = min(data_size, (u32)ep->ep.maxpacket);
|
||||
data_size = min_t(u32, data_size, ep->ep.maxpacket);
|
||||
nret = _nbu2ss_epn_in_pio(udc, ep, req, data_size);
|
||||
}
|
||||
|
||||
@ -1603,7 +1603,7 @@ static int std_req_get_status(struct nbu2ss_udc *udc)
|
||||
return result;
|
||||
}
|
||||
|
||||
length = min(udc->ctrl.wLength, (u16)sizeof(status_data));
|
||||
length = min_t(u16, udc->ctrl.wLength, sizeof(status_data));
|
||||
|
||||
switch (recipient) {
|
||||
case USB_RECIP_DEVICE:
|
||||
|
Loading…
Reference in New Issue
Block a user