File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -318,7 +318,8 @@ static int atc_get_bytes_left(struct dma_chan *chan, dma_cookie_t cookie)
318
318
struct at_desc * desc_first = atc_first_active (atchan );
319
319
struct at_desc * desc ;
320
320
int ret ;
321
- u32 ctrla , dscr , trials ;
321
+ u32 ctrla , dscr ;
322
+ unsigned int i ;
322
323
323
324
/*
324
325
* If the cookie doesn't match to the currently running transfer then
@@ -388,7 +389,7 @@ static int atc_get_bytes_left(struct dma_chan *chan, dma_cookie_t cookie)
388
389
dscr = channel_readl (atchan , DSCR );
389
390
rmb (); /* ensure DSCR is read before CTRLA */
390
391
ctrla = channel_readl (atchan , CTRLA );
391
- for (trials = 0 ; trials < ATC_MAX_DSCR_TRIALS ; ++ trials ) {
392
+ for (i = 0 ; i < ATC_MAX_DSCR_TRIALS ; ++ i ) {
392
393
u32 new_dscr ;
393
394
394
395
rmb (); /* ensure DSCR is read after CTRLA */
@@ -414,7 +415,7 @@ static int atc_get_bytes_left(struct dma_chan *chan, dma_cookie_t cookie)
414
415
rmb (); /* ensure DSCR is read before CTRLA */
415
416
ctrla = channel_readl (atchan , CTRLA );
416
417
}
417
- if (unlikely (trials > = ATC_MAX_DSCR_TRIALS ))
418
+ if (unlikely (i = = ATC_MAX_DSCR_TRIALS ))
418
419
return - ETIMEDOUT ;
419
420
420
421
/* for the first descriptor we can be more accurate */
You can’t perform that action at this time.
0 commit comments