PVS V529: ; after while

Just rewrite the loop in a more readable way.

Change-Id: I174016eac74eb54a01e5226b5f8a92fb1b335830
Reviewed-on: https://review.haiku-os.org/c/1665
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Adrien Destugues
2019-07-31 02:13:01 +00:00
committed by waddlesplash
parent e66c5b32a8
commit 679c751309
@@ -235,8 +235,9 @@ static bool do_VIPFifoWrite(device_info *di, uint8 channel, uint32 address, uint
Radeon_WaitForFifo( di, 2 ); Radeon_WaitForFifo( di, 2 );
OUTREG( regs, RADEON_VIPH_REG_ADDR, ((channel << 14) | address | 0x1000) & ~0x2000 ); OUTREG( regs, RADEON_VIPH_REG_ADDR, ((channel << 14) | address | 0x1000) & ~0x2000 );
SHOW_FLOW0( 2, "1"); SHOW_FLOW0( 2, "1");
while(B_BUSY == (status = RADEON_VIPFifoIdle( di, 0x0f))); do {
status = RADEON_VIPFifoIdle(di, 0x0f);
} while (status == B_BUSY);
if(B_OK != status){ if(B_OK != status){
SHOW_FLOW( 2 ,"cannot write %x to VIPH_REG_ADDR\n", (unsigned int)address); SHOW_FLOW( 2 ,"cannot write %x to VIPH_REG_ADDR\n", (unsigned int)address);
@@ -249,7 +250,11 @@ static bool do_VIPFifoWrite(device_info *di, uint8 channel, uint32 address, uint
Radeon_WaitForFifo( di, 2); Radeon_WaitForFifo( di, 2);
SHOW_FLOW( 2, "count %ld", count); SHOW_FLOW( 2, "count %ld", count);
OUTREG( regs, RADEON_VIPH_REG_DATA, *(uint32*)(buffer + i)); OUTREG( regs, RADEON_VIPH_REG_DATA, *(uint32*)(buffer + i));
while(B_BUSY == (status = RADEON_VIPFifoIdle( di, 0x0f)));
do {
status = RADEON_VIPFifoIdle(di, 0x0f);
} while (status == B_BUSY);
if(B_OK != status) if(B_OK != status)
{ {
SHOW_FLOW0( 2 , "cannot write to VIPH_REG_DATA\n"); SHOW_FLOW0( 2 , "cannot write to VIPH_REG_DATA\n");