if (Conv_D_MediaAddr(us, start))
return ErrCode;
- while(1) {
+ while (1) {
len = Ssfdc.MaxSectors - Media.Sector;
if (count > len)
bn = len;
if (Conv_D_MediaAddr(us, start))
return ErrCode;
- while(1) {
+ while (1) {
if (Assign_D_WriteBlock())
return ERROR;
}
err=ErrCode;
- for(retry=0; retry<2; retry++) {
+ for (retry=0; retry<2; retry++) {
if (Copy_D_BlockAll(us, (err==ERR_EccReadErr)?REQ_FAIL:REQ_ERASE)) {
if (ErrCode==ERR_HwError)
return ERROR;
if (mode==REQ_FAIL)
SectCopyMode=REQ_FAIL;
- for(Media.Sector=0; Media.Sector<Ssfdc.MaxSectors; Media.Sector++) {
+ for (Media.Sector=0; Media.Sector<Ssfdc.MaxSectors; Media.Sector++) {
if (Copy_D_PhyOneSect(us)) {
if (ErrCode==ERR_HwError)
return ERROR;
//ADDRESS_T bb = (ADDRESS_T) &Media;
ReadBlock=Media.PhyBlock;
- for(WriteBlock=AssignStart[Media.Zone]; WriteBlock<Ssfdc.MaxBlocks; WriteBlock++) {
+ for (WriteBlock=AssignStart[Media.Zone]; WriteBlock<Ssfdc.MaxBlocks; WriteBlock++) {
if (!Chk_D_Bit(Assign[Media.Zone], WriteBlock)) {
Set_D_Bit(Assign[Media.Zone], WriteBlock);
AssignStart[Media.Zone]=WriteBlock+1;
}
}
- for(WriteBlock=0; WriteBlock<AssignStart[Media.Zone]; WriteBlock++) {
+ for (WriteBlock=0; WriteBlock<AssignStart[Media.Zone]; WriteBlock++) {
if (!Chk_D_Bit(Assign[Media.Zone], WriteBlock)) {
Set_D_Bit(Assign[Media.Zone], WriteBlock);
AssignStart[Media.Zone]=WriteBlock+1;
/* pr_info("Copy_D_PhyOneSect --- Secotr = %x\n", Media.Sector); */
if (ReadBlock!=NO_ASSIGN) {
Media.PhyBlock=ReadBlock;
- for(retry=0; retry<2; retry++) {
+ for (retry=0; retry<2; retry++) {
if (retry!=0) {
Ssfdc_D_Reset(us);
if (Ssfdc_D_ReadCisSect(us, WorkBuf, WorkRedund)) {
}
} else {
err=SMSUCCESS;
- for(i=0; i<SECTSIZE; i++)
+ for (i=0; i<SECTSIZE; i++)
WorkBuf[i]=DUMMY_DATA;
Clr_D_RedundantData(WorkRedund);
}
//ADDRESS_T bb = (ADDRESS_T) &Media;
if (Media.PhyBlock==NO_ASSIGN) {
- for(i=0; i<SECTSIZE; i++)
+ for (i=0; i<SECTSIZE; i++)
*buf++=DUMMY_DATA;
return SMSUCCESS;
}
- for(retry=0; retry<2; retry++) {
+ for (retry=0; retry<2; retry++) {
if (retry!=0) {
Ssfdc_D_Reset(us);
{
/* pr_info("Make_D_LogTable --- MediaZone = 0x%x\n",
Media.Zone); */
- for(Media.LogBlock=0; Media.LogBlock<Ssfdc.MaxLogBlocks; Media.LogBlock++)
+ for (Media.LogBlock=0; Media.LogBlock<Ssfdc.MaxLogBlocks; Media.LogBlock++)
Log2Phy[Media.Zone][Media.LogBlock]=NO_ASSIGN;
- for(Media.PhyBlock=0; Media.PhyBlock<(MAX_BLOCKNUM/8); Media.PhyBlock++)
+ for (Media.PhyBlock=0; Media.PhyBlock<(MAX_BLOCKNUM/8); Media.PhyBlock++)
Assign[Media.Zone][Media.PhyBlock]=0x00;
- for(Media.PhyBlock=0; Media.PhyBlock<Ssfdc.MaxBlocks; Media.PhyBlock++) {
+ for (Media.PhyBlock=0; Media.PhyBlock<Ssfdc.MaxBlocks; Media.PhyBlock++) {
if ((!Media.Zone) && (Media.PhyBlock<=CisArea.PhyBlock)) {
Set_D_Bit(Assign[Media.Zone], Media.PhyBlock);
continue;
Set_D_FailBlock(WorkRedund);
//Ssfdc_D_WriteRedtMode();
- for(Media.Sector=0; Media.Sector<Ssfdc.MaxSectors; Media.Sector++) {
+ for (Media.Sector=0; Media.Sector<Ssfdc.MaxSectors; Media.Sector++) {
if (Ssfdc_D_WriteRedtData(us, WorkRedund)) {
Ssfdc_D_Reset(us);
Media.Sector = sect;