From: Roberta Dobrescu Date: Tue, 23 Sep 2014 08:36:37 +0000 (+0300) Subject: staging: emxx_udc: Do not use comparisons on bool tests X-Git-Tag: v3.18-rc1~130^2~232 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5cbca957067a58dd1e381693b4a8a01f5aea6485;p=karo-tx-linux.git staging: emxx_udc: Do not use comparisons on bool tests This fixes the following coccinelle warning: WARNING: Comparison of bool to 0/1 Signed-off-by: Roberta Dobrescu Acked-by: Daniel Baluta Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c index 341b65216b3c..16265d4efedc 100644 --- a/drivers/staging/emxx_udc/emxx_udc.c +++ b/drivers/staging/emxx_udc/emxx_udc.c @@ -2009,8 +2009,7 @@ static inline void _nbu2ss_epn_in_int( result = _nbu2ss_epn_in_transfer(udc, ep, req); } else { - if ((req->zero != 0) - && ((req->req.actual % ep->ep.maxpacket) == 0)) { + if (req->zero && ((req->req.actual % ep->ep.maxpacket) == 0)) { status = _nbu2ss_readl(&preg->EP_REGS[ep->epnum-1].EP_STATUS); @@ -2097,8 +2096,7 @@ static inline void _nbu2ss_epn_out_dma_int( num = ep->epnum - 1; if (req->req.actual == req->req.length) { - if ((req->req.length % ep->ep.maxpacket) - && (req->zero == 0)) { + if ((req->req.length % ep->ep.maxpacket) && !req->zero) { req->div_len = 0; req->dma_flag = FALSE; _nbu2ss_ep_done(ep, req, 0);